Author Topic: Release hex-File after programming  (Read 6355 times)

lpc1766

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Release hex-File after programming
« on: January 02, 2010, 11:38:32 am »
If i have programmed my Device with FM and want to compile a new Version, the Compiler outputs a Error, because the hex File is unable to access. If i close FlashMagic the File is released an can be accessed by the Compiler.

So it would be nice if FlashMagic would close the hex-File always after programming. Then i could compile and programm without always closing FlashMagic :)

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2098
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Release hex-File after programming
« Reply #1 on: January 04, 2010, 05:13:26 pm »
I'm not able to reproduce this. Here is my test:

Flash Magic 5.50.1860
NXP Industrial Reference Board
LPC1768
Windows XP SP3
Project built using Keil uVision3 V3.85

I rebuilt the project and selected the hex file in Flash Magic.
The date/time stamp shown in section 3 of the Flash Magic window shows that the hex file was built a few seconds ago.
Programmed the device = no problems.
In uVision I went to Project -> Rebuild all target files = no problems.
The date/time stamp shown in section 3 of the Flash Magic window shows an updated timestamp.
Programmed the device = no problems.

Can you please give me some more information to work with? Perhaps which version of Windows you are using? What compiler you are using, etc?

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

lpc1766

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Release hex-File after programming
« Reply #2 on: March 03, 2010, 07:20:08 pm »
I see, my remembrance was somewhat wrong.
The Compiler (IAR EWARM 5.4 Kickstart) outputs a warning that the hex-File could not be deleted, but the Compiler is able to write the File. Very strange...
So the Problem is not as big as i thought :)

As previously reported, the warning disapears if FM is closed.

Compiler Output:
"Failed to delete C:\....\Debug\GettingStarted.hex "

I'am using FM 5.32 and WinXP SP2.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2098
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Release hex-File after programming
« Reply #3 on: March 04, 2010, 05:08:36 pm »
I just tried this again. This time with an LPC2129 board from Keil, XP SP3, Keil uVision4 and Flash Magic 5.61. I still couldn't reproduce it.

At this point I am not sure what to suggest. Looking at the code I don't see where it would be keeping the file open, and I cannot make it do that. Sorry.

I have one other person reporting the same issue, but they haven't been able to give me any clues as to what the problem might be. Perhaps on some installations of Windows the file handling is corrupted? Or maybe something was installed that altered file handling? Perhaps try it again but with Windows in Safe Mode.

Can you delete the file in Windows Explorer if Flash Magic is open and the IAR tools are closed? If yes then I would suggest the problem might be with Windows or the IAR tools.

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

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2098
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Release hex-File after programming
« Reply #4 on: March 24, 2010, 07:16:16 pm »
Although we couldn't reproduce it in XP SP3 we could in Windows 7. I think this is a failure to correctly manage open handles in XP.

Anyway, please try version 5.62 and let us know if you still see a problem.

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