I can successfully create, compile and launch a TI-RTOS demo for my MSP-EXP430F5529LP unit, but the project will not debug. I can use TI-RTOS for the TM4C1294 just fine, what do you I need to adjust to enable debugging for the 5529 too?
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.
I can successfully create, compile and launch a TI-RTOS demo for my MSP-EXP430F5529LP unit, but the project will not debug. I can use TI-RTOS for the TM4C1294 just fine, what do you I need to adjust to enable debugging for the 5529 too?
My sentiments exactly my apology, this was posted while frustrated.
The code compiles and flashes to the processor, then the ide just kind of hangs in idle, like its free running but you can’t see anything happening.
Let me know how best to help proceed, this confused me!
1) I sometimes see CCS take a long time (1-2 minutes) to go from loading-done to "Suspended" -- the traceback window just fills in very slowly.
2) I've seen cases where the debugger goes directly to "Running". This usually means I've set something (usually a Project setting) so wrong that my program can't reach the breakpoint at main(). Pause the program, then push the Hard Reset button in the Toolbar to take you back to the reset vector. Then step through the initialization (it's not long) to see if you get to main().
I thought it would be easy to find the TI-RTOS MSP430 examples in TI-Rex, but I don't see them. Where did you find yours?
I get the following message, hangs for over 10min -
After installing the TI-RTOS SDK you can find it here -
thoughts?
Did you try what I suggested in step (2) above? I can't really tell you what to look for, but I expect it will stand out. It also probably won't take long. If your program reaches main() then we're looking at something different.
[Edit: My CCS won't build the Empty ("blinky") project -- something about a version conflict with xdctools. I probably won't be able to do any experiments tonight. I still think it's significant that your program (evidently) isn't reaching main().]
Justin,
From looking at your "Debug" and "Console" picture, it seems like all you need to do is click the "TI MSP430 USB1/MSP430 (Running)" text which will then allow you to pause and step through the code just like Bruce is referencing above. I've placed a red box around the text that you need to click on in order to connect to the debug target:
Usually a project's settings are set up in a way that forces the code to hit a hardware breakpoint at the beginning of main() but the default settings in the project you are using may be different. To fix these you would need to go into the debug settings in the project properties window:
Best regards,
Matt
Justin,
I don't see anything wrong with the window snip you provided above. You should be able to click on the "pause" button and then the debugger will show you where in the code the program is at. Have you tried this?
-Matt
Justin,
I did not see the rest of your post, my apologies. Let me look a little further into this and get back to you in a day. Could you provide a screen shot of your debug settings?
-Matt
Maybe I missed something -- it looks to me as though you succeeded in pausing the program. What do you get from a Hard Reset now?
I think you might see this "executing at 0x4" if, e.g. the reset vector up at 0xfffe wasn't right. It would just keep resetting over and over and you wouldn't get to main().
interesting! When selecting the active target as you mention, the pause button then comes up! sheesh, thank you :)
With this I can now step into _c_int00(). Here it hangs on _auto_init(), it appears this source is not included? My project appears configured for BIOS 6.45.02.31, version 'v4.4' of auto_init() does this sound correct?
Here is what I see -
If you set a breakpoint at the next line ("System_exit()"), does it reach that?
It looks like you found the source for pre_init. What does that do?
Something to spot-check: Is "Build Options->Build->Linker->Basic->Hold watchdog" set to "on"?
There's source for autoinit_4.4.c alongside boot_4.4.c in
C:\ti\tirtos_msp43x_2_20_00_06\products\bios_6_46_00_23\packages\ti\targets\msp430\rts430
I'm not quite sure why CCS isn't finding that.
From what you're saying, you're hanging in auto_init, which is why you're not getting to main (and thus "Running"). (Set a breakpoint at _c_int00, just in case you're resetting over and over.)
I don't know offhand why it would hang in auto_init. This is non-standard library code, so we probably need a TI-RTOS Wizard. [Anyone?]
Justin,
Are you getting any warnings when you compile about the project being built using another compiler? I'm wondering if these issues are stemming from you using a different compiler than the project was based off of.
Best regards,
Matt
Interesting feedback and thoughts, I really appreciate your help thank you Matt & Bruce. This is fun too, kind of enjoying it!
No warnings when compiled, see attached for recent console output. I see autoinit_4.4.c and have browsed there much, I also have v4.2 & v2.1.
This console output doesn't make sense, thoughts?
**** Build of configuration Debug for project rtos ****
"C:\\Sw\\ti\\ccs910\\ccs\\utils\\bin\\gmake" -k -j 4 all -O
Building file: "../empty_min.cfg"
Invoking: XDCtools
"C:/Sw/ti/lib/tirex/xdctools_3_32_00_06_core/xs" --xdcpath="C:/Sw/ti/lib/tirtos_msp43x_2_16_01_14/packages;C:/Sw/ti/lib/tirtos_msp43x_2_16_01_14/products/bios_6_45_02_31/packages;C:/Sw/ti/lib/tirtos_msp43x_2_16_01_14/products/tidrivers_msp43x_2_16_01_13/packages;C:/Sw/ti/lib/tirtos_msp43x_2_16_01_14/products/uia_2_00_05_50/packages;" xdc.tools.configuro -o configPkg -t ti.targets.msp430.elf.MSP430X -p ti.platforms.msp430:MSP430F5529 -r release -c "C:/Sw/ti/ccs910/ccs/tools/compiler/ti-cgt-msp430_19.6.0.STS" --compileOptions "-vmspx --data_model=restricted --use_hw_mpy=F5 --include_path=\"C:/Sw/ti/ccs910/ccs/ccs_base/msp430/include\" --include_path=\"D:/Documents/MyWorkspaces/CCS/Motusi/rtos\" --include_path=\"D:/Documents/MyWorkspaces/CCS/Motusi/rtos\" --include_path=\"C:/Sw/ti/lib/tirtos_msp43x_2_16_01_14/products/msp430_driverlib_2_21_00_08a/driverlib/MSP430F5xx_6xx\" --include_path=\"C:/Sw/ti/ccs910/ccs/tools/compiler/ti-cgt-msp430_19.6.0.STS/include\" --advice:power=all --advice:power_severity=suppress --define=__MSP430F5529__ --define=ccs --define=MSP430WARE -g --printf_support=minimal --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --abi=eabi --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 " "../empty_min.cfg"
making package.mak (because of package.bld) ...
generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
configuring empty_min.xe430X from package/cfg/empty_min_pe430X.cfg ...
generating custom ti.sysbios library makefile ...
generating custom ti.sysbios.family.msp430 Hwi stubs ...
Starting build of library sources ...
making D:/Documents/MyWorkspaces/CCS/Motusi/rtos/src/sysbios/sysbios.ae430X ...
gmake[1]: Entering directory `D:/Documents/MyWorkspaces/CCS/Motusi/rtos/src/sysbios'
cle430X C:/Sw/ti/lib/tirtos_msp43x_2_16_01_14/products/bios_6_45_02_31/packages/ti/sysbios/BIOS.c ...
asme430X C:/Sw/ti/lib/tirtos_msp43x_2_16_01_14/products/bios_6_45_02_31/packages/ti/sysbios/family/msp430/Hwi_switch_asm.asm ...
asme430X C:/Sw/ti/lib/tirtos_msp43x_2_16_01_14/products/bios_6_45_02_31/packages/ti/sysbios/family/msp430/TaskSupport_asm.asm ...
are430X BIOS.obj msp430_Hwi_switch_asm.obj msp430_TaskSupport_asm.obj ...
gmake[1]: Leaving directory `D:/Documents/MyWorkspaces/CCS/Motusi/rtos/src/sysbios'
Build of libraries done.
cle430X package/cfg/empty_min_pe430X.c ...
"package/cfg/empty_min_pe430X.c", line 8533: warning #112-D: statement is unreachable
"package/cfg/empty_min_pe430X.c", line 9019: warning #112-D: statement is unreachable
"package/cfg/empty_min_pe430X.c", line 9293: warning #112-D: statement is unreachable
"package/cfg/empty_min_pe430X.c", line 9474: warning #112-D: statement is unreachable
Finished building: "../empty_min.cfg"
1 file(s) copied.
making ../src/sysbios/sysbios.ae430X ...
gmake[1]: Nothing to be done for 'all'.
Building file: "../empty_min.c"
Invoking: MSP430 Compiler
"C:/Sw/ti/ccs910/ccs/tools/compiler/ti-cgt-msp430_19.6.0.STS/bin/cl430" -vmspx --data_model=restricted --use_hw_mpy=F5 --include_path="C:/Sw/ti/ccs910/ccs/ccs_base/msp430/include" --include_path="D:/Documents/MyWorkspaces/CCS/Motusi/rtos" --include_path="D:/Documents/MyWorkspaces/CCS/Motusi/rtos" --include_path="C:/Sw/ti/lib/tirtos_msp43x_2_16_01_14/products/msp430_driverlib_2_21_00_08a/driverlib/MSP430F5xx_6xx" --include_path="C:/Sw/ti/ccs910/ccs/tools/compiler/ti-cgt-msp430_19.6.0.STS/include" --advice:power=all --advice:power_severity=suppress --define=__MSP430F5529__ --define=ccs --define=MSP430WARE -g --printf_support=minimal --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --abi=eabi --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --preproc_with_compile --preproc_dependency="empty_min.d_raw" --cmd_file="configPkg/compiler.opt" "../empty_min.c"
Finished building: "../empty_min.c"
Building file: "../MSP_EXP430F5529LP.c"
Invoking: MSP430 Compiler
"C:/Sw/ti/ccs910/ccs/tools/compiler/ti-cgt-msp430_19.6.0.STS/bin/cl430" -vmspx --data_model=restricted --use_hw_mpy=F5 --include_path="C:/Sw/ti/ccs910/ccs/ccs_base/msp430/include" --include_path="D:/Documents/MyWorkspaces/CCS/Motusi/rtos" --include_path="D:/Documents/MyWorkspaces/CCS/Motusi/rtos" --include_path="C:/Sw/ti/lib/tirtos_msp43x_2_16_01_14/products/msp430_driverlib_2_21_00_08a/driverlib/MSP430F5xx_6xx" --include_path="C:/Sw/ti/ccs910/ccs/tools/compiler/ti-cgt-msp430_19.6.0.STS/include" --advice:power=all --advice:power_severity=suppress --define=__MSP430F5529__ --define=ccs --define=MSP430WARE -g --printf_support=minimal --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --abi=eabi --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --preproc_with_compile --preproc_dependency="MSP_EXP430F5529LP.d_raw" --cmd_file="configPkg/compiler.opt" "../MSP_EXP430F5529LP.c"
Finished building: "../MSP_EXP430F5529LP.c"
making ../src/sysbios/sysbios.ae430X ...
gmake[2]: Nothing to be done for 'all'.
Building target: "rtos.out"
Invoking: MSP430 Linker
"C:/Sw/ti/ccs910/ccs/tools/compiler/ti-cgt-msp430_19.6.0.STS/bin/cl430" -vmspx --data_model=restricted --use_hw_mpy=F5 --advice:power=all --advice:power_severity=suppress --define=__MSP430F5529__ --define=ccs --define=MSP430WARE -g --printf_support=minimal --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --abi=eabi --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 -z -m"rtos.map" --heap_size=160 --stack_size=160 --cinit_hold_wdt=on -i"C:/Sw/ti/ccs910/ccs/ccs_base/msp430/include" -i"C:/Sw/ti/ccs910/ccs/ccs_base/msp430/lib/5xx_6xx_FRxx" -i"C:/Sw/ti/ccs910/ccs/tools/compiler/ti-cgt-msp430_19.6.0.STS/lib" -i"C:/Sw/ti/ccs910/ccs/tools/compiler/ti-cgt-msp430_19.6.0.STS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="rtos_linkInfo.xml" --use_hw_mpy=F5 --rom_model -o "rtos.out" "./MSP_EXP430F5529LP.obj" "./empty_min.obj" "../MSP_EXP430F5529LP.cmd" -l"configPkg/linker.cmd" -llibmath.a -l"C:/Sw/ti/lib/tirtos_msp43x_2_16_01_14/products/msp430_driverlib_2_21_00_08a/driverlib/MSP430F5xx_6xx/ccs/MSP430F5529.lib" -llibc.a
<Linking>
Finished building target: "rtos.out"
**** Build Finished ****
If you've been stepping through auto_init, do you see where it hangs?
And do I understand correctly that when it hangs in auto_init, the "pause" button is inoperative? (Did you try actually pressing it? Sometimes it looks dim but still works.)
Those "statement unreachable" warnings may not be significant. Glancing at BIOS.c it looks like one possible failure mode is a (deliberate) "while(1);" which would probably generate that warning.
Hm. Sure looks like a "CALLA 0". I haven't tried this recently, but as I recall this generates a reset (trying to execute in the SFR space down at 0x0000). It's funny it didn't hit your breakpoint at _c_int00.
My first thought is that this looks like an (undiagnosed) missing external reference, which the linker should have fussed about. Does "Debug/rtos.map" say anything about _auto_init? I don't see any particularly unusual linker options.
thoughts? I would like to get TI-RTOS up on my 5529 Launchpad, let me know if this is possible.
Sorry, I have no further thoughts. My CCS won't build the Empty example (insists on using the wrong xdctools) and I haven't been able to discern what xdctools is actually doing, so I don't know what's wrong.
TI monitors the Forum, so I expect a TI-RTOS wizard will show up eventually.
Hi Justin,
I am going to go ahead and loop in another TIer who will be able to provide further support regarding TI-RTOS. Thank you for your patience and please allow a couple days for them catch up on this thread and to formulate a response.
Best regards,
Matt
Hi Matt,
No hurries, greatly appreciated! This use case is a testing unit for us, lower priority as such. Let me know what you find!
Hi Justin,
Can you use the compiler version that was recommended in the TI-RTOS release notes? We've seen some issues with newer versions of the compiler. You can get different compiler versions here: https://www.ti.com/tool/TI-CGT
Todd
Great thoughts Todd, I tried this now with v4.48 and it worked!
The first time, all the way to a breakpoint in the thread, the first time. Now I see this -
thoughts? This occurs over multiple units and multiple setup configs
Hi Todd,
Well that was a fun one, today I came in and now this works, for all scenarios described prior!!
For future context, I am using -
Todd & team, thank you so much for your time and help here. I love the 5529 it is my backbone for embedded dev activities, not having TI-RTOS was painful. Fixed now, thank you guys!
**Attention** This is a public forum