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.

CCS6 TMS570 hello world application - no intvects

Other Parts Discussed in Thread: HALCOGEN

I have TMS570LC43x launchpad evaluation board and I am trying to run simple application using CCS6 (6.1.2 and 6.2) 

Steps:

New => CCS Project

Target: TMS570LC43xx

Connection: Texas Instruments XDS110 USB Debug Probe

Compiler: TI v15 12.3.LTS

Teplates ( I tried: 1.Empty Project, 2.Empty Project with main.c, 3.Hello World)

 Linker command file: TMS570LC43xxFlashLnk.cmd

Runtime support library: rtsv7R4_T_be_v3D16_eabi.lib

Project configured in this way compile with success. But there is a problem. intvects section is :

00000000: FFFFFFBF .word 0xffffffbf
00000004: FFFFFFFF .word 0xffffffff
00000008: FFFFFFFF .word 0xffffffff
0000000c: FFFFFFDF .word 0xffffffdf
00000010: FFFFFFFF .word 0xffffffff
00000014: FFFFFFFE .word 0xfffffffe
00000018: 7FFFFF5F svcvc #0xffff5f
0000001c: FFFFFFFF .word 0xffffffff

so processor spins on 00000004 HardFault 

In output file there are  symbols like c_int00.

If I set pc to c_int00 the processor fetches and executes program until crash about 20 instruction later. 

Can You help me run simple application?

  • Jacek,

    You need to use HalCoGen to generate the device startup code that gets you to main.   This includes using HalCoGen's interrupt vector table and all the device initialization code. 

    This code doesn't ship with the TI ARM compiler runtime support library.   That library isn't hardware specific.    On a lot of other ARM parts that may not matter so much but on the LC4357 with all of the protection like dual core lockestep, ecc on memories, etc.  if you don't initialize the silicon correctly you'll just wind up frustrated with errors and you'll never get to main.

    So to make a "Hello World" create an empty project using the CCS project wizard.

    Then use HalCoGen to generate startup code for the device.  All you really need to do is accept the default of a HalCoGen LC4357 project and hit the generate button.


    Then, in the output folder there is a main() function in HL_sysmain.c.  You can put your  'hello world' printf there in the /* User Code */ section inside main, then build the sources and you'll be up and running w. Hello World.


    That's really the *only* way to do it aside from starting from scratch with your own init code and that would require months of effort.