Skip to content

Add \r in retarget #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Add \r in retarget #125

wants to merge 1 commit into from

Conversation

Joey-Ye
Copy link

@Joey-Ye Joey-Ye commented Dec 13, 2013

Serial retarget doesn't output correctly in most of terminal emulator by default, as there is not \r. Output was
line 1
line 2
line 3
This patch adds \r before \n before sending to UART, which fixes the issue. Tested with linux screen and Windows putty.

@bogdanm
Copy link
Contributor

bogdanm commented Dec 13, 2013

Sorry to reject this, but changing the data sent by the user is generally not a good idea. Many terminal emulators have an option to automatically append '\r' to the incoming '\n', which should fix the problem.

@bogdanm bogdanm closed this Dec 13, 2013
@errordeveloper
Copy link

@Joey-Ye I was originally going to vote 👍 on this as an idea, but then looked at the code and do agree with @bogdanm.

What I think would be a good idea to have is a few debug logger macros, similar to:

    #define debug_logger(msg) \
          printf( "[%s:%d (%s)] %s\r\n", __FILE__, __LINE__, __func__, msg )
    #define debug_format(fmt, ...) \
          printf( "[%s:%d (%s)] "fmt"\r\n", __FILE__, __LINE__, __func__, __VA_ARGS__ )

yossi2le pushed a commit to yossi2le/mbed-os that referenced this pull request Jan 2, 2019
ARMmbed#125)

* Support Mbed Client Lite on Nucleo_F429ZI via internal_flash_fake_rot.json
lrusinowicz pushed a commit to lrusinowicz/mbed-os that referenced this pull request Feb 5, 2019
Updating mbed-os to mbed-os-5.8.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants