Other Parts Discussed in Thread: HALCOGEN, LAUNCHXL2-TMS57012
Tool/software: Code Composer Studio
I'm puzzled. How do you get a simple program to load and run on the TMS57012 Launchpad board?
Here's what I tried. I created a new project in CCS 7 and selected TMS570LS1224 as the Target, the TI v16.9.4.LTS compiler, and the "Hello World" project under "Basic Examples. This claims to "create an empty project fully initialized for the selected device."
I made a few simple changes to main (see below) and built the project. It built without errors. I then clicked on the bug icon in the toolbar to download and execute the program on the board, which also happens without error. The processor never gets to main(), and when I pause it, the PC is at 0x00000004. Disassembling memory starting at 0x00000000 I see .word 0xFFFFFFFF for the first eight words of memory. I'm not an expert on the Cortex-R4 by any means (I'm more of a Cortex-M guy), but isn't the vector table supposed to be located starting at 0x00000000 and contain instructions like "ldr pc,=reset_handler"?
Why hasn't the project created a vector table at 0x00000000? I do see valid assembly instructions starting at 0x00000020 that look like a mem copy routine.
Looking at the map file I see that it creates only one memory area called RAM starting at 0x00000020 and 4GB in size. There're no FLASH areas at all. I also don't see any section starting at 0x000000 (which is typically called something like _vectors on other development systems I used.
Why doesn't creating a project using the "Basic Examples" create a project with a sensible memory layout for the target processor and create a valid vector table so the processor can start up properly?
int main(void) { volatile int loops = 0; while(1) loops++; return 0; }