Content originally posted in LPCWare by pietro on Tue Nov 08 04:41:21 MST 2011
Hi,
I've developed a quite complex architecture where an LPC1768 controls 12 units of LPC114 through rs485 bus.
For LPC1114 sw upgrade I do the following operations:
1) LPC114 receives data trough rs485: the UART is in polling mode, to avoid using interrupts
2) Once a package of 256 bytes arrive, it is stored in the flash using IAP commands starting at address 0 of sector 0.
3) I'm keeping empty the last 32 bytes of RAM to avoid problems with IAP
4) All interrupts are disabled
5) UART polling and IAP commands are located in RAM.
There's something wrong, because as soon as I erase sector 0, the code stops!
I think I'm not correctly locating routines into RAM.
I'm using the following instruction, ad example for a IAP command:
__attribute__((section(".RamLoc8"))) uint32_t prepare_sector_write_ram(uint32_t sector) ;
where RamLoc8 is the 8k RAM area defined in the standard linker.
How should I modify the linker to correctly locate functions in RAM?
Bye!
Pietro