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.

CCS / CC2642R:CC2642 simple_peripheral_oad_onchip OAD the app

Part Number: CC2642R

Tool/software: Code Composer Studio

I have completed my application code in the CC2642 simple_peripheral_oad_onchip project. At present,

I want to add the host role code to this project to become a master-slave one. How should I modify it? Thank you

  • Hi alan11,

    Which version of the SDK and CCS are you using?

    If you want your application to operate in multiple roles, you can start with the multi_role project and then add OAD to the project. Refer to tsk 3 of the OAD SimpleLink Academy lab for steps on how to add OAD to multi_role.

    Thanks,
    Elin

  • Hi Elin,

    SDK version :simplelink_cc13x2_26x2_sdk_3_30_00_03

    CCS version: ccs_setup_9.2.0.00013

    I saw the URL for you, and then added it according to the steps. I used the on-chip oad, but the routine is off-chip, 

    I added the following code in the multi_role_app.cfg file,

    /* 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 (Program.build.cfgArgs.OAD_IMG_A == 1)
    {
    m3Hwi.resetVectorAddress = 0x00055fc0;
    ROM.constStructAddr = 0x37000;
    ROM.externFuncStructAddr = 0x373C0;
    }
    else if (Program.build.cfgArgs.OAD_IMG_B == 1) //(OAD_IMG_TYPE == "B")
    {
    if (compilerDefs.indexOf('SECURITY') > -1)
    {
    // Check for SECURITY compiler symbol
    m3Hwi.resetVectorAddress = 0x90; // Image B Reset Vector Address
    }
    else
    {
    m3Hwi.resetVectorAddress = 0x50; // Image B Reset Vector Address
    }
    ROM.constStructAddr = 0x01000;
    ROM.externFuncStructAddr = 0x013c0;
    }
    else
    {
    m3Hwi.resetVectorAddress = 0x0;
    }

    -------------------------------------------------------------------------------------------------------------------------------------

    But the following error appears:

    Description Resource Path Location Type
    Cannot read property "OAD_IMG_A" from null (D:/ccs_workspace/multi_role_app_CC26X2R1_LAUNCHXL_tirtos_ccs/multi_role_app.cfg#250) .xdchelp /multi_role_app_CC26X2R1_LAUNCHXL_tirtos_ccs line 250 C/C++ Problem
    gmake: *** [build-1797120079] Error 2 multi_role_app_CC26X2R1_LAUNCHXL_tirtos_ccs C/C++ Problem
    gmake: Target 'all' not remade because of errors. multi_role_app_CC26X2R1_LAUNCHXL_tirtos_ccs C/C++ Problem
    gmake.exe: *** [package/cfg/multi_role_app_pem4f.xdl] Deleting file 'package/cfg/multi_role_app_pem4f.c' multi_role_app_CC26X2R1_LAUNCHXL_tirtos_ccs C/C++ Problem
    gmake.exe: *** [package/cfg/multi_role_app_pem4f.xdl] Deleting file 'package/cfg/multi_role_app_pem4f.h' multi_role_app_CC26X2R1_LAUNCHXL_tirtos_ccs C/C++ Problem
    gmake[1]: *** [build-1797120079-inproc] Error 1 multi_role_app_CC26X2R1_LAUNCHXL_tirtos_ccs C/C++ Problem

  • Hi alan11,

    alan11 said:
    I used the on-chip oad, but the routine is off-chip

    Can you please elaborate on what you mean here?

    There are newer versions of the SDK and CCS that are available here and here respectively. Can you update to the latest versions and see if you have the same issue?

    Thanks, 
    Elin

  • Hi, Elin,

    I have solved,thanks