Author Topic: FMTest Access Violation  (Read 4822 times)

gesingle

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
FMTest Access Violation
« 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);




Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2156
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: FMTest Access Violation
« Reply #1 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
Embedded Systems Academy, Inc.
support at esacademy dot com

gesingle

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
Re: FMTest Access Violation
« Reply #2 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.