Flash Magic Forum

In-System Programming Support => General => Topic started by: gesingle on July 05, 2007, 08:49:38 AM

Title: FMTest Access Violation
Post by: gesingle on July 05, 2007, 08:49:38 AM
I'm using Flash Magic Production System, version 3.57.217. My goal is to prepare a self-contained application for distributing P89V51RD2 firmware updates.

I'm beginning with FMTest, supplied with the PS distribution, and using MS Visual C++ version 6.

On my initial compilation of FMTest, I got these errors:
error: FM_CONOPT_NONE undeclared ... I changed this to FM_INTERFACETYPE_NONE
warning: expected newline ... I removed the ; from #pragma pack(pop);

I ran the program in debug mode and got an Unhandled Exception in FMTest.exe (FLASHMAGIC.DLL):0xC0000005: Access Violation. This occurred in fm_connect on a command of mov eax,dword ptr[ecx].  ecx contained 0.

Any ideas on the access violation?

Once I get past this, I think this is the fm_connect format I need.
presults = fm_connect(0, atoi(comport), atol(baudrate), FM_89V51RD2, 0, 0, 0, FM_HWNONE, 0, 0, 0, 115200, FM_INTERFACETYPE_NONE);



Title: Re: FMTest Access Violation
Post by: Andy Ayre on July 06, 2007, 09:11:20 AM
Please download the latest version from http://www.canopenstore.com/support and Email me directly if you still have problems.

Andy
Title: Re: FMTest Access Violation
Post by: gesingle on July 06, 2007, 12:38:54 PM
The latest download fixed the problem. Thanks, Andy.

For others that may be interested, fm_connect requires an fm_options pointer as the last variable. In my version, FM_INTERFACETYPE_NONE pointed to 0.  Oops.