Why does FM not save "all" settings?

Started by Maik Staberock, December 15, 2004, 07:04:52 AM

Previous topic - Next topic

Maik Staberock

For instance, the security bits. I use this tool to flash the P89LPC932 on my application for 100 pieces per charge.
There's a PC for testing purposes which also got FM 2.07 installed and everytime I start FM want to flash any number of CPUs, I'd have to set the security bits manually. This is very disturbing.
Other settings, like the selected baud rate are saved.

Why not all settings?


Besides, thanks for this free tool. I don't know any other to do this job.

Cheers,
Maik

Andy Ayre

Good question. For mostly historical reasons FM reads the current security bit settings and changes the state of the checkboxes to reflect how they are currently set. We plan to change this in a future release of FM.

For now the only workaround is to use the command line interface to FM for your programming. This can be set to always program the security bits the same way.

Thanks for the comments!

Embedded Systems Academy, Inc.
support at esacademy dot com

Maik Staberock

Andrew Ayre wrote:

> For now the only workaround is to use the command line
> interface to FM for your programming. This can be set to always
> program the security bits the same way.

Oh, I went cautious with this. I once used Keil uVision IDE, which is also capable to operate with FM, to flash a CPU. After this, the bootloader was destroyed. As it seems, the command line version doesn't print warning messages before erasing sector 7.

Well, unless the security bits can't be saved I have to set them every time
I program a charge of PCBs. This isn't too complicated. ;O)

Thanks!

Maik

Andy Ayre

I was just reminded in another thread of a possible workaround. You can set the security bits in the hex file. See Keil's start900.a51 (which you can get from their web site www.keil.com if you don't have it). Flash Magic will always program these settings when the hex file is programmed.

Embedded Systems Academy, Inc.
support at esacademy dot com

Maik Staberock

Meanwhile I tried this out and it didn't work. The start932.a51 is assembled and linked, but the sec bits aren't set like I modified them in the .a51.

Another problem: FM protects the ISP by not clearing sector 7 of the LPC932. Well, as long as I need the ISP (development stage) this is a good thing, but I loose 1k of flash memory. FM is able to erase certain flash pages so that I can use at least a portion of the last 1k, but it doesn't do this automatically. Why? To protect the ISP code in 1E00 - 1FFF, it could erase the pages at 1C00 -1DFF, so I can use it for code.
Yesterday I had a bad experience with this. The assembled code was 7192 bytes and successfully flashed, but after this it didn't work anymore properly. Took some hours of try and error to find out...

Andy Ayre

1. You need start900.a51, not start932.a51. I believe Keil changed their file at some point and Flash Magic only works with the new one. The newer one locates the security bits etc. starting at FFF0H.

2. If you have Protect ISP turned on and you choose to Erase All Flash, Flash Magic will automatically erase the lower half of the pages in the uppermost block, so you only lose 512 bytes.

Embedded Systems Academy, Inc.
support at esacademy dot com

Maik Staberock

Hello Andrew!

start932.a51 is nearly the same like start900.a51, it's only modified to fit the exact settings for the XRAM of the LPC932.  The section for UCFG in both files is identical.

No matter, I can live with it. So I just let the sec bits unset.
Would be nice anyway, if in some future version of FM the sec bits can be saved with the config.

Thanks for the support!

Maik

Andy Ayre

Sorry, my mistake. I assumed that Keil changed the file name at the same time they moved the location of the bits. You can get the latest version which works with Flash Magic from here:

http://www.keil.com/download/docs/start900.a51.asp

Embedded Systems Academy, Inc.
support at esacademy dot com