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.

How can I add a `main` symbol entry back to a load_image ELF? (MSP432 target)

I was able to combine a boot loader with an application firmware into a single image by adding one project (the bootloader) as a dependency and adding this as a post-build step to the other project (the app):

"${CG_TOOL_ROOT}/bin/armhex.exe" "${PROJECT_ROOT}/app-boot-combo.cmd" "${build_var:/${REF_PROJECT_2_NAME}/BuildArtifactFilePath}" "${BuildArtifactFileName}" --outfile="${BuildArtifactFileBaseName}.combo.out"

The command file is:

--load_image
--load_image:combine_sections=false
--image
 
ROMS {
    Bootloader  : origin = 0x00000000, length = 0x00008000
    Application : origin = 0x00008000, length = 0x00038000
}

Now I would like CCS to use that combined "load image" when I debug my app. I discovered that if instead of combining into `--outfile="${BuildArtifactFileBaseName}.combo.out"` that I can just use `--outfile="${BuildArtifactFileName}"` and it overwrites the original app-only out file with the combined file and that CCS will flash the combined one automatically which is a great start.

However, when I do this I get errors from the debugger:

CORTEX_M4_0: AutoRun: Target not run as the symbol "main" is not defined
CORTEX_M4_0: AutoRun: Target not run as the symbol "main" is not defined

 

I noticed in the ARM Assembly Language Tools User's Guide (spnu118y) section 12.6.2 Load Image Characteristics that it says "The file is not marked executable and does not contain an entry point".

How can I add the "main" symbol back in so that the CCS debugger won't be updset?