twrk70 execute code out of external nand flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

twrk70 execute code out of external nand flash

2,345 Views
lorenzofornari
Contributor III

Hi all,

my application code will probably exceeds 1 MB of provided internal flash, due to hard-coded very large arrays (eGui images and fonts...).

The k70 MCU has a nand flash controller (nfc), and there are 2GB of nand flash memory on board.

Is it possible to program the external nand flash with the application code, and then the internal flash with a bootloader that will start the application out of nand?

If yes, anybody could link me some examples or guide?

Thank you

0 Kudos
Reply
7 Replies

1,502 Views
joey81
Contributor II

I don't think this is possible.  The processor is can only execute code that is accessible within its memory space (internal program flash, internal SRAM,  external SRAM).

The contents of the external NAND is not mapped to the processor's address space.  The same way your PC's hard-drive's contents is not mapped to the PC's memory space.

The only way for an "application" stored on NAND to be executed is to copy it to either the internal program flash, or internal SRAM, or external SRAM.  Then jump to its starting address.  The same way a PC program is loaded from the hard-drive into the PC's RAM.

In your case, a more feasible approach might be to have the executable code stored in program flash and the read-only data ("hard-coded very large arrays (eGui images and fonts...)" stored in the external NAND.

0 Kudos
Reply

1,502 Views
friederschrempf
Contributor IV

Can someone provide some hints?

I'm also interested in this setup.

Thanks!

0 Kudos
Reply

1,502 Views
RuiFaria
Contributor III

hi,

Any news?

Thanks,

Rui Faria

0 Kudos
Reply

1,502 Views
DavidS
NXP Employee
NXP Employee

Hi Rui,

Yes the K70 NAND can hold application code that gets loaded to DDR memory to run.  A bootloader could be in the internal flash.

Good appnote to review: AN4348: MCF54418 NAND Flash Controller

It is the same NAND controller as on Kinetis and MPC5125.

But the bootloader would have to be "smart" to handle NAND unique features such as bad blocks, ECC, etc...

Or use MQX4.1 that has a FFS (flash file system) for NAND to handle that.

Regards,

David

0 Kudos
Reply

1,502 Views
michelebacchere
Contributor I

Hi David,

could you suggest a MQX4.1 example for the use FFS on NANDFLASH?

Thanks

Michele

0 Kudos
Reply

1,502 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Michele,

The support team is monitoring all the new posts. I recommend to submit a new question when the topic is different than the original question.

Regards,

Carlos

0 Kudos
Reply

1,502 Views
RuiFaria
Contributor III

Hi David,

Thanks for your attention, i am already testing FFS on 4.0.2.

Do you have any example of that "smart" Bootloader? :smileyhappy:

0 Kudos
Reply