Kevin Bracey
013377a857
Revert back to non-variadic binding
...
Unwind previous commit and restore original behaviour for binding,
pending further investigation.
Some functions like `EventQueue::call` require precisely matching
argument types to get the correct overload, as before.
Others like `EventQueue::event` permit compatible types for binding, and
those handle the 0-5 bound arguments non-variadically in order to
correctly locate the free arguments in deduction.
2019-06-26 11:52:25 +03:00
Kevin Bracey
62062efc37
Constrain context argument types
...
Previous commit just replaced instances of "class B0, class B1, class
C0, class C1" with "class... BoundArgs, class... ContextArgs".
This loses the requirement that the numbers must match.
Now, the original code was also inconsistent as to whether it used
separate types for the target function and the call input parameters.
Some forms just used B0, B1 as parameters rather than separate C0, C1.
I believe the separate parameters would have been primarily to avoid
template deduction confusion - eg if int was supplied to a B0 parameter
but the function took char as B0, there would be an ambiguity. But the
fix didn't seem to be fully applied.
Rewritten all templates parameterising on function pointer type and
input arguments so that they use `type_identity_t<BoundArgTs>...` as
input parameters to match the target function.
This has the subtle effect that any conversion happens at invocation,
before storing to the context, rather than when the context calls the
target.
2019-06-25 14:47:03 +03:00
Kevin Bracey
4d9148a9dc
Reduce Event.h and EventQueue.h using C++11
...
Variadic templates can reduce Event.h from 4,100 lines to 300, and
EventQueue.h from 3,400 to 1,000, so 6,000 lines saved total.
End result isn't totally variadic, as we still need specialisations
for storing 0-5 values in contexts, but that specialisation is now
in exactly one place.
Only change other from switching to variadic templates is using
delegating constructors instead of the `new (this)` trick. That trick is
still used in the assignment operator.
Minor documentation correction. It's possible that the separate
simplified variadic Doxygen version not be needed now, but I've left it.
2019-06-25 13:48:39 +03:00
Martin Kojtal
9974899a6b
Merge pull request #10833 from jamesbeyond/master
...
fix IAR compile error on fastmodels
2019-06-15 04:46:02 +01:00
Qinghao Shi
2ddb55007c
fix IAR compile error on fastmodels
2019-06-14 10:59:16 +03:00
Martin Kojtal
5a8f795976
Merge pull request #10804 from VVESTM/vve_fix_10589
...
TARGET_STM: SPI: update pull up config depending on clk polarity
2019-06-14 07:45:25 +01:00
Martin Kojtal
180356130f
Merge pull request #10779 from martinichka/feature-spif-bigger-16m
...
Add support for SPIF of size bigger than 16Mbyte
2019-06-14 07:38:34 +01:00
Martin Kojtal
410e96b828
Merge pull request #10823 from OpenNuvoton/nuvoton_fix_dac
...
Nuvoton: Fix channel release in analogout_free()
2019-06-14 07:37:47 +01:00
Chun-Chieh Li
016ab2a417
[Nuvoton] Fix channel release in analogout_free()
2019-06-13 18:11:50 +08:00
Anna Bridge
3e6f5eba6c
Merge pull request #10764 from mirelachirica/bg96_sockid_fix_ipv6_support
...
BG96 ipv6 support and socket id fix for BG96 and M26
2019-06-12 17:04:46 +01:00
Anna Bridge
4ad71c4d65
Merge pull request #10802 from Patater/update-to-mbedtls-2.18.0rc4
...
Update to mbedtls 2.18.0rc3
2019-06-12 16:09:02 +01:00
Anna Bridge
378e997e25
Merge pull request #10753 from desmond-blue/feature-fix-nrf52-uart-count
...
Fix nrf52 enabled uart count and enable uart0/1
2019-06-12 14:50:12 +01:00
Anna Bridge
cda2031d1b
Merge pull request #10809 from kjbracey-arm/ns_list_stdint
...
ns_list: avoid UINT_FAST8_MAX (fix ARM C 5 builds)
2019-06-12 14:49:47 +01:00
Jaeden Amero
39ea40fed3
psa: Avoid re-definition of MBEDTLS_PSA_CRYPTO_C
...
Mbed TLS now enables PSA APIs by default on all targets. It's not
necessary to explicitly enable MBEDTLS_PSA_CRYPTO_C, as that can be
gotten from the Mbed TLS config.h.
However, many PSA targets depend on `-DMBEDTLS_PSA_CRYPTO_C` being
defined by the Mbed OS json configuration system and are not yet
properly including the Mbed TLS configuration; for these PSA targets,
warnings may remain until this issue is fixed.
Avoiding re-definition will eliminate warnings like the following, when
building mbed-os-example-blinky:
Compile [ 14.5%]: pal_client_api_empty_intf.c
[Warning] pal_client_api_intf.h@35,0: "PSA_SUCCESS" redefined
Compile [ 14.6%]: pal_client_api_intf.c
Compile [ 14.7%]: DeviceKey.cpp
Compile [ 14.9%]: pal_internal_trusted_storage_intf.c
[Warning] pal_internal_trusted_storage_intf.c@45,9: 'psa_its_set' is deprecated: PS specific types should not be used [-Wdeprecated-declarations]
Compile [ 15.3%]: val_attestation.c
[Warning] client.h@40,0: "PSA_VERSION_NONE" redefined
<..>
Compile [ 33.3%]: asn1parse.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 33.5%]: aes.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 33.6%]: asn1write.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 33.7%]: psa_crypto.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 33.8%]: blowfish.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 33.9%]: camellia.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 34.0%]: base64.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 34.2%]: ccm.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 34.3%]: chacha20.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 34.4%]: chachapoly.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 34.5%]: cipher_wrap.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 34.6%]: cmac.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 34.7%]: cipher.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 34.9%]: bignum.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 35.0%]: des.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 35.1%]: dhm.c
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 35.2%]: ctr_drbg.c
<..>
Compile [ 70.9%]: EthernetInterface.cpp
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 71.0%]: InternetSocket.cpp
Compile [ 71.1%]: L3IPInterface.cpp
[Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
Compile [ 71.2%]: NetworkInterface.cpp
2019-06-12 12:47:20 +01:00
desmond.chen
d5624b6ec6
Fix nrf52 enabled uart count and enable uart0/1
2019-06-12 15:36:09 +08:00
Kevin Bracey
5c3b15cf81
ns_list: avoid UINT_FAST8_MAX
...
Prevent compilation issues when someone has included <stdint.h> before
a header file that needs to include <ns_list.h>.
Some toolchains like ARM C 5 will not provide UINT_FAST8_MAX in C++
unless __STDC_LIMIT_MACROS is defined, and if this was not defined the
first time <stdint.h> was included, it's too late.
We can get the maximum value for our unsigned list offset by casting -1
to it, thanks to modulo arithmetic.
2019-06-11 17:13:27 +03:00
Anna Bridge
fc645bc3ed
Merge pull request #10805 from kjbracey-arm/armc5_blinky
...
Fix ARMC5 compilation
2019-06-11 15:07:43 +01:00
Martin Kojtal
ed69fc12ad
Merge pull request #10794 from tymoteuszblochmobica/dns
...
LWIP DNS servers setting/getting fixed.
2019-06-11 14:14:38 +01:00
Jaeden Amero
1470d06811
mbedtls: PSA entropy is compatible with other entropy
...
When using Mbed Crypto's PSA Entropy Injection feature on Mbed OS, it is
not required to opt out of having entropy sources added to your entropy
contexts by default (via MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES).
As integrated in Mbed OS, MBEDTLS_PSA_INJECT_ENTROPY is compatible with
actual entropy sources. PSA entropy injection is implemented using the
standard Mbed TLS NV Seed feature, and is as compatible with other
entropy sources as the standard Mbed TLS NV Seed feature which does
support entropy mixing.
2019-06-11 12:43:17 +01:00
Kevin Bracey
6df6decdfc
Fix ARMC5 compilation
...
Minor tweaks to fix ARM C 5 compatibility.
Pushing "ns_list.h" include to first makes sure "ns_types.h" is included
first, meaning it gets to define `__STDC_LIMIT_MACROS` before the first
include of <stdint.h>, which ensures that UINT8_MAX etc are defined.
2019-06-11 13:00:14 +03:00
Martin Kojtal
09ea361c7e
Merge pull request #10790 from jeromecoutant/PR_H7_LPUART
...
STM32H7 enable LPUART
2019-06-11 09:06:22 +01:00
Martin Kojtal
94d2a42fd5
Merge pull request #10793 from jeromecoutant/PR_STM32WARNING
...
STM32: remove compilation warnings
2019-06-11 07:36:47 +01:00
Martin Kojtal
fbcae489a0
Merge pull request #10762 from mprse/reenable_tests
...
Disable only time drifting test cases and fix GREENTEA_SETUP() call in tests
2019-06-11 07:35:41 +01:00
Jaeden Amero
4917b10725
mbedtls: Update to Mbed TLS 2.18.0-rc3
2019-06-10 13:05:46 +01:00
Jaeden Amero
03b2c53ff6
mbedtls: Update to Mbed Crypto 1.1.0d2
2019-06-10 09:55:55 +01:00
Martin Kojtal
e7bc177b20
Merge pull request #10707 from kjbracey-arm/sized_delete
...
Add C++14 sized delete operators
2019-06-09 18:58:33 +01:00
Martin Kojtal
9dfc8d0ea7
Merge pull request #10775 from jeromecoutant/PR_H7_REFACTOR
...
STM32H7: refactor TARGET directory
2019-06-09 18:22:04 +01:00
Martin Kojtal
42dbcbdc86
Merge pull request #10772 from LDong-Arm/GenericGap_advParams
...
Workarounds for GAP advertising issues on Cordio
2019-06-09 18:21:41 +01:00
Martin Kojtal
3c2dd9ca89
Merge pull request #10761 from jarvte/fix_nwinterface_statustest
...
Fix networkinterface non-blocking status test
2019-06-09 18:21:15 +01:00
Martin Kojtal
356c4fb7cb
Merge pull request #10758 from toyowata/stm32f407xe
...
Move Seeed ARCH_MAX to TARGET_STM32F407xE MCU
2019-06-09 18:20:03 +01:00
Martin Kojtal
dbe274ccf0
Merge pull request #10757 from petroborys/master
...
Add support I2C 3 for target EFM32G11
2019-06-09 18:19:42 +01:00
Martin Kojtal
9ab0e09699
Merge pull request #10752 from teijokinnunen/stm32l0_target_spi_count
...
STM32L0: Add DEVICE_SPI_COUNT to DISCO_L072CZ_LRWAN1 + MTB_MURATA_ABZ
2019-06-09 18:19:34 +01:00
Martin Kojtal
5581da56c9
Merge pull request #10751 from ThunderSoft123/master
...
TARGET_TT:Setting wisely pin mode for TT_M3HQ.
2019-06-09 18:19:05 +01:00
Martin Kojtal
15539e0710
Merge pull request #10749 from jamesbeyond/example_test
...
Examples: enable more tests for examples
2019-06-09 18:18:37 +01:00
Martin Kojtal
4625221f1e
Merge pull request #10746 from davidsaada/david_fix_ps_flags
...
PSA protected storage: Add encrypt & RB protect flags by default to set.
2019-06-09 18:17:19 +01:00
Martin Kojtal
eb12029215
Merge pull request #10742 from teijokinnunen/cthunk_free_fix
...
CThunk: Fix assertion when CThunk object is destroyed
2019-06-09 18:16:56 +01:00
Martin Kojtal
b683f4252e
Merge pull request #10739 from OpenNuvoton/nuvoton_m487_wait-ns
...
M487: Fix wait_ns test failed
2019-06-09 18:16:34 +01:00
Martin Kojtal
ced4c3f4e4
Merge pull request #10708 from VVESTM/vve_fix_10671
...
TARGET_STM: SPI: add pulse on master transmissions
2019-06-09 18:10:42 +01:00
Martin Kojtal
1e61f53544
Merge pull request #10705 from kjbracey-arm/atomic_thumb1
...
Atomics: GCC fix for M23 (ARMv8-M baseline)
2019-06-09 18:08:50 +01:00
Martin Kojtal
a1fab9d654
Merge pull request #10699 from gpsimenos/iotcore556-fix_buffer_param_type
...
MbedCRC: make buffers const void *
2019-06-09 18:07:51 +01:00
Martin Kojtal
dda79d4d23
Merge pull request #10695 from Ronny-Liu/master
...
GD32_F450ZI : Add bootloader support
2019-06-09 18:06:25 +01:00
Martin Kojtal
48d23722fe
Merge pull request #10672 from c1728p9/fix_typos
...
Fix typos in the FPGA CI Test Shield component
2019-06-09 18:05:52 +01:00
Martin Kojtal
dd77957d45
Merge pull request #10665 from tymoteuszblochmobica/json
...
Add hardcoded Echo server defaults for Greentea socket tests.
2019-06-09 18:05:03 +01:00
Martin Kojtal
dc77c40fe9
Merge pull request #10709 from LDong-Arm/nrf52_cordio
...
Default to Cordio BLE stack for NRF52* targets
2019-06-09 18:03:34 +01:00
Martin Kojtal
df84eb1b28
Merge pull request #10653 from desowin/stm-usb-host
...
STM USBHALHost: Fix NULL pointer dereference
2019-06-09 18:01:46 +01:00
Marten Lootsma
e0ad71554b
Fixed astyle error and removed duplicated comment
2019-06-08 07:32:10 +02:00
Tymoteusz Bloch
4005c77f21
LWIP DNS servers setting/getting fixed.
2019-06-07 18:58:05 +02:00
Martin Kojtal
a2c029404b
Merge pull request #10437 from OpenNuvoton/nuvoton_psa_exclude_test
...
PSA: Exclude mbed-hal-spm test for M23 target
2019-06-07 17:19:27 +01:00
jeromecoutant
5ac7c8c77e
STM32WB warning compilation
...
[-Wparentheses-equality]
2019-06-07 18:11:16 +02:00
jeromecoutant
ddcc63276a
STM32H7 warning compilation
...
[-Wparentheses-equality]
2019-06-07 18:11:04 +02:00