Other Parts Discussed in Thread: UNIFLASH, CC2640R2F
Hi,
CCS: v9.1.0
Simplelink CC2640R2 SDK: v3.20.00.21
Uniflash: v5.1.0
XDS Emulation Package: v8.3.0
Debug Probe: XDS200
We're currently working with the CC2640R2F on a custom board that implements off-chip OAD based on the simple_peripheral_offchip_oad example from blestack. We have had it working well until it came to trying to create a production hex file where we discovered that the oad image tool post build step was invoking an argument of 1 [Application] and not merging the stack. Original Post build steps are shown below.
${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}_${ConfigName}.out
${TOOLS_BLE_DIR}/oad/oad_image_tool ccs ${PROJECT_LOC} 1 -hex1 ${ConfigName}/${ProjName}.hex -bdf ${REF_PROJECT_1_LOC}/TOOLS/ccs_compiler_defines.bcfg -hex2 ${REF_PROJECT_1_LOC}/../Bin/Debug/stack_library.hex -o ${PROJECT_LOC}/../Bin/Debug/${ProjName}_oad
After changing this to 3 [App+Stack Merged] we were able to get a successful app+stack merged image that allowed us to create a production hex file via srecord, this file is working fine when flashing directly via Uniflash.
${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}_${ConfigName}.out
${TOOLS_BLE_DIR}/oad/oad_image_tool ccs ${PROJECT_LOC} 3 -hex1 ${ConfigName}/${ProjName}.hex -bdf ${REF_PROJECT_1_LOC}/TOOLS/ccs_compiler_defines.bcfg -hex2 ${REF_PROJECT_1_LOC}/../Bin/Debug/stack_library.hex -o ${PROJECT_LOC}/../Bin/Debug/${ProjName}_oad
The problem occuring now is that when trying to use the app+stack merged image for OAD it fails the internal flash CRC check in the BIM after copying. The CRC check after the OAD download is correct and checking the CRC of the image in external flash from within the BIM also returns a correct value, the error only when checking the internal flash after the call to Bim_copyImage()
The BIM has not been modified from the example project except for changing the BSP SPI hardware pins to match our custom hardware.
We noticed that even with an arugment of 3 the OAD image tool also produced an application-only OAD image. Using this image works fine and passes all CRC checks without fault.
Is it simply a case of we aren't able to use the app+stack merged image for OAD or are we missing something?
Best Regards,
Anthony