How to display serial output in CCS or IAR? (and input ADC test values) - Page 1
Forum section: electronics / general

author: planc
author_rank: Regular Contributor
timestamp: January 12, 2023, 11:09:56 pm
content: For those using any MCU, how do you display serial output in CCS or IAR? I could do it back at the discontinued HC11 and THRSIM11 like in the following screenshot:The Serial_receiver with the "Buffalo.." words are serial output of the program. It is not attached to the Target. How to do it with CCS, IAR, or other programs (either attached or not).Also note the Sliders E-port at the center of the screenshot, You could put any value to the ADC pin no. (from 0 to 7). How do you do this at CCS, IAR and others too?I don't have account at TI because I don't have company email address, so can't ask there.If you could. Please ask them there too at CCS forum (try creating TI account if you happen to have a company email address. Many thanks!.

author: ataradov
author_rank: Super Contributor
timestamp: January 12, 2023, 11:54:09 pm
content: Use TeraTerm or any other terminal emulator. Why do you need this to be in the IDE?

author: planc
author_rank: Regular Contributor
timestamp: January 13, 2023, 12:19:25 am
content: Quote from: ataradov on January 12, 2023, 11:54:09 pmBecause I'm debugging it step by step against the terminal output.

author: ataradov
author_rank: Super Contributor
timestamp: January 13, 2023, 12:28:49 am
content: Ok, but you will still see the same exact thing. It is just a standalone tool that can receive characters from a serial port, just like your embedded one.

author: Phoenix
author_rank: Frequent Contributor
timestamp: January 13, 2023, 12:56:14 am
content: CCS has a built in terminalhttps://software-dl.ti.com/ccs/esd/documents/ccs_terminal_view.html

author: planc
author_rank: Regular Contributor
timestamp: January 13, 2023, 01:19:48 am
content: Guys. You mean the output of the serial in CCS or IAR debugging is real time with real signal coming out of the serial ports based on the real program? Meaning if it's MCU controlling a warhead, it can explode?I was only familiar with THRSim1 in which the running codes are all in simulation. It's not possible to run CCS and IAR like THRSim1 in which all the input and out are just simulations?

author: ataradov
author_rank: Super Contributor
timestamp: January 13, 2023, 01:37:14 am
content: It is just a terminal. It receives the characters from a COM port and displays that. It does not care how you send them. What does this have to do with warheads?There is no purely software simulators in CSS or IAR. It is generally hard to accurately simulate complex MCUs and all the peripherals.Ok, I just realized that THRSIM11 is a simulator. No, this does not exist for modern MCUs, not even close.

author: planc
author_rank: Regular Contributor
timestamp: January 13, 2023, 03:31:07 am
content: Yes the terminal inside CSS works like external terminal as I tried now. Thank.But something puzzling. The Target is running normally and communicating with the serial terminal in normal bootup and not in slow motion even with the step by step debugger running..I thought running CSS debugger was supposed to freeze the chip from running. So there is 2 thing going at the same time. The chip running normal and the dubugger via JTAG debugging step by step? So there are 2 instances of the firmware running? One normal and the other in step by step debug slow motion??

author: ataradov
author_rank: Super Contributor
timestamp: January 13, 2023, 03:38:42 am
content: There is one instance of the firmware. If the firmware execution is paused, then nothing runs. But the bytes are send by the peripheral on its own, so the last byte that was sent to the peripheral would be received completely and without interruptions.If you are observing something else, you need to provide more details.And also what di you mean by "step by step debugger running". Are you actually stepping through the program at that time or you are just running under the debugger without pausing the execution.

author: planc
author_rank: Regular Contributor
timestamp: January 13, 2023, 06:41:10 am
content: Ok got it.However, note I attached the CSS12 to a msp430 target without any source code (that is by choosing Load symbols ok as shown in screenshot above). I was able to view the disassembly window and see the disassemble code direct from the machine code. I was able to make it run, suspend and terminate at the built in serial Terminal. How do you make the disassembly window display the address line by line while the line is being run continuously. When suspended, I could click step over and step into and it shows line by line, one line at a time, no problem. But I want the running chip to show what address is being run (while resuming) in the flash without any source code. Thanks.

author: ataradov
author_rank: Super Contributor
timestamp: January 13, 2023, 06:50:12 am
content: I'm not familiar with MSP430 and CCS specifically, but debugging without the source code is a very common feature of the modern tools.The MCU runs very fast, what is the point of displaying the current address? It would be just a blur. If you mean periodic steps at some slow and human-observable rate, I have no seen that in any IDEs. This is not useful for debugging in most cases. You can somewhat simulate this by pressing a single step key/button.

author: planc
author_rank: Regular Contributor
timestamp: January 13, 2023, 09:04:07 am
content: Quote from: Phoenix on January 13, 2023, 12:56:14 amHow do you access the serial terminal at IAR Workbench?Also IAR Workbench has Autostep option in Debug mode where for example Step Over moves line by line after adjustable delay (like 10 milliseconds). Doesn't CSS have any auto step?? (where is it?)Thanks.

author: ataradov
author_rank: Super Contributor
timestamp: January 13, 2023, 04:41:11 pm
content: There is no internal termina in IAR. This is why it is better to use one external tool that would work in all cases.Yes, there is auto stepping in IAR. Seems pretty pointless to me, but sure, why not.