Skip to content
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

minimal_printf: Fix high level C functions that print to the console #11728

Merged

Conversation

hugueskamba
Copy link
Collaborator

Description

Ensure the file descriptor stdout is passed to fputc when the high
level C functions to print to the console are referenced.
This issue fixed only affected binaries built with the ARM toolchain.

To reproduce the bug.

  1. Build mbed-os-example-blinky and program your target with the following command
$ mbed compile -t ARM -m <TARGET> --profile develop --profile mbed-os/tools/profile/extension/minimal_printf.json -f
  1. Open a terminal to view the serial output of the target. It should display an incorrect out similar to:
=============================== SYSTEM INFO ================================
Parameter err� 

With the fix the output is similar to:

=============================== SYSTEM INFO  ================================
Mbed OS Version: 999999 
CPU ID: 0x410fc241 
Compiler ID: 2 
Compiler Version: 80200 
RAM0: Start 0x20000000 Size: 0x30000 
RAM1: Start 0x1fff0000 Size: 0x10000 
ROM0: Start 0x0 Size: 0x100000 
================= CPU STATS =================
Idle: 4%% Usage: 96%% 
================ HEAP STATS =================
Current heap: 1216
Max heap size: 1216
================ THREAD STATS ===============
ID: 0x20000e50 
Name: main 
State: 2 
Priority: 24 
Stack Size: 4096 
Stack Space: 3476 
ID: 0x20000fa0 
Name: rtx_idle 
State: 1 
Priority: 1 
Stack Size: 512 
Stack Space: 272 
ID: 0x20000f5c 
Name: rtx_timer 
State: 3 
Priority: 40 
Stack Size: 768 
Stack Space: 664 

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@evedon @kjbracey-arm

Release Notes

Ensure the file descriptor stdout is passed to `fputc` when the high
level C functions to print to the console are referenced.
This issue fixed only affected binaries built with the ARM toolchain.
@0xc0170
Copy link
Contributor

0xc0170 commented Oct 22, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Oct 22, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 23, 2019

I restarted Travis

@0xc0170 0xc0170 merged commit 4876172 into ARMmbed:master Oct 23, 2019
@hugueskamba hugueskamba deleted the hk-fix-minimal-printf-arm-toolchain branch October 23, 2019 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants