News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

I need a Debug output window (RS232)

Started by ILoveSpeccy, May 04, 2012, 12:24:09 PM

Previous topic - Next topic

ILoveSpeccy

Hi all,

CodeBlocks is a really great IDE! I use it for embedded programming. But I'd like one more thing: a window for debug output (RS232). I imagined it as a second console window. Is there a way to code block to do that?

Best regards,
ILoveSpeccy

oBFusCATed

You'll have to explain better what exactly do you want.
Your current explanation is not sufficient.

BTW: If you've not tried the recent nightlies, I suggess to do so, there are plenty of improvements related to the debugger, especially geared towards remote debugging.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ILoveSpeccy

I want to see RS232 output in a separate window.
As an example, I added a picture. I use a program called "plink.exe" (PuTTY project). The output should be redirected to this window.

Best regards

[attachment deleted by admin]

oBFusCATed

Is this possible with command line gdb?
Can you post the full debug session log of the debugger?

What is the purpose of this window?

p.s. please don't attach images to the forum directly, but use an image sharing service. The space on the forum is limited and attachments get randomly deleted...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ILoveSpeccy

The microcontroller runs a program that sends messages to UART using PRINTF. (For me this is still the best debug option  :))
And these messages are displayed in the window. That's all I need.

Best regards

oBFusCATed

You have to describe it lots of detail if you want this implemented.
Keep in mind that I'm not embedded programmer and I've never programmed embedded devices (except arduino, but it doesn't count).

So please describe the whole setup you're using at the moment also please answer all unanswered question from my previous post.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

scarphin

I think he wants an output that shows the serial port (rs232) packets formatted in various ways. Like for example when a program is communicating with a USB memory, there are lots of packets coming in and out in the USB bus. He wants to see these packets in a window on CB but for the serial port (rs232).

oBFusCATed

OK, but how do I capture them? I want details.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ILoveSpeccy

So, it's easy ... :)
I see two possibilities to realize it:
1. Open a COM port and receive the strings. The characters (ASCII 32-255) will be displayed in this window. A new row is started with "\ n". (A simple terminal, I need only receiver)
2. It runs an external program. The program writes to "stdout", which is received via COM port. This information should be forwarded to the desired CodeBlocks-window.

I prefer the second possibility. I am very flexible with it.
I do not need formatting or otherwise. Simply display.

Best regards
ILoveSpeccy

P.S. sorry for my English.

oBFusCATed

1). It won't be implemented*, because COM handling is not an easy thing to do, it is even harder to do it cross platform way.
2). What is the benefit here? As far as I can see you can run your tool in a terminal and then inspect its output there.
     You can setup a tool which you can start from C::B (see Tools->Configure tools...)

* This is at least someone else, with a lot of free time and desire to implement it and maintain it in the long run, steps up.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MortenMacFly

Quote from: oBFusCATed on May 04, 2012, 07:47:48 PM
1). It won't be implemented*, because COM handling is not an easy thing to do, it is even harder to do it cross platform way.
There is the CTB library, which I use successful in my personal (cross-platform) projects. but we shouldn't compete with a full-featured terminal program if you can embed it as a simple tool.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

scarphin

There are also a couple of separate programs to do that. And their scope is out of CBs.

ziss_dm

Hi,

I think, it would be useful, to define tool with input/output redirected to the C:B console.  :)

regards,
ziss_dm

oBFusCATed

What console? We don't have console integrated in C::B's UI. Do you mean to a log window?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ILoveSpeccy

Hello,

brief response from me,
I have solved my problem with Tools+ Plugin. It is exactly what I needed.
I made small changes in the source code: have the font in the "Tools +" window to "Courier New, size 9" changed.
Thanks to the author of the plugin!

Greetings
ILoveSpeccy