Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: Can I use IAP routines with PLL multiplier other than 1x.

2005-08-27 by Landrum Haddix

Bob,
> what you describe sounds reasonable though not trivial. While
> receiving characters, you need to have the int vectors remapped to the
> SRAM and the ISR itself needs to be in SRAM too. 

I've gotten this part implemented and tested. To get functions in ram
I created a new linker section with DATA for ram functions and modified
the startup.s to initialize them from the image in the TEXT section. I
use the GCC attribute function to place ram functions in that section.

To move the vector table I created a section at the start of DATA
where the ram vector table is located when not remapped then
made the vector table a 'naked' function (no entry/exit code)  containing
inline assembly for the table that gets relocated into that section.

It took some tinkering and staring at the .map and .lst files. I learned
more about .ld files than I wanted to know.

> There have been discussions about replacing the bootloader with
> customized versions but as far as I remember the best argument from
> Philips was that handling IAP can only be compatible across many
> devices when one bootloader is always used. Modifying the bootloader
> has significant risks for reliability of flash programming and I
> understand that Philips does not want to risk any reliability and may
> be liability issues.

I argued the case for keeping the default bootloader and was shot down
because it's a marketing requirement that this device flash update in
the same manner as our previous products to avoid confusing the 
installer.

I think what I will do is not modify the existing bootloader so that I
always have an assured simple way to update the flash and write
an additional  flash loader that executes in ram, understands the
proprietary 485 data and calls the IAP to update the flash.

This way the actual flash update would still use the Phillips supplied
IAP leaving the flash write details to Phillips.

If the flash loader resides in ram it can replace the entire flash
including it's own image in the TEXT segment.

Talk about spinning plates.<g>

Thank you, you have been extremely helpful. The LPC series is fantastic
but I've only been climbing the learning curve since March and there are
still plenty of mysteries

Landrum Haddix
lhaddix@...
http://web.qx.net/lhaddix

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.