This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Hello again,
I have 2 applications running on the F28062. The first is a custom bootloader in FlashA and the other is the main application running in FlashB.
Both have to be secured with the CSM so both have the same 128bit CSM Key. But here is the question:
When I compile both of the Projects, should only one of the Projects specify the CSM section and what to do with it or can both change this section since they use the same key?
When I think about this, I would say that only the bootloader has to secure the Flash since it is the only program that changes the flash so I could omit the CSM password in the main application right?
So what would be the best solution for this?
And if I only use the CSM in the Bootloader, is it Ok to only delete the CSM section in the main applications linker file or would this lead to undefined behavior? What should I do with the CSM section in the linker file?
Thanks in advance :)
Since bootloader as well as main applications are running from secure flash, both have same privileges so there is no issue. In general you never have to use csmUnlock() for running the code.
Vivek Singh
Ok, thank you :)
Just to be perfectly clear, when building the main application I want BOTH sections "csm_rsvd AND csmpasswds" to be DSECT so both of them won`t get touched while flashing new main application right?
csm_rsvd : > CSM_RSVD, PAGE = 0, TYPE = DSECT csmpasswds : > CSM_PWL_P0, PAGE = 0, TYPE = DSECT CSM_RSVD : origin = 0x3F7F80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */ CSM_PWL_P0 : origin = 0x3F7FF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
The csm_rsvd tells the DSP that the CSM is active so only the bootloader will set these values to 0x0000 when it is burned and the main application will NEVER change these so I declare csm_rsvd as DSECT in the main application, right?
The csmpasswds stores the Password so again only the bootloader changes these values when it is burned and the main application should NEVER change these so I also declare csmpasswds as DSECT in the main application, right?
Thank you
Hi,
The csm_rsvd tells the DSP that the CSM is active so only the bootloader will set these values to 0x0000 when it is burned and the main application will NEVER change these so I declare csm_rsvd as DSECT in the main application, right?
The csmpasswds stores the Password so again only the bootloader changes these values when it is burned and the main application should NEVER change these so I also declare csmpasswds as DSECT in the main application, right?
Yes, that is correct.
One clarification that csm_rsvd address range alone being 0x0 does not tell that DCSM is active. CSM gets active when CSM PASSWORDS are programmed and in that case it is recommended to programed the csm_rsvd space with data 0x0.
Regards,
Vivek Singh