Commit Graph

103 Commits (3739ccda0f6a49b8340399848ff0371c33d74cb6)

Author SHA1 Message Date
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
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
Evelyne Donnaes ae57b4303e Fix thread_sleep_for zero 2020-02-06 15:19:18 +00:00
Maciej Bocianski 63d14f3af4 add dummy SUPER_REALLOC/CALLOC calls to alloc wrappers
This code prevents the ARMC6 compiler/linker from removing
SUB_REALLOC/CALLOC symbols from image when LTO is enabled

Fixes below error:
L6137E: Symbol $Sub$$calloc was not preserved by the LTO codegen but is needed by the image.
2020-02-04 12:29:53 +01:00
Maciej Bocianski 783953e5dc ARMC6 keep __user_setup_stackheap symbol when LTO enabled
Fix for the error L6915E: Library reports error: Heap was used, but no heap region was defined
2020-02-04 12:29:53 +01:00
Kevin Bracey d063902ee8
Merge pull request #12336 from SeppoTakalo/disable_writebuf
Disable write buffering on debug builds.
2020-01-31 16:24:04 +02:00
Kevin Bracey 65a5d1b682
Merge pull request #12326 from kjbracey-arm/systimer_abs_fix
Correct SysTimer absolute time calculations
2020-01-31 15:01:36 +02:00
Seppo Takalo c352488412 Disable write buffering on debug builds.
In mbed_start_application() there was a code that was supposed to
set DISDEFWBUF to one when running a debug build. However, this code
was in the wrong place, as this function is only called from
bootloader.

Move the code to correct place so that standalone applications use it
as well.

For the reference of DISDEFWBUF bit, see
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/CHDCBHEE.html
2020-01-30 16:19:28 +02:00
Kevin Bracey de915a034b Correct SysTimer absolute time calculations
`SysTimer::set_wake_time` incorrectly assumed that the `SysTimer`s tick
count and the underlying HAL timer had the same zero base. This normally
holds, at least approximately, in RTOS builds where the HAL timer starts
from zero at the same time the SysTimer is initialised.

But in bare metal builds, the HAL timer could be started some time
before the SysTimer, giving a significant discrepancy.

Beyond that, there's no requirement for HAL timers to start from zero in
the spec.

Record the HAL timer start time to get the conversion right.
2020-01-29 15:28:20 +02:00
Rajkumar Kanagaraj 16fcdaa56f minimal-printf: README correction
- Updated the README with "target.printf_lib"
2020-01-28 06:56:12 -08:00
Rajkumar Kanagaraj f1e1375685 Fix for the missing retrieve error context function call.
- Add the function to retrieve error context after a fatal error is called at
   system initialisation for the bare metal profile.
2020-01-23 07:39:29 -08:00
Anna Bridge 706625a982
Merge pull request #12297 from evedon/ed-update-mprintf-doc
Corrected minimal-printf README
2020-01-23 12:12:37 +00:00
Anna Bridge 40a0b28068
Merge pull request #12225 from evedon/ed-heap-stack-test
Fix baremetal heap and stack initialisation
2020-01-21 16:27:37 +00:00
Evelyne Donnaes 7205b73ada Corrected minimal-printf README 2020-01-21 16:21:05 +00:00
Evelyne Donnaes 3e3af70afc Fixed baremetal heap and stack initialisation.
Enabled heap_and_stack test for baremetal.
Added a test to check that global variables are initialised.

In mbed_sdk_boot:
- Added initialisation for mbed_stack_isr_start/size and mbed_heap_start/size for all toolchains.
- ARM toolchain:
   - Added call to mbed_toolchain_init() to initialise global variables.
   - Moved microlib initialisation code from mbed_retarget.cpp to mbed_sdk_boot.c.
- IAR toolchain: there is no equivalent to a software init hook that can be called. __low_level_init() was used but since this function is called before RAM initialisation, it cannot be used to initialize global variables. Defined a new __mbed_init() function called from IAR startup file instead.
2020-01-21 10:13:16 +00:00
Martin Kojtal 18c941cc84
Merge pull request #12207 from hugueskamba/hk-add-buffered_serial
Add BufferedSerial class to replace UARTSerial
2020-01-16 10:06:22 +00:00
Hugues Kamba a74ffacf81 Remove usage of UARTSerial in Mbed OS Core diretories
Replace with BufferedSerial as UARTSerial has been deprecated.
2020-01-13 13:20:57 +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
Martin Kojtal fc2a71064d
Merge pull request #12068 from rajkan01/feature_bare_metal
Enabling small C library option and deprecating uARM toolchain
2020-01-03 11:35:48 +00:00
Hugues Kamba d3d1b74e79 Minimal-printf: Fix documentation as floating point is disabled by default 2019-12-30 11:28:16 +00:00
Rajkumar Kanagaraj 957dca2082 Enabling small C library option and deprecating uARM toolchain
- By default, Mbed OS build tools use standard C library for all supported toolchains.
   It is possible to use smaller C libraries by overriding the "target.default_lib" option
   with "small". This option is only currently supported for the GCC_ARM toolchain.
   This override config option is now extended in the build tool for ARM toolchain.
 - Add configuration option to specify libraries supported for each toolchain per targets.
 - Move __aeabi_assert function from rtos to retarget code so it’s available for bare metal.
 - Use 2 memory region model for ARM toolchain scatter file for the following targets:
   NUCLEO_F207ZG, STM32F411xE, STM32F429xI, NUCLEO_L073RZ, STM32F303xE
 - Add a warning message in the build tools to deprecate uARM toolchain.
 - NewLib-Nano C library is not supporting floating-point and printf with %hhd,%hhu,%hhX,%lld,%llu,%llX
   format specifier so skipping those green tea test cases.
2019-12-19 10:05:11 -08:00
Anna Bridge 806ad39648
Merge pull request #12101 from rajkan01/feature_crash_report_fix
Bare metal: Retrieve error context after crash
2019-12-17 16:27:59 +00:00
Antti Kauppila d5fdcfdab8 busy s... fix (ONME-4352)
oob handling added for OK in busy scenario

Fixed spellcheck error

trace added for ok
2019-12-12 09:36:34 +02:00
Rajkumar Kanagaraj f6a7f6587a Fixing the Mbed OS crash reporting and enable green tea test for bare metal.
Added missing mbed_error_initialize function call in bare metal boot code which is used
to retrieve the crash report from RAM in case of any previous abnormal re-boot but this function call is present in RTOS boot code.
2019-12-11 04:28:42 -08:00
Hugues Kamba 431f6cb604 Minimal Console: Use static pin map 2019-12-10 15:32:15 +00:00
Martin Kojtal 2536e9291d
Merge pull request #12034 from kjbracey-arm/systimer_warning
SysTimer: Suppress implicit virtual warning
2019-12-06 13:35:08 +01:00
Kevin Bracey a1bbbb8845 SysTimer: Suppress implicit virtual warning 2019-12-05 15:48:36 +02:00
Martin Kojtal 2cf56b8f6d
Merge pull request #11891 from hugueskamba/hk-enable-minimal-printf-in-tools
minimal-printf: Enable using a target configuration parameter
2019-12-04 10:14:54 +01:00
Martin Kojtal 64d172c3bd
Merge pull request #11970 from kjbracey-arm/fault_crash
Avoid crashes during fault handler
2019-12-04 10:13:54 +01:00
Hugues Kamba d5aef28145 minimal-printf: Enable using a target configuration parameter 2019-12-03 12:31:51 +00:00
Martin Kojtal ad3647c191
Merge pull request #11957 from kjbracey-arm/crc-redo
MbedCRC and CRC HAL revisions (6.0 redo)
2019-12-03 13:21:36 +01:00
Martin Kojtal 111d1ca15e
Merge pull request #11962 from evva-sfw/feature/Bug_in_mbed_alloc_wrappers.cpp
Bug in mbed_alloc_wrappers.cpp
2019-12-02 16:16:16 +01:00
Kevin Bracey c67816b5ff 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-12-02 14:45:37 +02:00
Martin Kojtal d58e9d6e76
Merge pull request #11959 from hugueskamba/hk-fix-minimal-console
Minimal Console: Fix compilation error
2019-11-28 15:47:20 +01:00
Kevin Bracey fc05d51bcd Avoid crashes during fault handler
If the fault handler was hit before the stdio console was used and
initialised, the initialisation code caused a "mutex in ISR" trap,
stopping the register dump from happening.

Temporarily set the `error_in_progress` flag at the top of the fault
handler, and restore it before calling `mbed_error`. Take the
opportunity to suppress fault dumps on recursive crashes, much as is
done inside `mbed_error`.
2019-11-28 15:03:26 +02:00
Przemyslaw Stekiel b2dad08387 Change explicit pinmap to static pinmap 2019-11-28 08:32:12 +01:00
Przemyslaw Stekiel ba12228556 Explicit pinmap: Fix build failures reported by CI 2019-11-28 08:32:03 +01:00
Przemyslaw Stekiel d75cc97d80 Explicit pinmap - fix style 2019-11-28 08:32:02 +01:00
Przemyslaw Stekiel 3d719f7e35 K64F, NUCLEO_F429ZI: Use explicit pinmap for console 2019-11-28 08:32:00 +01:00
Philipp Steiner 0b36529cfa replace #ifdef MBED_MEM_TRACING_ENABLED and #ifdef MBED_HEAP_STATS_ENABLED with #if MBED_MEM_TRACING_ENABLED and #if MBED_HEAP_STATS_ENABLED 2019-11-27 15:54:22 +01:00
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