Commit Graph

913 Commits (240758db42aaa42b2abd50daea5033c3cc7e80dc)

Author SHA1 Message Date
Hugues Kamba 240758db42 Minimal Console: Fix compilation error
Build successfully when `platform.stdio-convert-tty-newlines` or
`platform.stdio-convert-newlines` are set to `true` by ensuring
`isatty()` is also included when `platform.stdio-minimal-console-only`
is set to `true`.
2019-11-27 12:17:03 +00:00
Martin Kojtal 394cf7a0eb
Merge pull request #11947 from hugueskamba/hk-fix-minimal-console
Minimal Console: Fix syntax errors
2019-11-27 11:30:08 +01:00
Hugues Kamba 72d5b51762 Minimal Console: Fix syntax errors 2019-11-26 14:09:01 +00:00
Martin Kojtal 5f7ecea00b
Revert "MbedCRC and CRC HAL revisions" 2019-11-26 13:45:37 +00:00
Martin Kojtal 2bde6581a6
Merge pull request #11720 from mtomczykmobica/ONME-4405
ATCmdParser: merge scanf and recv functions
2019-11-21 15:29:29 +01:00
Marcin Tomczyk 1d3a1b7c6c ATCmdParser: unittests implementation 2019-11-20 22:37:01 -08:00
Marcin Tomczyk 15eb2a6e4f ATCmdParser: merge scanf and recv functions.The goal is to give a configuration parameter for this function which would indicate are we trying to find a match from one line(scanf) or do we might end up processing multiple lines(recv) to find a match. 2019-11-20 22:35:55 -08:00
Martin Kojtal fd22997b60
Merge pull request #11559 from kjbracey-arm/crc
MbedCRC and CRC HAL revisions
2019-11-13 18:24:04 +01:00
Martin Kojtal eab1c2e594
Merge pull request #11796 from hugueskamba/hk-add-minimal-console-to-retarget
mbed_retarget: Add a minimal console implementation to provide basic functionalities
2019-11-13 17:11:27 +01:00
Kevin Bracey 8811972201 Adjust code for MbedCRC changes
* Make mbed_error use bitwise MbedCRC call rather than local
  implementation.
* Remove use of POLY_32BIT_REV_ANSI from LittleFS.
* Move some MbedCRC instances closer to use - construction cost is
  trivial, and visibility aids compiler optimisation.
2019-11-13 14:31:49 +02:00
Hugues Kamba 051991fafb mbed_retarget: Add a minimal console implementation to provide basic functionalities
The retarget code allocates an array of FileHandle* for console and file
handling (filehandles). A tiny target only needs a console (putc/getc).
There is no need for file handling.

The POSIX layer and the array of FileHandle* is not required for small
targets that only need a console ; this code is optionally compiled
out if the configuration parameter platform.stdio-minimal-console-only is
set to `"true"`.
2019-11-11 15:14:00 +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
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
Alex Elium 4ffa363e63
mbed_rtc_time.h lacks an include guard
This PR adds it
2019-10-09 17:58:23 -05: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
Martin Kojtal 07ebd92f7b
Merge pull request #11494 from hugueskamba/hk-fix-coverity-iotcore-1334
Fix Coverity issue: Initialize FlashIAP non-static member in constructor
2019-09-24 14:58:29 +02: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
Hugues Kamba 8ea9acad8e Fix Coverity issue: Initialize FlashIAP non-static member in constructor 2019-09-17 09:55:37 +01: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
Martin Kojtal 5e693778f4
Merge pull request #11441 from gpsimenos/gp-move-source-files
Organize source files and add Doxygen labels
2019-09-11 08:00:03 +02: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
Hugues Kamba 5933dec3b7 Harmonise Doxygen comments in drivers, events, platform and rtos dirs
When a Doxygen group has been defined (created), all its needed to add
documentation to that group is `\addtogroup`. Since all the information
about the group is preserved, it is not necessary to mention the group
hierarchy again with `\ingroup`. This PR removes unnecessary Doxygen lines
across the `drivers`, `events`, `platform` and `rtos` directories.

It also ensures that new groups are created with `\defgroup` once and
referenced with `\addtogroup` whenever documentation needs to be added to
an existing group.
2019-09-09 10:59:51 +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 95d2eb83a3 platform: stack-dump-enabled default value to false. 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