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/RM48L952: CCS9 debugger start location

Part Number: RM48L952


Tool/software: Code Composer Studio

Hi,

I have a multi part embedded firmware project where the kernel and application (+ bootloader) are separate projects. The software boots so that after bootloader the kernel program starts and initializes the hardware. After that the kernel calls the application software's start function (_c_init00) that has been fixed to known location. I have got this working fine when the processor (RM48) boots itself after cold reset. When I try to flash and debug the application, the debugger flashes only the application (as planned) to internal flash memory and then starts running code directly from application's _c_init00 skipping the kernel's hardware initialization code. In the similar way if I flash/debug the kernel the debugger will skip the bootloader.

Is there way to set start/reset location where the CCS debugger starts running the code so that the kernel code would be ran when debugging the application? I wasn't able to find such parameter from the UI.

  • I think the CCS debugger gets the start location from the "Entry point address" in the ELF header of the .out file.

    When using the TI tool chain the --entry_point option may be used to change the symbol for the entry point from the default symbol of _c_int00.

    I tried the following in a linker command file for a RM57 project to set an arbitrary entry point:

    /* Set the entry point to the kernel (arbitrary address set for this example) */
    kernel_entry=0x123456;
    --entry_point=kernel_entry
    
    /* Suppress the warning since we have above deliberately overriden the entry point */
    /* - 10063: Warning about entry point not being _c_int00          */
    --diag_suppress=10063
    
    /* Prevent the linker from discarding the run time library entry point. Not sure if this is necessary */
    --retain=_c_int00

    And the output from readelf -h reported that the entry point had been set to the requested address:

    ELF Header:
      Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
      Class:                             ELF32
      Data:                              2's complement, little endian
      Version:                           1 (current)
      OS/ABI:                            UNIX - System V
      ABI Version:                       0
      Type:                              EXEC (Executable file)
      Machine:                           ARM
      Version:                           0x1
      Entry point address:               0x123456
      Start of program headers:          248392 (bytes into file)
      Start of section headers:          248488 (bytes into file)
      Flags:                             0x5000000, Version5 EABI
      Size of this header:               52 (bytes)
      Size of program headers:           32 (bytes)
      Number of program headers:         3
      Size of section headers:           40 (bytes)
      Number of section headers:         24
      Section header string table index: 23

    I don't have a multi-part firmware project at the momment to check that has the expected effect on the CCS debugger.