Tool/software: Code Composer Studio
Hi,
I'm using Code Composer Studio(CCS) 9.3.0.00012, the hardware I use is TMS570LS31x HDK board.
With the help of QJ Wang, I successfully modified the Bootloader project into a Dual-application Bootloader project.(Special thanks for QJ Wang's help!)
Here's the URL: e2e.ti.com/.../880049
The Dual-application Bootloader can update and store two applications, which can update or launch the specified application.
This modified Bootloader can select two applications that I want to download or execute.
But I found that the application would overwrite the Flash memory space of another application.
Here is the problem I actually encountered:
The file sizes of "Application X" and "Application Y" displayed on the computer are 90kB and 27kB. (in decimal)
The APP_START_ADDRESS and APP_START_ADDRESS_2 I set in the Bootloader are 0x00010100 and 0x00020000.
Theoretically, the memory size of the first application cannot exceed the 38kB (in decimal) file size between the two applications.
(38kB is the capacity between 0x00010100 and 0x00020000 converted to decimal size. If my calculation is incorrect, please let me know.)
If "Application Y" is downloaded to the Flash memory address of 0x00010100,
and "Application X" is downloaded to the Flash memory address of 0x00020000, both applications will run correctly.
However, if I download "Application X" to Flash memory address 0x00010100, then "Application Y" with Flash memory address 0x00020000 will not work.
Apparently, the file size of "Application X" exceeds the space allocated for the application,
resulting in the content of "Application Y" being overwritten.
I try to modify the Flash memory settings in CCS:
Open Properties -> Debug -> Flash Settings
And select "Necessary Sectors Only (for Program Load)" at Erase Options in Flash Settings.
But the above attempts did not solve the problem of overwriting Flash memory space.
Is there any way to solve this situation?
Like limiting applications that exceed the file size or protecting applications that might be overwritten?
Thanks for your help!
Best Regards, Chen Yan-Li