Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
This code stops working (crashes, stops at "b dataEntry") when you create a HalCoGen project with FreeRTOS (you don't have to use FreeRTOS for this to occur):
uint32_t id = 0x14FF01EF; float internalVoltage = 22750.0; int8_t intTempC = 25; char buffer[150]; int len = sprintf(buffer, "(0x%08x) internal voltage: %4.2f internal temp: %d\r\n", (int)id, internalVoltage, intTempC); puts(buffer);
I tracked it down to "HL_sys_core.asm". The section at line 162-167, switches from this (no FreeRTOS):
userSp .word 0x08000000+0x00001000 svcSp .word 0x08000000+0x00001000+0x00000100 fiqSp .word 0x08000000+0x00001000+0x00000100+0x00000100 irqSp .word 0x08000000+0x00001000+0x00000100+0x00000100+0x00000100 abortSp .word 0x08000000+0x00001000+0x00000100+0x00000100+0x00000100+0x00000100 undefSp .word 0x08000000+0x00001000+0x00000100+0x00000100+0x00000100+0x00000100+0x00000100
to this (with FreeRTOS):
userSp .word 0x08000000+0x00000300 svcSp .word 0x08000000+0x00000300+0x00000100 fiqSp .word 0x08000000+0x00000300+0x00000100+0x00000100 irqSp .word 0x08000000+0x00000300+0x00000100+0x00000100+0x00000100 abortSp .word 0x08000000+0x00000300+0x00000100+0x00000100+0x00000100+0x00000100 undefSp .word 0x08000000+0x00000300+0x00000100+0x00000100+0x00000100+0x00000100+0x00000100
I cannot find these values or any mention of them in any of the PDFs or in the forums. The function is "Initialize Stack Pointers" -- which makes sense why it's affecting sprintf.
How can you set these values so that sprintf works as well as FreeRTOS?