Commit Graph

25993 Commits (59046146967ea12a2ddce0559bc97265dd965378)

Author SHA1 Message Date
Ben Cooke 892adc6e91 nrf52840: remove align instructions from gcc linker for ARM.extab exidx sections 2019-07-19 10:22:05 -05:00
Kevin Bracey 940ed6c2b1 ARMC5 <array>: Add tuple interface 2019-07-19 17:24:14 +03:00
Kevin Bracey 0449e6f1a3 ARMC5 <array>: add comparison operators 2019-07-19 17:18:10 +03:00
Kevin Bracey 9f258c4798 ARMC5 <array>: remove not-working constexpr 2019-07-19 17:17:37 +03:00
Kevin Bracey fbf89272cc ARMC5 <array>: permit zero size 2019-07-19 17:17:07 +03:00
jeromecoutant 96a773a0e6 STM32L4: update drivers version to CUBE V1.14.0 2019-07-19 13:15:07 +02:00
Seppo Takalo 77786926bc
Merge pull request #11039 from kjbracey-arm/mstd
Add <mstd_xxx> C++ headers
2019-07-19 13:00:41 +03:00
Seppo Takalo 8006d5f3c3
Merge pull request #11035 from Patater/update-to-mbedtls-2.18.1rc1
mbedtls: Update to Mbed TLS 2.18.1
2019-07-19 11:22:13 +03:00
Ari Parkkila 7a5e4ca5da Cellular: Fix BG96 power up 2019-07-18 23:13:36 -07:00
Neil Tuttle a372992aee PSOC6: USB device implementation 2019-07-18 11:16:16 -07:00
Kevin Bracey 852a626399 Add mstd_xxx headers to unit tests
Stripped down headers that route through to `std` forms more - eg
no local implementation of `atomic` or `mutex`.
2019-07-18 20:02:07 +03:00
Kevin Bracey 85cd3cd9cc Add C++17 uninitialized storage ops 2019-07-18 20:02:07 +03:00
Kevin Bracey f27c7ecb64 Add ARMC5 unique_ptr
Standard library implementation should be fine for other toolchains.
2019-07-18 20:02:07 +03:00
Kevin Bracey b1c35b7a86 Move Atomic.h to <mstd_atomic>
`mbed::Atomic<T>` becomes `mstd::atomic<T>`, alongside the other
standard C++ library lookalikes.
2019-07-18 20:02:07 +03:00
Kevin Bracey da3cd6f053 Add <mstd_mutex>
Add add-standard-as-possible version of C++11 <mutex>.

A lot of the stuff in there is generic, but the actual mutex classes and
call_once need to interface with the OS.

For those, they're not available in ARMC5 or IAR; retargetting would be
necessary for ARMC6 and GCC, and I've yet to investigate how whether
that's possible. So for now I'm using local implementations.

Although `Mutex` in principle could support `timed_mutex` and
`recursive_timed_mutex`, we don't have `chrono` for the time parameters,
so hold off for now.

For the generic stuff like mstd::unique_lock, they are aliased to
std::unique_lock where possible.
2019-07-18 20:02:07 +03:00
Kevin Bracey 0bb4c050b7 SingletonPtr: API extensions, make constexpr
* Adjust definition to make the default constructor `constexpr`.
  This permits use in classes that want lazy initialization and their
  own `constexpr` constructor, such as `mstd::mutex`.

* Add `get_no_init()` method to allow an explicit optimisation for
  paths that know they won be the first call (such as
  `mstd::mutex::unlock`).

* Add `destroy()` method to permit destruction of the contained object.
  (`SingletonPtr`'s destructor does not call its destructor - a cheat
  to omit destructors of static objects). Needed if using in a class
  that needs proper destruction.
2019-07-18 20:02:04 +03:00
Kevin Bracey 2078575bae IAR: Suppress "exceptions are disabled" warning
IAR compiler is outputting lots of warnings about exceptions being
disabled whenever it sees a "noexcept" keyword. We know, we know.
2019-07-18 19:59:41 +03:00
Vladislav Talanov f548388566 add defines sectors for STM32F446ZE 2019-07-18 18:07:12 +03:00
Kevin Bracey 0aab1a9ea1 Split mbed_cxxsupport.h up - add namespace mstd
Regularise the C++ support glue, adding `<mstd_type_traits>` etc.

These include the base toolchain file, backfill `namespace std` as much
as possible for ARM C 5, and then arrange to create unified
`namespace mstd`, which can incorporate toolchain bypasses
(eg `mstd::swap` for ARM C 5, or `mstd::atomic`), and include local
implementations of post-ARM C++14 stuff.

All APIs in `namespace mstd` are intended to function as their
`namespace std` equivalent, and their presence there indicates they
are functional on all toolchains, and should be safe to use in
an Mbed OS build (including not unreasonable memory footprint).

See README.md for more info.
2019-07-18 15:16:08 +03:00
Tomasz Moń 4e992cd901 GCC ARM: Increase develop and release debug level
Do not specify the debug level for develop and release profiles. Instead
rely on the compiler to choose sensible default (-g2). Note that -g1 is
minimal debugging information and does not include structure definitions
which quite heavily reduces debugging experience.

For develop and release profiles this results in elf file containing
structure definitions. This does not impact debug profile as it already
did use -g3 which is the highest debug level.

Compatible debuggers (eg. gdb, SEGGER Ozone) can use the extra information
to provide better debugging experience. For example, when compiled .elf is
loaded in gdb, this change makes it trivial to access internal RTX data.

Without this change on develop profile:
  (gdb) print osRtxInfo.thread.run
  'osRtxInfo' has unknown type; cast it to its declared type

With this change on develop profile:
  (gdb) print osRtxInfo.thread.run
  $1 = {curr = 0x20014F04, next = 0x20014F04}
2019-07-18 12:03:13 +02:00
Kevin Bracey de7e72befe astyle: exclude platform/cxxsupport
As something of a cheat, exclude platform/cxxsupport from astyle.

astyle really can't process the sort of template metaprogramming going
on in there; treat it as a "black box" like the toolchains' own
libraries.
2019-07-18 11:50:13 +03:00
Kevin Bracey 6fc767dc71 Make tools cope with no-extension headers
Treat files with no extension as headers, if they are in the cxxsupport
folder.
2019-07-18 11:50:13 +03:00
Kevin Bracey 7c849cb664 C++ invoke related stuff
For all compilers add post-C++14 stuff to namespace mbed:

* invoke, invoke_result, is_invocable, is_invocable_r,
  is_nothrow_invocable, is_nothrow_invocable_r, unwrap_reference,
  unwrap_ref_decay

For ARM C 5, add C++11 bits based on above to namespace std:

* result_of, reference_wrapper, ref, cref, mem_fn
2019-07-18 11:50:13 +03:00
Kevin Bracey e5a3f976c2 Add TOOLCHAIN_ARMC5 label
We have some files that are needed for ARMC5 only.
2019-07-18 11:50:13 +03:00
Seppo Takalo 2f136b977f
Merge pull request #11058 from paul-szczepanek-arm/make-weak-fix
BLE: allow overriding event signal
2019-07-17 23:30:16 +03:00
Mahesh Mahadevan 34619e55a6 MCUXpresso: Fix the LPC GPIO IRQ driver
The IRQ disable was always disabling both rising
and falling edges of the interrupt thereby causing
failures in cases when one of the two should stay enabled.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-17 15:18:59 -05:00
Seppo Takalo 12d60f86ea
Merge pull request #11050 from jeromecoutant/PR_DISCO_L4R9I
DISCO_L4R9I new target
2019-07-17 23:15:45 +03:00
Seppo Takalo 4cdde1d07f
Merge pull request #11052 from NXPmicro/Update_LPC546XX_ADC
Update MCUXpresso AnalogIn driver for LPC devices
2019-07-17 23:14:35 +03:00
Seppo Takalo fa9a3ed05f
Merge pull request #11053 from maclobdell/psoc6-add-bootloader-support
Add Mbed bootloader support to CY8CKIT_062_WIFI_BT and CY8CPROTO_062_4343W
2019-07-17 23:12:11 +03:00
Lin Gao 387bb666f4 Added CC3220 related changes to tools 2019-07-17 14:18:19 -05:00
Lin Gao e74fbcd79e Add CC3220SF_Launchxl to Mbed OS 2019-07-17 13:19:32 -05:00
Balaji 69782a4ca6 LwIP: make TCPIP_THREAD_PRIO configurable 2019-07-17 18:51:45 +03:00
George Beckstein 7ff707c9b4 Fix SAADC resolution for nRF52-based targets... again 2019-07-17 11:43:20 -04:00
Seppo Takalo 3d5489a6f8
Merge pull request #10644 from fkjagodzinski/hal-gpio_pinmap
Add a gpio pinmap
2019-07-17 14:39:40 +03:00
Seppo Takalo 987533859a
Merge pull request #10104 from kjbracey-arm/sleep_api
Sleep rework, RTOS API for bare metal, wait deprecations
2019-07-17 14:37:53 +03:00
Seppo Takalo 8efd123776
Merge pull request #11042 from caoyuan96421/bugfix
Fixed serial_device IRQ infinite loop bug due to uint8_t overflowing in STM devices
2019-07-17 14:33:21 +03:00
Seppo Takalo 5b6034d0a9
Merge pull request #11028 from c1728p9/fpga_warnings
Fix FPGA CI Test Shield warnings
2019-07-17 14:32:43 +03:00
Seppo Takalo 0425ffda9b
Merge pull request #11026 from c1728p9/skip_peripherals
Add a restricted peripheral list
2019-07-17 14:32:08 +03:00
Seppo Takalo 02f8fbda62
Merge pull request #11019 from OpenNuvoton/nuvoton_wait-ns
Nuvoton: Modify wait ns(...) to provide more accurate implementation
2019-07-17 14:30:47 +03:00
Seppo Takalo 59b9f1da17
Merge pull request #11014 from SiliconLabs/fix/fpga_tests/adc_methodology
Increase ADC tolerance to 5% in FPGA-based tests
2019-07-17 14:29:37 +03:00
Evelyne Donnaes 0a4e5146b0
Merge pull request #11049 from SeppoTakalo/normalize
Normalize line endings for IM880B startup files.
2019-07-17 09:24:52 +01:00
Mahesh Mahadevan e50583459f LPC54114: Fix compile warnings
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-16 12:29:32 -05:00
Mahesh Mahadevan 55a2eddf8a MCUXpresso: Update LPC SPI HAL driver
Add support for different slave selects

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-16 12:10:34 -05:00
paul-szczepanek-arm 67c7a06a86 fix macro usage 2019-07-16 16:59:02 +01:00
paul-szczepanek-arm f13318df60 make event signal weak so it can be overridden 2019-07-16 13:49:20 +01:00
Kevin Bracey 163fb19d97 events: Don't use OsTimer in SysTick builds
Previous fix assumed OsTimer is in use - it is for tickless RTOS builds
and non-RTOS builds, but non-tickless RTOS builds avoid it altogether
and use the SysTick peripheral.

Restore previous behaviour for those builds, and just always read the
tick count - there is no downside to this when ticking.

While in the code, make equeue_tick initialisation explicit. This was
problem if the OsTimer is not yet initialised when th
done while debugging - turns out not to be part of the fix, but it
speeds up the runtime code.
2019-07-16 14:38:08 +03:00
maclobdell ccbfea502c add defines for bootloader support, for target without cmsis pack 2019-07-15 23:13:22 -05:00
Mahesh Mahadevan 9b8a859883 MCUXpresso: Update the Analogin driver for LPC devices
1. Update the clock divider setting
2. ADC resolution is 12-bits, update the API return value
   to return 16-bit result
3. Update IOMUX setup

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-15 14:40:55 -05:00
Mahesh Mahadevan f4648673cf LPC54114: Update the ADC SDK driver
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-15 14:40:55 -05:00
Mahesh Mahadevan 7b011e9fe2 LPC546XX: Update the ADC SDK driver
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-15 14:40:55 -05:00