Arduino IDe upload verbose parameters
-
- Posts: 505
- Joined: Fri Dec 27, 2019 4:53 pm
- Location: Munich, Germany
- Contact:
Arduino IDe upload verbose parameters
Hi,
does someone know which parameters can be used as upload.verbose in platform.txt and what is their effect?
In the platform specification I could only find few lines but they do not answer my question.
My problem is that even if i checked the verbose by upload option in Adruino preferences, the std outputs generated during upload are only printed in one piece, after the upload process finished.
Is it possible to get all upload std output lines one by one at the time they are generated displayed in Arduino message window? If yes, how?
does someone know which parameters can be used as upload.verbose in platform.txt and what is their effect?
In the platform specification I could only find few lines but they do not answer my question.
My problem is that even if i checked the verbose by upload option in Adruino preferences, the std outputs generated during upload are only printed in one piece, after the upload process finished.
Is it possible to get all upload std output lines one by one at the time they are generated displayed in Arduino message window? If yes, how?
if your uploader is written on c/c++, try to use setbuf(stdout, NULL) before first printf
it will prevent stdout buffering
Go to full postit will prevent stdout buffering
Re: Arduino IDe upload verbose parameters
I don't know how it is managed anyway for some upload methid it seems output line by line.stevestrong wrote: Thu May 07, 2020 9:11 pm
Is it possible to get all upload std output lines one by one at the time they are generated displayed in Arduino message window? If yes, how?
For example when upload has a text progress bar.
Which upload method you want output?
I guess for your bootloader?
How do you print your message? On which stdio?
-
- Posts: 505
- Joined: Fri Dec 27, 2019 4:53 pm
- Location: Munich, Germany
- Contact:
Re: Arduino IDe upload verbose parameters
Yes, that is for my CDC bootloader.
I use normal printf. Isn't that right?
What do you mean under "which stdio"?
What should I use instead?
I use normal printf. Isn't that right?
What do you mean under "which stdio"?
What should I use instead?
Re: Arduino IDe upload verbose parameters
Stderr, stdout.
Do you end with "\n"?
I don't remember but maybe you can force a flush
Do you end with "\n"?
I don't remember but maybe you can force a flush
Re: Arduino IDe upload verbose parameters
if your uploader is written on c/c++, try to use setbuf(stdout, NULL) before first printf
it will prevent stdout buffering
it will prevent stdout buffering
Last edited by stas2z on Fri May 08, 2020 10:43 am, edited 1 time in total.
-
- Posts: 505
- Joined: Fri Dec 27, 2019 4:53 pm
- Location: Munich, Germany
- Contact:
Re: Arduino IDe upload verbose parameters
I use Eclipse and MinGW for the development. There is no stdout.h
Of course I use \n when needed.
It works correctly when executed in a CMD window.
Only Arduino IDE message window is not updating the outputs in real time.
Of course I use \n when needed.
It works correctly when executed in a CMD window.
Only Arduino IDE message window is not updating the outputs in real time.
Re: Arduino IDe upload verbose parameters
no) stdout and stderr are posix output streams, probably for mingw it will not make any sense, by default printf should output to stdoutstevestrong wrote: Fri May 08, 2020 10:41 am I use Eclipse and MinGW for the development. There is no stdout.h
-
- Posts: 505
- Joined: Fri Dec 27, 2019 4:53 pm
- Location: Munich, Germany
- Contact:
Re: Arduino IDe upload verbose parameters
I also tried fprintf(stderr, ...) but no chance, the same effect.
For example, output in CMD in real time:
vs output in Arduino (at the end of process):
This has inverted output and doubled last line...
For example, output in CMD in real time:
Code: Select all
Trying to reset port COM22 or find bootloader on [1eaf:0002]
.....
ERROR: Could not establish communication with the device. Giving up.
Code: Select all
.....
Trying to reset port COM22 or find bootloader on [1eaf:0002]
ERROR: Could not establish communication with the device. Giving up.
ERROR: Could not establish communication with the device. Giving up.
Last edited by stevestrong on Fri May 08, 2020 10:58 am, edited 5 times in total.
Re: Arduino IDe upload verbose parameters
Try setbuf, if it will not work, the only way is to modify ide to prevent console buffering there
-
- Posts: 505
- Joined: Fri Dec 27, 2019 4:53 pm
- Location: Munich, Germany
- Contact:
Re: Arduino IDe upload verbose parameters
I just tried setbuf, no improvement.