Author Topic: I need a Debug output window (RS232)  (Read 29877 times)

Offline ILoveSpeccy

  • Single posting newcomer
  • *
  • Posts: 5
I need a Debug output window (RS232)
« on: May 04, 2012, 12:24:09 pm »
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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: I need a Debug output window (RS232)
« Reply #1 on: May 04, 2012, 12:26:55 pm »
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!]

Offline ILoveSpeccy

  • Single posting newcomer
  • *
  • Posts: 5
Re: I need a Debug output window (RS232)
« Reply #2 on: May 04, 2012, 01:51:06 pm »
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]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: I need a Debug output window (RS232)
« Reply #3 on: May 04, 2012, 01:55:02 pm »
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!]

Offline ILoveSpeccy

  • Single posting newcomer
  • *
  • Posts: 5
Re: I need a Debug output window (RS232)
« Reply #4 on: May 04, 2012, 02:23:07 pm »
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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: I need a Debug output window (RS232)
« Reply #5 on: May 04, 2012, 02:47:14 pm »
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!]

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: I need a Debug output window (RS232)
« Reply #6 on: May 04, 2012, 06:28:18 pm »
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).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: I need a Debug output window (RS232)
« Reply #7 on: May 04, 2012, 06:47:37 pm »
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!]

Offline ILoveSpeccy

  • Single posting newcomer
  • *
  • Posts: 5
Re: I need a Debug output window (RS232)
« Reply #8 on: May 04, 2012, 07:38:27 pm »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: I need a Debug output window (RS232)
« Reply #9 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.
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!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: I need a Debug output window (RS232)
« Reply #10 on: May 04, 2012, 08:44:04 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: I need a Debug output window (RS232)
« Reply #11 on: May 05, 2012, 11:13:37 am »
There are also a couple of separate programs to do that. And their scope is out of CBs.

Offline ziss_dm

  • Single posting newcomer
  • *
  • Posts: 4
Re: I need a Debug output window (RS232)
« Reply #12 on: May 10, 2012, 01:35:41 am »
Hi,

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

regards,
ziss_dm

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: I need a Debug output window (RS232)
« Reply #13 on: May 10, 2012, 08:50:33 am »
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!]

Offline ILoveSpeccy

  • Single posting newcomer
  • *
  • Posts: 5
Re: I need a Debug output window (RS232)
« Reply #14 on: October 10, 2012, 09:08:06 pm »
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