Hello I want to evaluate the use case where an external nor flash is primarily used as a non-volatile storage and used to keep tflite model and gui image while the internal flash is used to hold the program. The system after booting up and read from the external flash. Therefore can avoid re-flashing the large data that doesn’t need to be updated when flashing the firmware/image to the system.
Solved! Go to Solution.
Hi @TomC818
I think this can also be achieved. You can store the model in external flash through linkserver.
And in your code. you can initial external flash, and run it.
BR
Harry
Hi @TomC818
Yes, you are right, and we have already achieved this.
Firstly, you need to add external flash initialization code into your project.
And then put your model data into external flash.
BR
Harry
Hi @Harry_Zhang ,
Thanks for the reply but can you explain a little more on how to only flash the large data to the external flash without running any codes by the mcu?
I know that running a different set of code on the mcu which open a serial interface to receive data and then writing to external nor flash would probably be a possible solution.
I do see that there are some guide on how to program bootable image to external flash via ISP and SEC tool or SPSDK.
Running code from external memory with MCX N94x - NXP Community
Using SEC Tool Config and Program Image to External Flash - NXP Community
But my goal would be still having the bootable image stay inside the internal flash while the model/ui images would be larger than the size of the internal flash could be placed in the external flash and can be loaded to an external PSRAM later for inferencing or displaying while running the code from the internal flash. Therefore I can modify and update the codes without needing to flash the model and ui data again, or vice versa I can update the model and ui independently to the codes.
Are there any existing tool or demo that can achieve this goal?
can you explain a little more on how to only flash the large data to the external flash without running any codes by the mcu?
If you want to store the model data to the nor flash.
You can add text.ldt in the linkscripts folder.
After compile this project.
And when you debug or flash, the data in OSPI_FLASH will be flashed into the octal flash.
After you initialize nor flash, you can directly use these data.
I have just completed the relevant demo, but due to company policy, I am unable to share my project. I will write an article about this project in the near future.
BR
Harry
Hi @TomC818
I think this can also be achieved. You can store the model in external flash through linkserver.
And in your code. you can initial external flash, and run it.
BR
Harry