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.

LAUNCHXL2-570LC43: Example project 0 is not working

Part Number: LAUNCHXL2-570LC43
Other Parts Discussed in Thread: TMS570LC4357

Hello

I am trying to run Launchpad/570LS/570LC43/Project_0 from the source tree obtained from https://git.ti.com/git/hercules_examples/hercules_examples.git

It is not working, I get into an undef state right from the reset. System details: Ubuntu 22.04LTS running on a 64 bit PC, CCS 11.1.0.00011 , target LAUNCHXL2-570LC43

By disassembling the code at/near address 0, I have some idea why it is not working; it seems that the binary code is junk.

Below is the output from the disassembly window (the _c_int00 symbol is at 0x21CC and has valid code in it)

Also note that I have not modified anything in the source tree.

What could I be doing wrong?

52                b   _c_int00
          $../source/HL_sys_intvecs.asm:52:66$(), resetEntry():
00000000:   710800EA            smlattvc   r8, r10, r0, r0
54                b   undefEntry
          undefEntry:
00000004:   FEFFFFEA            cdp2       p15, #0xf, c15, c15, c10, #7
56                b   svcEntry
          svcEntry:
00000008:   FEFFFFEA            cdp2       p15, #0xf, c15, c15, c10, #7
58                b   prefetchEntry
          prefetchEntry:
0000000c:   FEFFFFEA            cdp2       p15, #0xf, c15, c15, c10, #7
60                b   dataEntry
          dataEntry:
00000010:   FEFFFFEA            cdp2       p15, #0xf, c15, c15, c10, #7
61                b   phantomInterrupt

  • By disassembling the code at/near address 0, I have some idea why it is not working; it seems that the binary code is junk.

    Can paste the output of the CCS build console after performing a re-build?

    I just tried the example using 11.1.0.00011 under Ubuntu 18.04.6 LTS, using the TI v18.12.5 ARM compiler and the program worked on a  LAUNCHXL2-570LC43.

    The output from the disassembly window showed instructions with a different endianess to your's:

              $../source/HL_sys_intvecs.asm:52:66$(), resetEntry():
    00000000:   EA000EC7            b          _c_int00
    54                b   undefEntry
              undefEntry:
    00000004:   EAFFFFFE            b          undefEntry
    56                b   svcEntry
              svcEntry:
    00000008:   EAFFFFFE            b          svcEntry
    58                b   prefetchEntry
              prefetchEntry:
    0000000c:   EAFFFFFE            b          prefetchEntry
    60                b   dataEntry
              dataEntry:
    00000010:   EAFFFFFE            b          dataEntry
    61                b   phantomInterrupt
    00000014:   EA000F4A            b          phantomInterrupt

    The project was set to a Device endianness of "be32" which is correct for a TMS570LC4357.

    If changed the project properties from a Device endianness of "be32" to "be8" then the program breaks and I get the same incorrect disassembly reported as you:

              $../source/HL_sys_intvecs.asm:52:66$(), resetEntry():
    00000000:   C70E00EA            strgt      r0, [r14, -r10, ror #1]
    54                b   undefEntry
              undefEntry:
    00000004:   FEFFFFEA            cdp2       p15, #0xf, c15, c15, c10, #7
    56                b   svcEntry
              svcEntry:
    00000008:   FEFFFFEA            cdp2       p15, #0xf, c15, c15, c10, #7
    58                b   prefetchEntry
              prefetchEntry:
    0000000c:   FEFFFFEA            cdp2       p15, #0xf, c15, c15, c10, #7
    60                b   dataEntry
              dataEntry:
    00000010:   FEFFFFEA            cdp2       p15, #0xf, c15, c15, c10, #7
    61                b   phantomInterrupt

    In the past did see an issue where CCS didn't pass the --be32 option to the linker which caused the same failure, albeit was with the TI ARM Clang compiler - see TMS570LC4357: Use of TI Arm Clang Compiler

  • Hello Chester

    The output of a clean rebuild is attached. I remember seeing the 'endianness setting' in CCS (and it was be32), but I can't seem to remember where it is. Can you please point me? Also, as you can see, in the build output, there is no obvious signs of what endianness was used.

    Best,

    Durga

    **** Clean-only build of configuration Debug for project TMS570LC43x_LaunchPad_Project0 ****

    make clean
     
    rm -rf "TMS570LC43x_LaunchPad_Project0.hex" "TMS570LC43x_LaunchPad_Project0.out"
    rm -rf "source/HL_epc.obj" "source/HL_errata.obj" "source/HL_errata_SSWF021_45.obj" "source/HL_esm.obj" "source/HL_gio.obj" "source/HL_nmpu.obj" "source/HL_notification.obj" "source/HL_pinmux.obj" "source/HL_sys_core.obj" "source/HL_sys_dma.obj" "source/HL_sys_intvecs.obj" "source/HL_sys_main.obj" "source/HL_sys_mpu.obj" "source/HL_sys_pcr.obj" "source/HL_sys_phantom.obj" "source/HL_sys_pmm.obj" "source/HL_sys_pmu.obj" "source/HL_sys_startup.obj" "source/HL_sys_vim.obj" "source/HL_system.obj"
    rm -rf "source/HL_epc.d" "source/HL_errata.d" "source/HL_errata_SSWF021_45.d" "source/HL_esm.d" "source/HL_gio.d" "source/HL_nmpu.d" "source/HL_notification.d" "source/HL_pinmux.d" "source/HL_sys_dma.d" "source/HL_sys_main.d" "source/HL_sys_pcr.d" "source/HL_sys_phantom.d" "source/HL_sys_pmm.d" "source/HL_sys_startup.d" "source/HL_sys_vim.d" "source/HL_system.d"
    rm -rf "source/HL_sys_core.d" "source/HL_sys_intvecs.d" "source/HL_sys_mpu.d" "source/HL_sys_pmu.d"
    Finished clean
     

    **** Build Finished ****

    **** Build of configuration Debug for project TMS570LC43x_LaunchPad_Project0 ****

    make all
     
    Building file: "../source/HL_epc.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_epc.d_raw" --obj_directory="source"  "../source/HL_epc.c"
    Finished building: "../source/HL_epc.c"
     
    Building file: "../source/HL_errata.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_errata.d_raw" --obj_directory="source"  "../source/HL_errata.c"
    Finished building: "../source/HL_errata.c"
     
    Building file: "../source/HL_errata_SSWF021_45.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_errata_SSWF021_45.d_raw" --obj_directory="source"  "../source/HL_errata_SSWF021_45.c"
    Finished building: "../source/HL_errata_SSWF021_45.c"
     
    Building file: "../source/HL_esm.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_esm.d_raw" --obj_directory="source"  "../source/HL_esm.c"
    Finished building: "../source/HL_esm.c"
     
    Building file: "../source/HL_gio.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_gio.d_raw" --obj_directory="source"  "../source/HL_gio.c"
    Finished building: "../source/HL_gio.c"
     
    Building file: "../source/HL_nmpu.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_nmpu.d_raw" --obj_directory="source"  "../source/HL_nmpu.c"
    Finished building: "../source/HL_nmpu.c"
     
    Building file: "../source/HL_notification.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_notification.d_raw" --obj_directory="source"  "../source/HL_notification.c"
    Finished building: "../source/HL_notification.c"
     
    Building file: "../source/HL_pinmux.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_pinmux.d_raw" --obj_directory="source"  "../source/HL_pinmux.c"
    Finished building: "../source/HL_pinmux.c"
     
    Building file: "../source/HL_sys_core.asm"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_sys_core.d_raw" --obj_directory="source"  "../source/HL_sys_core.asm"
    Finished building: "../source/HL_sys_core.asm"
     
    Building file: "../source/HL_sys_dma.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_sys_dma.d_raw" --obj_directory="source"  "../source/HL_sys_dma.c"
    Finished building: "../source/HL_sys_dma.c"
     
    Building file: "../source/HL_sys_intvecs.asm"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_sys_intvecs.d_raw" --obj_directory="source"  "../source/HL_sys_intvecs.asm"
    Finished building: "../source/HL_sys_intvecs.asm"
     
    Building file: "../source/HL_sys_main.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_sys_main.d_raw" --obj_directory="source"  "../source/HL_sys_main.c"
    "../source/HL_sys_main.c", line 83: warning: statement is unreachable
    Finished building: "../source/HL_sys_main.c"
     
    Building file: "../source/HL_sys_mpu.asm"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_sys_mpu.d_raw" --obj_directory="source"  "../source/HL_sys_mpu.asm"
    Finished building: "../source/HL_sys_mpu.asm"
     
    Building file: "../source/HL_sys_pcr.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_sys_pcr.d_raw" --obj_directory="source"  "../source/HL_sys_pcr.c"
    Finished building: "../source/HL_sys_pcr.c"
     
    Building file: "../source/HL_sys_phantom.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_sys_phantom.d_raw" --obj_directory="source"  "../source/HL_sys_phantom.c"
    Finished building: "../source/HL_sys_phantom.c"
     
    Building file: "../source/HL_sys_pmm.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_sys_pmm.d_raw" --obj_directory="source"  "../source/HL_sys_pmm.c"
    Finished building: "../source/HL_sys_pmm.c"
     
    Building file: "../source/HL_sys_pmu.asm"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_sys_pmu.d_raw" --obj_directory="source"  "../source/HL_sys_pmu.asm"
    Finished building: "../source/HL_sys_pmu.asm"
     
    Building file: "../source/HL_sys_startup.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_sys_startup.d_raw" --obj_directory="source"  "../source/HL_sys_startup.c"
    Finished building: "../source/HL_sys_startup.c"
     
    Building file: "../source/HL_sys_vim.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_sys_vim.d_raw" --obj_directory="source"  "../source/HL_sys_vim.c"
    Finished building: "../source/HL_sys_vim.c"
     
    Building file: "../source/HL_system.c"
    Invoking: Arm Compiler
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --include_path="/home/durga/hercules/hercules_examples/Launchpad/570LS/570LC43/Project_0/include" --include_path="/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include" --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="source/HL_system.d_raw" --obj_directory="source"  "../source/HL_system.c"
    Finished building: "../source/HL_system.c"
     
    Building target: "TMS570LC43x_LaunchPad_Project0.out"
    Invoking: Arm Linker
    "/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 --enum_type=packed --abi=eabi -z --heap_size=0x800 --stack_size=0x800 -i"/opt/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/lib" --reread_libs --warn_sections --rom_model -o "TMS570LC43x_LaunchPad_Project0.out" "./source/HL_epc.obj" "./source/HL_errata.obj" "./source/HL_errata_SSWF021_45.obj" "./source/HL_esm.obj" "./source/HL_gio.obj" "./source/HL_nmpu.obj" "./source/HL_notification.obj" "./source/HL_pinmux.obj" "./source/HL_sys_core.obj" "./source/HL_sys_dma.obj" "./source/HL_sys_intvecs.obj" "./source/HL_sys_main.obj" "./source/HL_sys_mpu.obj" "./source/HL_sys_pcr.obj" "./source/HL_sys_phantom.obj" "./source/HL_sys_pmm.obj" "./source/HL_sys_pmu.obj" "./source/HL_sys_startup.obj" "./source/HL_sys_vim.obj" "./source/HL_system.obj" "../source/HL_sys_link.cmd"  -llibc.a
    <Linking>
    Finished building target: "TMS570LC43x_LaunchPad_Project0.out"
     

    **** Build Finished ****

  • Hello

    I found the endianness setting in CCS. It was set to 'big'. Setting it to 'be32' make the code run. However, I still don't see the LED blinking (as it was in the virgin board before I re-imaged the flash). In any case, I have a separate question now: on the 'Device endianness' setting in CCS, there are four choices:

    'big', 'little', 'be32' and 'be8'. My question is, what is the difference between 'big', 'be32' and 'be8'? Why are there not equivalents for little endian devices?

  • My question is, what is the difference between 'big', 'be32' and 'be8'?

    Code Composure Device Endianness options has some previous difference between those options.

    Differences between BE-32 and BE-8 buses from the ARM site has some more information, albeit it is from the ARM1156T2F-S Technical Reference Manual rather than for the Cortex-R5.

  • Thank you for your help. Let me debug some more as to why the LED is still not blinking (and the red 'ERR' LED sometimes comes up), and may be I will open a different support ticket on that. But being able to debug code on the target certainly helps.