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.

CC2640R2F: OAD App & Stack Combined

Part Number: CC2640R2F

Hi team,

I'm trying to add offchip OAD for multirole example using SDK 3.30. I'm using SimpleLink academy tutorial as reference. But to save Flash I want to keep Stack_Library configuration. As for now, almost all is working except incorrect OAD image generation: I can download a new image to ext flash, BIM validates the image, but fail after jumpToPrgEntry.

I generate OAD image with the cmd:

${TOOLS_BLE_DIR}/oad/oad_image_tool ccs ${PROJECT_LOC} 7 -hex1 ${ConfigName}/${ProjName}.hex  -k ${TOOLS_BLE_DIR}/oad/private.pem -o ${PROJECT_LOC}/${ConfigName}/${ProjName}_${ConfigName}_oad

As you can see, I pass BinaryType=7 and only one hex file.  But in the generated image I see incorrect Program Entry Address = 0xE4, but actually program starts at 0xA8.

Please see the file in the attachment.

Can you please help me to create image with the correct  Program Entry Address.

  • Unfortunatelly,

    I cant attach the full binary file.

    There is a screenshot with hex view of the file. I marked the program start address in header and actual program start.

  • Hello ,

    I have not tried this myself. I will check with my colleagues and get back to you.

  • As you probably seen the Stack_Library configuration is not included as an OAD example in the SDK and might require some substantial effort (possibly R&D as I am not proficient with OAD yet..) to make it work.

    Have you modified the image tool (oad_image_tool.py) and the linker command file (cc26xx_app_oad.cmd) to make sure the header is populated correctly?

  • Eirik,

    I used cc26xx_app_oad.cmd from source\ti\blestack\common\cc26xx\ccs\ as reference.

    Now I solved the problem: this ile have the code

    	#ifdef OAD_IMG_A
    	  GROUP >  FLASH(HIGH)
    	  {
    		.img_hdr align PAGE_SIZE
    		.text
    		.const
    		.constdata
    		.rodata
    		.emb_text
    		.init_array
    		.cinit
    		.pinit
    	  }LOAD_END(flashEndAddr)
    
    	  GROUP > ENTRY
    	  {
    		.resetVecs
    		.intvecs
    		EntrySection
    	  } LOAD_START(prgEntryAddr)
    
    	#else   // OAD_IMG_B || OAD_IMG_E
    	 GROUP > FLASH_IMG_HDR
    	  {
    		.img_hdr align PAGE_SIZE
    	  }
    
    	  GROUP > ENTRY
    	  {
    		.resetVecs
    		.intvecs
    		EntrySection  LOAD_START(prgEntryAddr)
    	  }
    
    	  GROUP >>  FLASH
    	  {
    		.text
    		.const
    		.constdata
    		.rodata
    		.emb_text
    		.pinit
    	  }
    	  .cinit        : > FLASH LOAD_END(flashEndAddr)
    
    	#endif // OAD_IMG_A

    I changed this to this:

    #ifdef OAD_IMG_A
      GROUP >  FLASH(HIGH)
      {
        .img_hdr align PAGE_SIZE
        .text
        .const
        .constdata
        .rodata
        .emb_text
        .init_array
        .cinit
        .pinit
      }LOAD_END(flashEndAddr)
    
      GROUP > ENTRY
      {
        .resetVecs
        .intvecs
        EntrySection
      } LOAD_START(prgEntryAddr)
    
    #else   // OAD_IMG_B || OAD_IMG_E
     GROUP > FLASH_IMG_HDR
      {
        .img_hdr align PAGE_SIZE
      }
    
      GROUP > ENTRY
      {
        .resetVecs
        .intvecs
        EntrySection
      } LOAD_START(prgEntryAddr) // <<<<<<<<<<<<<< MODIFICATION
    
      GROUP >>  FLASH
      {
        .text
        .const
        .constdata
        .rodata
        .emb_text
        .pinit
      }
      .cinit        : > FLASH LOAD_END(flashEndAddr)
    
    #endif // OAD_IMG_A

    Now it generates good image