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.
Hello all,
I am programming MSP430F370 in CCSv5.3. I am trying to print something using 'printf' function. But, the problem is that I can't see any CIO option in console as can be seen in the figure below. How to set the console so that it will show the CIO console of the program.
And in code limited version of CCS it says,"Only 16 KB size of code can be loaded". What does size of code actually mean?
I appreciate your help. :-)
Best regards.
Hi,
A few comments.
FIrst, some msp430 parts are not able to handle printf simple due to the limited space and processing availability. The most common item is to increase the stack/heap size and make sure printf support is fully enabled.
This wiki will hopefully help:
http://processors.wiki.ti.com/index.php/Printf_support_for_MSP430_CCSTUDIO_compiler
The code size limited license limits you to 16kB of object code on the device. This includes libraries, your code etc. Does this help? When you build, a .map file should be generated showing the full details of code size and breakdown into the memory segments.
Best REgards,
LIsa
Hello,
Thank you for your quick response.
I had already made settings according to this Wiki article. But, it still isn't working. I can't even see the CIO console option in console.Do I need to generate .bin or .hex file for the program?
Yes, I understood about the code size limits. But, I was unable to determine the object code size from the .map file. Is it the size of main.obj file?
Hi,
the limitation is the total of any object code being loaded to the device.
Regarding the output.... you need to be in a debug session with the target running. Can you confirm/send screen captures?
Best Regards,
Lisa
Hi,
I think the screen shot in the very first post is of the CCS debug session running on the target TRF7970a EVM. Correct me if I am mistaken.
Regards.
Yes you are correct, my appologies. I would like to try myself but I don't have that msp available and the larger boards I have work fine.
What settings do you have selected? (Debug settings, printf settings in particular)
Best Regards,
Lisa
I have, in particular
- Enabled CIO function use
- Set level of printf support to full
- Set stack size 160, heap size 320 and Link in hardware version to F5.
Is there anything else to be configured?
Hi,
we expect your configuration should work and I have actually run this by colleagues now as well. Some of the only further thoughts we have at the moment
- verify <stdio.h> is indeed included
- try increasing the heap a little more but what you have set seems fine
Best Regards,
Lisa
Hello,
Hopefully, I found the solution. It was a silly mistake. I was using an old compiler version for the program created using a version 4.1.2.
After I changed the compiler version to 4.1.2, the CIO console window is working just fine.
Thank you very much for your support.
Best regards
Hi,
great, very happy to hear and thanks for the updae.
All the best with development.
Best Regards,
Lisa
Hello,
It seems that I have got another problem using printf. When I try to print "test" in the endless while loop in "main.c", it prints the string for some time and then it states the error "Can't find a source file at "/tmp/TI_MKLIB3cHxjO/SRC/trgmsg.c" ". It was working just fine yesterday and now it says something like this. Can you please help me?
Thank you.
Best regards.
Hi,
first I should just comment that it is always best to put new questions/issues in a new post. This helps us to help you more efficiently.
Now, regarding this new issue ... I am wondering if the endless loop has caused some overflow or corruption somehow. You can try a fresh workspace, import the project and make sure to do your best to keep the memory and files well controled.
Best Regards,
Lisa
Hello,
I will keep that in mind next time onwards.
And regrading the issue, the reason behind that, as I found out, was the hardware beakpoint. I disabled the hardware breakpoint and it is working fine now.
Thank you very much.
Best regards.
Hi,
ok, glad to hear you found the issue and thanks for the update.
All the best with development.
Best Regards,
Lisa