Hello,
I am about to start working on a product that is supposed to contain one LPC2478/CM3 variant with 512[KB] internal flash, replacing a product with 2 such processors. Obviously I have a serious problem with ROM, but the designer assured me that some of the code "will be stored in NAND flash". In order to make that work, to my understanding the code in the NAND flash must be copied, by hand, by the program in internal flash, to absolute addressed in external RAM, to which the code can jump (because scatter loading cannot do it). Debugging is going to be hard; if code in the NAND flash needs to be debugged, first my bootloader/application will have to program the NAND flash because uv4 cannot do it (I think), and only then can a debug session be started. In addition, I don't think I'm going to have any debug information for that code. Do you have any thought/recommendations/corrections you want to share with me? Thanks in advance
Tamir,
I would try to avoid using the NAND, because exactly the problems you have mentioned (not directly support in MDK, wear leveling, etc).
Usually, when you need NANDs you add SDRAMs also to execute the code from SDRAM.
Other option: ATMEL AT91SAM9263? you have support in MDK, it use a DataFlash for code storage(8 pins and really cheap) then dump to SDRAM for execution.
If you have no choice, check uClinux, it has support for the LPC2478 NAND controller, you can use the code as base.
Thanks for your reply. To be honest, my hands are tied - it's too late to make any significant hardware design changes. My employer also has a negative experience with embedded Linux, so I might have to do with good old RTX and manually getting myself out of this pending theoretical disaster...I am hopeful that the thumb-2 instruction set will allow the system to grow in time (the final product will use a CM3, not an ARM7). Thanks for your comment thought!
This may be interesting for you:
Added: support for NAND Flash drive (N:) to File_Config.c configuration file and FlashFS library. It supports wear leveling, error correction and bad block replacement.
- MDK new version (4.20) -
Leandro
Hi,
LPC2478 does not have NAND flash controller so there is no way that you will use LPC2478 with NAND. LPC3250 does have NAND controller and Keil does support it, there is also a NAND bootloader already provided by Keil, you can find it in folder c:\Keil\ARM\Boards\Phytec\LPC3250\ Also, why wouldn't uV support NAND flash, it does not have much to do with uV it has to do with flash algorithm, and you can always write your own flash algorithm if for the flash you want to use one doesn't already exist. Also, regarding NAND flash and internal flash and all that you mentioned, usually such systems consist of NAND flash for code storage and SDRAM for code execution and usually things work for example for LPC3250 that internal chip bootloader loads first NAND flash sector to internal RAM and starts it. You then have second level bootloader in first NAND sector which then loads and transfers the whole application from NAND flash to SDRAM and does vector copy to internal RAM and jumps to start of SDRAM and starts executing the application code. Also, you can debug the same application while developing, in SDRAM, as you can load the application to SDRAM via debugger script and debug it where it is supposed to run anyways. Keil already has the whole system with NAND supported and example is above mentioned for Phytec LPC3250 board.
Thanks. I've seen it last night.
LPC2478 does not have NAND flash controller so there is no way that you will use LPC2478 with NAND.
I do - by scarifying a few IO pins.