2007-04-22 09:46 PM
How to write progrm and data in the same bank
2011-05-17 12:41 AM
Hi,
I am using 256k flash as boot flash.Can i use the same flash for data storage.Program will be in sector0 of primary flash.Can data be stored in sector1 of primary flash.If any body worked on this please help us. Thanks&Regards Anu2011-05-17 12:41 AM
Hi. IMHO... it is impossible to execute code and write into same bank simultaneously. You must copy your code into RAM and execute from RAM if you want to write or erase sector1.
BTW, in my projects I sometimes need to pre-load some register with a constant. It is compiled using LDR Rx, [PC, #offset] instruction. Constants are placed just after executable code.2011-05-17 12:41 AM
Can we attach data file with code and download to flash at the same time using JTAG.Is there any way to keep data in primry flash.
2011-05-17 12:41 AM
You have code and some constant data table. You want to write your code into sector0 and data table into sector1 of primary flash. Do I undertand you right? So... simply produce one programming file regarding to format specified in programming manual and download it using JTAG.
2011-05-17 12:41 AM
Can you explain it clearly.I know the format of how to program code file but not data.If we protect the sectors(1,2,3) of primary flash,will they get erased during programming into sector 0 of primary flash.
2011-05-17 12:41 AM
The .obj file, as specified, is simple hex file with some additional rules. From programmer point of view, the code or the data - it is the same. Just place your data at address, where you want to have it. In this way you can produce one programming file carrying both - code and data. So all the content will be programmed at once.
Erasing of unused sectors before programming is programmer-dependent. However, using one programming file it is irrelevant. In the worst case, during re-programming the data you will reprogram also the code (with the same code)...