Tuesday, September 1, 2020

How to remove OAD feature on CC26x2/CC13x2 project_zero

 The following steps show you how to remove OAD feature on CC26x2/CC13x2 project_zero

 1. Replace C:\ti\simplelink_cc13x2_26x2_sdk_4_10_03_02_eng\examples\rtos\CC26X2R1_LAUNCHXL\ble5stack\project_zero\tirtos\ccs\cc13x2_cc26x2_app.cmd
   with C:\ti\simplelink_cc13x2_26x2_sdk_4_10_03_02_eng\examples\rtos\CC26X2R1_LAUNCHXL\ble5stack\simple_peripheral\tirtos\ccs\cc13x2_cc26x2_app.cmd
   
2. Check "Exclude from build" on project_zero OAD folder in CCS Project Explorer.

3. Remove all OAD_xxx related code from projec_zero.c and _imgHdr

4. Change project_zero_app.cfg

m3Hwi.nvicCCR.UNALIGN_TRP = 0;
//m3Hwi.nvicCCR.UNALIGN_TRP = 1;

/* Put reset vector after OAD metadata */
var compilerOpts = prog.build.target.ccOpts.prefix; // Get the target compiler options
var regex = /(?:\-\-define\=)(\w*)(?:\=*\w*\s)/g;
var compilerDefs = [];
while ((tmp = regex.exec(compilerOpts)) !== null) compilerDefs.push(tmp[1]); // Parse compiler symbols

if (compilerDefs.indexOf('SECURITY') > -1) { // Check for SECURITY compiler symbol
    m3Hwi.resetVectorAddress = 0x90; // Image B Reset Vector Address
}
else {
    m3Hwi.resetVectorAddress = 0x50; // Image A Reset Vector Address
}

/* Put interrupt vector at start of RAM so interrupts can be configured at runtime */
m3Hwi.vectorTableAddress  = 0x20000000;

To

m3Hwi.nvicCCR.UNALIGN_TRP = 0;
//m3Hwi.nvicCCR.UNALIGN_TRP = 1;

/* Put reset vector at start of Flash */
m3Hwi.resetVectorAddress  = 0x0;

/* Put interrupt vector at start of RAM so interrupts can be configured at runtime */
m3Hwi.vectorTableAddress  = 0x20000000;

No comments:

Post a Comment