Commit Graph

26 Commits (613af0f6041135a72dafc23f81a77a0c7a4edd2a)

Author SHA1 Message Date
Evelyne Donnaes a3c3656557 Removed mbed_minimal_formatted_string_character
mbed_minimal_formatted_string_character is no longer
required since fputc does the new line conversion.
This results in a small Flash saving.
2020-03-23 13:51:47 +00:00
Evelyne Donnaes 94acb5da50 Fix snprintf in minimal-printf library.
mbed_minimal_putchar assumed that buffer being NULL meant that it
should print to a file. This caused a system crash when calling
snprintf with both buffer and stream set to NULL.
It is valid to call snprintf with a NULL buffer; nothing should
be outputted, but the string length should be measured.
2020-03-23 13:46:12 +00:00
Anna Bridge 33f3049286
Merge pull request #12233 from bulislaw/minimal_printf_default
Enable minimal-printf by default for all builds
2020-03-10 12:13:11 +00:00
Evelyne Donnaes 5016fa1a10
Merge branch 'master' into minimal_printf_default 2020-03-02 17:31:37 +00:00
Evelyne Donnaes 0f2b0d1be5 Fixed greentea tests 2020-03-02 17:27:17 +00:00
Evelyne Donnaes a02f4b4856 Fix minimal-printf stack overflow 2020-02-25 10:44:11 +00:00
Anna Bridge 8c17270306
Merge pull request #12480 from 0xc0170/fix_spdx
Fix SPDX identifiers and licenses (excluding features and targets)
2020-02-21 16:34:30 +00:00
Martin Kojtal 21ad8af815 platform: fix SPDX identifiers 2020-02-21 07:00:58 +00:00
Bartek Szatkowski 954f22bb52 minimal-printf: Disable float by default 2020-02-19 15:29:39 +00:00
Bartek Szatkowski f9be9dc5be minimal-printf: Explicitly print %ll[diuxX] when 64b disabled 2020-02-19 15:29:38 +00:00
Bartek Szatkowski 554a04ba5f minimal-printf: README updates 2020-02-19 15:29:38 +00:00
Bartek Szatkowski 30c947efbb Enable minimal-printf by default for all builds
Also reenable floating point by default.
2020-02-19 15:29:38 +00:00
David Lin d725b13906
Fixed typo: 'lenght' in minimal-printf
Note that the word 'lenght' is wrong,
so that 'lenght' should been replaced with 'length'.
2020-02-16 18:11:18 +08:00
Rajkumar Kanagaraj 16fcdaa56f minimal-printf: README correction
- Updated the README with "target.printf_lib"
2020-01-28 06:56:12 -08:00
Evelyne Donnaes 7205b73ada Corrected minimal-printf README 2020-01-21 16:21:05 +00:00
Hugues Kamba 3b59f6ce4d Minimal-printf: Fix wrapping of printf functions for the ARM compiler
As the ARM compiler is in GNU compatible mode, it defines __GNU__ which
(based on pre-processor condition in  mbed_printf_implentation.h)
causes the printf functions to be wrapped using _wrap_* instead of
$Sub$$*.

This commit modifies the pre-processor
conditions to check for __GNUC__last in order to correctly
substitute the printf functions depending on the toolchain in use.

It also gets rid of $Super$$* substitution as it is not needed. $Super$$
is used to identify the original unpatched functions.

Missing substitutions for ARM compiler internal optimized "printfs" are
also added.
2020-01-13 11:24:57 +00:00
Hugues Kamba d3d1b74e79 Minimal-printf: Fix documentation as floating point is disabled by default 2019-12-30 11:28:16 +00:00
Hugues Kamba d5aef28145 minimal-printf: Enable using a target configuration parameter 2019-12-03 12:31:51 +00:00
Martin Kojtal 6240335855
Merge pull request #11729 from hugueskamba/hk-fix-minimal-printf-percentage-printing
minimal-printf: Fix handling of the two character sequence %%
2019-10-23 16:19:44 +02:00
Hugues Kamba ceffb6ddeb minimal-printf: Fix handling of the two character sequence %%
The two character sequence %% is used in standard implementations of
printf to print a single %. This is because % is essentially printf's
escape character for format specifiers and as \% cannot work printf
uses %%.
Therefore to be compatible with string buffers containing
%%, minimal-printf also needs to only print a single %.
2019-10-23 11:30:54 +01:00
Hugues Kamba 8d9e0a86a6 minimal_printf: Fix high level C functions that print to the console
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.
2019-10-22 14:09:55 +01:00
Hugues Kamba c4d77b23fc Minimal-printf: Remove file printing in README and update tables 2019-09-11 15:44:07 +01:00
Hugues Kamba 03c484a010 minimal-printf: Disable floating point support by default
Mbed OS should not require floating point in its base configuration.
This provides further code size savings out of the box.
2019-09-11 05:09:09 +01:00
Evelyne Donnaes d9f32639eb Changed minimal-printf to call fputc so that it does not bypass the retargetting code
Removed minimal-printf-console-output
2019-08-29 11:30:34 +01:00
Evelyne Donnaes 1de64cbb4a Updated minimal-printf README 2019-08-13 13:18:46 +01:00
Evelyne Donnaes 050a338771 Addressed review comments, in particular:
* Fixed wrapper functions for IAR
* Fixed and renamed profile to minimal-printf.json
* Moved minimal-printf under platform
* Removed minimal-printf/mbed_lib.json
* Modified exporter template to work with partial profile
* Prevented optimization of printf to avoid compiler function substitution
2019-08-01 12:42:24 +01:00