Commit Graph

51 Commits (7794d901f2be0737c02fa30fdae0b9ddf59dadf3)

Author SHA1 Message Date
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
Martin Kojtal 70f3cf89a0
Merge pull request #11699 from rajkan01/feature-os-cb-section
Fix for missing os_cb_section
2019-10-18 16:07:40 +02:00
Rajkumar Kanagaraj b88b6a5c8b fixed astyle issue 2019-10-18 03:06:19 -07:00
Rajkumar Kanagaraj f3b4eb3b33 Fix for missing os_cb_section
-Added the os_cb_section stub to remove the warnings
Incorporated the below review comment
 -Repharase source code comment
2019-10-17 03:28:28 -07:00
Kevin Bracey 93fbfafedf ARM toolchain: heap setup micro-optimisation
Locating and checking the length of the `ARM_LIB_HEAP` region is an
extra task, when we're just interested in the base and limit. Looking at
only those saves 8 bytes of ROM.

More space could be saved if we ensured all targets had `ARM_LIB_HEAP`,
removing the need for this run-time fallback code.
2019-10-17 12:39:33 +03:00
Anna Bridge 8688b183a9
Merge pull request #11572 from kjbracey-arm/sbrk2_fix
Tighten GCC 2-region _sbrk
2019-10-03 11:19:37 +01:00
Dominika Maziec 948bad1ed9 ATCmdParser doxygen header's documentation scanf 2019-09-27 16:02:24 +02:00
Kevin Bracey 046379e629 Tighten GCC 2-region _sbrk
When moving to the second heap region due to overflowing the first
region, the `_sbrk` implementation assumed the allocation would fit in
the second region, and didn't check for that overflowing too.

Problem revealed in `stats_heap` test with GCC 8 on K64F - the allocation
attempt for 1GiB crashed, as `_sbrk` indicated 1GiB was available at the
start of the second region.
second region.

Presumably older versions of newlib fault that allocation attempt before
passing to `_sbrk`.

While there, adjust the code to not use a separate static `bool`, saving
RAM. We can track with just one pointer, as order of the two regions is
fixed, and already relied on by newlib.
2019-09-26 16:12:59 +03:00
Hugues Kamba cc7403457d Fix ARMC6 linker error for the bare metal profile
The ARMC6 compiler inadvertently introduces the `_scanf_mbtowc` symbol
to the build. The commit provides a weak definition of the symbol to
satisfy the linker whenever the symbol is included. This affects ARM
Compiler 6 version 6.12 and earlier.

The compiler error was previously observed when the MICROLIB library is
used with the uARM toolchain. However, the weak definition was put in
`mbed-os/rtos` which is not included when the bare metal profile is used.
2019-09-25 12:20:50 +01:00
Laurent Meunier 9858b161d6 SysTimer deep sleep: Add local lock check and update comments
Suggested-by: @kjbracey-arm

Replace the sleep_manager_can_deep_sleep() with !_deep_sleep_locked.
Indeed, if we know we've taken the lock because we're using us_ticker,
no need to do the early wake.

Updated comments accordingly.
2019-09-19 14:25:59 +02:00
Laurent Meunier cd3105bb83 SysTimer should let deep sleep happen
When next SysTimer wake-up is scheduler far enough, always consider
that deep sleep may be entered and program an early wake-up.

So that even if deep sleep is only allowed some time later, it can be
entered. If not doing this, then the deep sleep would be prevented by
SysTimer itself and may not be entered at all.

This has been proved to happen in a simple blinly example.
2019-09-19 10:16:23 +02:00
Martin Kojtal 3c47010fd3
Merge pull request #11462 from hugueskamba/hk-minimal-printf-update-readme
Minimal-printf: Remove file printing in README and update tables
2019-09-17 09:12:05 +02:00
Hugues Kamba 93f50eef3d Suppress Coverity warnings 2019-09-12 15:44:55 +01:00
Martin Kojtal e090ef26d4
Merge pull request #11453 from hugueskamba/hk-fix-coverity-issues
Fix Coverity issues
2019-09-12 12:00:34 +02:00
Hugues Kamba c4d77b23fc Minimal-printf: Remove file printing in README and update tables 2019-09-11 15:44:07 +01:00
Martin Kojtal 91515fe2da
Merge pull request #11450 from hugueskamba/hk-minimal-printf-default-options-false
Minimal-printf: Set default configurations to false
2019-09-11 13:53:21 +02:00
Hugues Kamba e12400932d Fix Coverity issues
Issues fixed are related to:
* Non-static class member initialization in constructors
* Unused function return value
* Always false statements
2019-09-11 11:27:27 +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
George Psimenos bd95c53a4c Move source files and add Doxygen labels 2019-09-10 14:31:24 +01:00
Andrew Chong c257c5f0c7 mbed_error.c: Fixed another bug of possible stack overflow. 2019-09-06 16:49:09 +08:00
Andrew Chong bd9ec8b6d7 mbed_error.c: fixed the dump core function's bug of possible stack overflow. 2019-09-06 16:33:09 +08:00
Andrew Chong a769b7db43 mbed_error.c: Fixed compile errors with non-RTX targets. 2019-09-05 17:55:31 +08:00
Andrew Chong 76353d5476 mbed_error.c: now dumping MSP/PSP stacks correctly. 2019-09-05 17:55:31 +08:00
Andrew Chong 0da589e6e7 mbed_error.c: handler mode failures will dump MSP/PSP stacks. 2019-09-05 17:55:31 +08:00
Andrew Chong da2f8e5b79 mbed_error.c: reducing RTX restriction. 2019-09-05 17:55:31 +08:00
Andrew Chong 5258768bc7 The stack dump of the major should be moved up. 2019-09-05 17:55:31 +08:00
Andrew Chong 7dc53176ae mbed_error.c: Now we can stack dump on all possible threads. 2019-09-05 17:55:31 +08:00
Andrew Chong db1e2d3b24 astyle to mbed_error.c 2019-09-05 17:55:31 +08:00
Andrew Chong 5671416d5e handle_error: Now supports HW exception from handler mode. 2019-09-05 17:55:31 +08:00
Andrew Chong 835a7639a9 print_error_report: Paying extra caution on address alignment. 2019-09-05 17:55:31 +08:00
Andrew Chong 575bd31060 print_error_report: Don't care about osRtxStackFillPattern and dump whole remaining. 2019-09-05 17:55:31 +08:00
Andrew Chong 248746113f Now stack dump is done correctly to the other way around. 2019-09-05 17:55:31 +08:00
Andrew Chong 50daa7e40f platform.stack-dump-enabled feature is added. 2019-09-05 17:55:31 +08:00
Andrew Chong 57ed4f36fa Removed #warning of non-Cortex-M. Minor comment adjustment. 2019-09-05 17:55:31 +08:00
Andrew Chong d69dc4940e Fixed astyle failures on handle_error(). 2019-09-05 17:55:31 +08:00
Andrew Chong 9af7ea58d4 The candidate code to enable correct crash report for HW fault crashes. 2019-09-05 17:55:31 +08:00
Hugues Kamba 8c22bbbbc8 Use PRIu32 to print uint32_t variable
As the variable underlying type size is different depending on the
toolchain used
2019-09-03 09:29:06 +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
Kyle Kearney 5820a3172f Fix typos in comments 2019-08-28 13:12:05 +01:00
Andrew Chong 9edfad4eea mbed fault handler: changed the 2nd parameter type. 2019-08-21 17:02:34 +08:00
Andrew Chong e90c5674d4 Fixes the bug of having &mbed_fault_context argument instead of mbed_fault_context in mbed_fault_handler. 2019-08-21 16:38:36 +09:00
Anna Bridge 575cffbc13
Merge pull request #11185 from gpsimenos/move-target-cortexm
Move rtos & platform TARGET directories to source
2019-08-15 12:56:36 +01:00
Evelyne Donnaes 1de64cbb4a Updated minimal-printf README 2019-08-13 13:18:46 +01:00
Martin Kojtal fafd0a5480
Merge pull request #11051 from evedon/minimal-printf
Minimal printf addition
2019-08-09 09:52:36 +01:00
George Psimenos b37de68c74 Move TARGET directories to source 2019-08-08 11:59:16 +01:00
Hugues Kamba f0f408b2d8 Upstream PR #11073 review request changes (#11135)
* Modify Doxygen grouping of `drivers` Public/Internal APIs
* Correct classification of `mbed_events.h`
* Amend name of Doxygen group containing Device Key API
* Classify `CallChain.h` as public API and relocate file
* Remove Doxygen group from `equeue_platform.h` as it has no Doxygen compliant documentation
* Move USB target specific code back to `usb/device/targets`
2019-08-02 12:32:40 +01:00
Hugues Kamba 20f81e19be Change Doxygen groups structure, splitting first by Public/Internal (#11105)
* Change Doxygen groups structure, splitting first by Public/Internal

This commit also does the following:
* groups the documentation of related API
* moves `events/internal/equeue.h` to `events/equeue.h`
* merges `events/source/README.md` to `events/README.md`
2019-08-02 12:23:47 +01:00
Hugues Kamba 83354e46a7 Platform: Separate internal APIs from public APIs
Also includes:
* rename `mbed_sleep_manager.c` to `mbed_power_mgmt.c` to match its
  header file
* create Doxygen groups for public and internal APIs
* use relative path to include header files where inconsistent
* update references to internal APIs throughout libraries
* update the copyright year for all modified files
2019-08-02 12:23:47 +01:00