From help line
What is the memory map for SuperPRO PROplus in C?
For C programs the memory map is controlled by the corresponding lpcXXXX.ld file in the lib directory. We take the stock files from the gcc distributions and make some minor edits. The sites for gcc have documents describing those files, and for the most part we don't try to get fancy with them.
The sorcename.map file is generated by the compiler and shows were things end up in memory.
A tool we tend to use a lot is generating a ASM listing, which shows us both what code and where it is in memory resulting from a C file.
Memory map for C
Re: Memory map for C
>more from help line
>I have a SuperPRO board running MakeItC.
>Case 21 of CSample does not work at default address 7000, but it works fine in the 8000 range.
>At addresses 9000 and up it does not appear to write although the error code is 0.
>Case 20 reads FFFFFFFF at all addresses.
>When I first started experimenting I could have written anything anywhere. Could I have overwritten something?
We haven't updated Csample.c in quite some time, the flash map is wrong for the SuperPRO
>I have a SuperPRO board running MakeItC.
>Case 21 of CSample does not work at default address 7000, but it works fine in the 8000 range.
>At addresses 9000 and up it does not appear to write although the error code is 0.
>Case 20 reads FFFFFFFF at all addresses.
>When I first started experimenting I could have written anything anywhere. Could I have overwritten something?
We haven't updated Csample.c in quite some time, the flash map is wrong for the SuperPRO
Code: Select all
#if defined ARMexpress || defined LPC2106
WriteFlash ( 0x7000, (int) buffer, 512, 2106);
#elsif defined LPC1756
WriteFlash ( 0x7000, (int) buffer, 512, 1756);
#else // all the 21xx in use and 17xx and 11xx and 12xx use the 4K Flash map of the 2138
WriteFlash ( 0x7000, (int) buffer, 512, 2138);
#endif
Re: Memory map for C
Does Flash.c have to change?
Re: Memory map for C
No flash.c is up to date (we use it in BASIC). The problem was the original write to 0x7000 would be the same for the LPC1756 as the LPC21xx, but for the address 0x8000 the sector number is different, and that is chosen by the map parameter passed to flash.c write. That map is 1758.
To understand this look at the source for flash.c and the NXP User manual for the LPC175xx, which details the IAP calls to write to flash.
To understand this look at the source for flash.c and the NXP User manual for the LPC175xx, which details the IAP calls to write to flash.