Author Topic: ERROR_UNSUPPORTED .net exception LPC1756  (Read 2213 times)

cstone

  • Jr. Member
  • **
  • Posts: 1
    • View Profile
ERROR_UNSUPPORTED .net exception LPC1756
« on: October 16, 2013, 10:33:07 pm »
Hello,
I have been developing a windows forms application that requires the use of flash magic .net assemblies. When running my program on my development PC, I have no problems. When I try to run the program on another computer I get a FMException when trying to connect to my LPC1756.

ERROR_UNSUPPORTED

I installed flash magic PS Net. I have included FlashMagicARMCortexNET.dll in my references and I can see it in the installation's application files. Here is the code I am using to connect to the 1756.

            COMOptions setup = new COMOptions();

            setup.baudrate = 115200;
            setup.halfduplex = 0;
            setup.highspeed = 0;
            setup.hwconfig = HardwareConfigurations.BOOTEXECRTS;
            setup.interfacetype = Interfaces.NONE;
            setup.hwt1 = 500;
            setup.hwt2 = 500;
            setup.maxbaudrate = 115200;
            setup.osc = 100;


            setup.port = GetPortName();
               

            setup.selecteddevice = Devices.LPC1756;
            setup.usinginterface = 0;
            setup.flashbank = 0;

            try
            {

                serialport.Close();

                baudrate = FlashMagicCortex.Connect(setup);


            }
            catch (FMException Exc)
            {

             
                MessageBox.Show(Exc.ToString(), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                backgroundWorker1.ReportProgress(0, state);
                this.backgroundWorker1.CancelAsync();
               
               
            }

What does the ERROR_UNSUPPORTED exception point to? My first guess is my setup is wrong, but I am able to program with that same setup using flash magic UI. The exception is not very specific so I don't know the cause. Any suggestions for trouble shooting this issue would be greatly appreciated.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2099
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: ERROR_UNSUPPORTED .net exception LPC1756
« Reply #1 on: October 28, 2013, 11:34:13 am »
Hi, please confirm - you compile the exe and run it on your development PC and it works. You move the exe over to another PC and it doesn't?

Please check that all the DLLs are there. You need in the same folder:

  - your exe
  - FlashMagicARMCortexNET,dll
  - FlashMagicARMCortex.dll

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com