Commit Graph

1061 Commits (5a9ad74818d4828fab6a25e22d650b92818d57b2)

Author SHA1 Message Date
Martin Kojtal 37ee008b90
Merge pull request #12961 from MarceloSalazar/remove_nrf51
Remove nRF51 targets
2020-05-15 08:08:26 +02:00
jeromecoutant dd46dfccb2 STM32F4 code cleaning 2020-05-14 13:55:22 +02:00
Marcelo Salazar ccd95f1e14 Remove nRF51 targets
The following public nRF51 targets are being removed:

- NRF51822
- NRF51_DK
- NRF51_MICROBIT
2020-05-13 10:36:50 +01:00
Martin Kojtal f13db5fa76
Merge pull request #12906 from kjbracey-arm/chrono_asserts
Work around C++14 assert problem
2020-05-12 14:27:04 +02:00
Martin Kojtal 7698b34e8c
Merge pull request #12938 from kjbracey-arm/chrono-sleep-correct
Correct core RTOS sleep routine timing
2020-05-07 13:58:56 +02:00
Kevin Bracey 3f67eed31c Correct core RTOS sleep routine timing
Chrono conversions inadvertantly changed the core timed sleep routine
used by the RTOS idle to use `OsTimer::update_and_get_tick()` instead of
`OsTimer::get_tick()`.

Correct this, and expand/clarify documentation and naming to try to
prevent recurrence.

Another minor fix observed while inspecting code - `OsClock` can't just
use `milliseconds`, it should match the period of `OsTimer`, which
theoretically can be different.
2020-05-07 11:43:01 +03:00
Marcelo Salazar 4083469d09 Remove Ublox targets 2020-05-06 16:39:29 +01:00
Martin Kojtal dbf05ceaed
Merge pull request #12735 from Patater/musca-tfm
Make MUSCA B1 and MUSCA A1 TF-M ready
2020-05-04 11:06:48 +02:00
Martin Kojtal 32ea606add
Merge pull request #12889 from hugueskamba/hk_stdio_config
Convert newlines on all terminal (tty) devices by default
2020-04-30 14:53:41 +02:00
Martin Kojtal 0df2188f3e
Merge pull request #12761 from kjbracey-arm/callback_trivial
Callback: Trivial default
2020-04-30 14:50:40 +02:00
Kevin Bracey fd933b4c72 mbed_chrono: restore asserts
Now that we've got a workaround for ARMC6, asserts can be restored.
2020-04-30 14:14:25 +03:00
Kevin Bracey ff2a928091 Work around ARM C 6 constexpr assert
ARMC6's assert macro does not work in C++14 constexpr context as it should.
By defining __DO_NOT_LINK_PROMISE_WITH_ASSERT, we deactivate the
extension that breaks it (having `__promise` inside `assert` - see the
compiler manual).

The extension does not appear to be useful - we have no code using
ARMC6's `__promise` directly, and putting a `__promise` inside the
assert does not appear to affect code generation in my tests.
2020-04-30 14:14:25 +03:00
Jaeden Amero 808da40695 musca: Use the default baud rate
Avoid surprising users. Use the Mbed OS default baud rate. Applications
that want to see TF-M debug prints can both enable and set their baud
rate at the application level. Mbed OS should not turn on TF-M debug
prints nor surprise the user with a non-default baud rate.

Signed-off-by: Jaeden Amero <jaeden.amero@arm.com>
2020-04-30 11:32:10 +01:00
Hugues Kamba 5cb7bd5cca Convert newlines on all terminal (tty) devices by default
Applications can reduce their ROM usage by replacing
"\r\n" by "\n".
2020-04-30 10:56:27 +01:00
Martin Kojtal d1ae0d570c
Merge pull request #12425 from kjbracey-arm/chrono
C++ Chrono support
2020-04-30 11:41:43 +02:00
Jaeden Amero fcf427ac11 psa: Remove S-mode only code
Remove all PSA S-mode only code, as it is unused. Only PSA S targets
would use the code, and we've removed those targets in a previous
commit.

Ensure all tests for S-mode code we are deleting is also removed, even
if that code would run in NS-mode. Keep any tests that also test our PSA
emulation support (for single v7-M targets).

Signed-off-by: Jaeden Amero <jaeden.amero@arm.com>
2020-04-27 09:51:13 +01:00
Kevin Bracey 8e3e19837a More Chrono test fixes
* Timer test - handle removal of Timer(ticker_data_t *)
* Timer test - use Chrono, don't test deprecated methods
* Kernel tick count test - TEST_ASSERT_WITHIN -> TEST_ASSERT_INT_WITHIN
* Mutex test - fix up Chrono changes
* SysTimer test - adapt to SysTimer Chrono changes
* Thread test - use Chrono
* SysTimer - devirtualize destructor
2020-04-27 10:19:08 +03:00
Rajkumar Kanagaraj a10dafdda8 Fix the CI build issue 2020-04-27 10:19:08 +03:00
Kevin Bracey b17355f588 mstd_mutex: Add missing Chrono bits 2020-04-27 10:19:08 +03:00
Kevin Bracey a88622527f Add mbed_chrono.h for handy extensions 2020-04-27 10:19:08 +03:00
Kevin Bracey f4e0ea2c75 Add Chrono support to Kernel and SysTimer 2020-04-27 10:19:08 +03:00
Hugues Kamba d6b764e75f Remove deprecated Platform header files 2020-04-16 09:28:27 +01:00
Martin Kojtal d4da29840f
Merge pull request #12758 from hugueskamba/hk_fix_microlib_minimal_console
Fix: Return the correct std I/O device handle for Microlib in retarget code
2020-04-15 09:24:17 +02:00
MarceloSalazar a15f6a43ad General clean-up of unsupported targets 2020-04-09 15:36:21 +01:00
Martin Kojtal 7fce7f552c
Merge pull request #12572 from rajkan01/waitapi_remove_deprecated
Remove mbed wait deprecated APIs
2020-04-09 14:57:46 +02:00
Rajkumar Kanagaraj 9739b565b2 Fix the CI build issue 2020-04-08 10:35:07 +01:00
Rajkumar Kanagaraj 83be3f24a5 Remove mbed wait deprecated APIs 2020-04-08 10:35:07 +01:00
Hugues Kamba eca09b7c17 Fix: Return the correct std I/O device handle for Microlib in retarget code
Return the correct filehandle based on the mode requested. The mode is used
as the pathname is always the default one (":tt") for Microlib. The
previous implementation relied on three successive calls to open the std
I/O device handles, this was not the case.
2020-04-07 13:10:20 +01:00
Kevin Bracey 616b4e7bd8 Callback: Trivial default
Turn off `callback.non-trivial` by default to save ROM space.
2020-04-06 09:45:51 +03:00
Kevin Bracey 874e36e05a Fully enforce NonCopyable
Make NonCopyable fully operational so it gives compile errors in all
build profiles.
2020-03-31 19:01:42 +03:00
Martin Kojtal b090065dec
Merge pull request #12708 from rajkan01/ARM_compiler_version
Remove compatibility for Arm Compiler versions prior to 6.01.0050
2020-03-31 10:36:56 +02:00
Martin Kojtal 5a07aab474
Merge pull request #12569 from evva-sfw/feature/mbed-error-weak
Replace with weak mbed_error_hook implementation (deprecate the hook function)
2020-03-30 10:02:29 +02:00
Rajkumar Kanagaraj 47e68b20cb - Remove the pre-processor directive __ARMCC_VERSION >= 6010050
- Add the code prior to 6.01.0050 versions.
2020-03-27 14:37:01 +00:00
Anna Bridge 009ff7adf3
Merge pull request #12036 from kjbracey-arm/callback_fiddle
Callback extension and optimisation
2020-03-27 14:07:20 +00:00
Martin Kojtal cb131c39b3
Merge pull request #12629 from evedon/ed-rtos-api
Add "rtos-api" to bare metal
2020-03-26 18:21:05 +01:00
phst 75f8c70935 Fix Astyle error 3 2020-03-25 16:20:43 +01:00
phst 406e7a2f4f Fix Astyle error 2 2020-03-25 16:05:55 +01:00
phst 413b6d62f4 Fix Astyle error 2020-03-25 15:37:13 +01:00
phst ac20dfc745 Fix Astyle error 2020-03-25 14:20:21 +01:00
Martin Kojtal ddd3b013e8
Merge pull request #12632 from evedon/ed-minimal-snprintf
Fix snprintf in minimal-printf library
2020-03-25 11:34:23 +01:00
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
Rajkumar Kanagaraj eb40dbcc20 Remove ARMC5 reference from Mbed OS platform 2020-03-19 10:48:14 -07:00
Martin Kojtal 4f45b95ca3
Merge pull request #12607 from facchinm/sys_stat_h_inclusion
Use toolchain's struct stat if available
2020-03-17 09:30:03 +01:00
Evelyne Donnaes ebf5d27788 Add "rtos-api" to bare metal 2020-03-16 11:40:49 +00:00
Anna Bridge 0699ac4e7e
Merge pull request #12571 from kjbracey-arm/noncopy
C++11-ify NonCopyable
2020-03-12 11:07:05 +00:00
Kevin Bracey bb733f1ee8 Callback updates
* Optimise clearing by adding `nullptr` overload. This overload means
  `Callback(NULL)` or `Callback(0)` will no longer work; users must
  use `Callback(nullptr)` or `Callback()`.
* Optimise clearing by not clearing storage - increases code size of
  comparison, but that is extremely rare.
* Reduce ROM used by trivial functors - share copy/destroy code.
* Config option to force trivial functors - major ROM saving by
  eliminating the "operations" table.
* Config option to eliminate comparison altogether - minor ROM saving by
  eliminating zero padding.
* Conform more to `std::function` API.
2020-03-11 15:46:03 +02: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
Martino Facchin b865d90bff Use toolchain's struct stat if available
Fixes https://github.com/arduino/ArduinoCore-nRF528x-mbedos/issues/49

The patch should be as safe as possible, since __has_include is guarded itself.
2020-03-10 10:17:41 +01:00
Kevin Bracey 489525c191 C++11-ify NonCopyable
Define copy operators public and deleted rather declaring them private
and undefined. Will give immediate compilation errors rather than
delayed linking errors.
2020-03-05 15:45:39 +02:00