The `sleep` function as been changed into `hal_sleep` by #3607.
Unfortunately the call to `sleep` in the hal_patch for the NRF51822 has not been
updated to `hal_sleep`. The result was a link time error for targets based on
NRF51822_LEGACY compiling with the mbed OS 5 tree.
The 'TARGET_M%' rules depend on files generated by the 'rsync' target,
so make this dependency explicit by setting 'rsync' as a pre-requisite
of 'TARGET_M%'. The 'rsync' dependency was removed from 'publish' to
avoid the case where make would select one of the 'TARGET' rules before
completing 'rsync', which would cause the build to fail.
Additionally, also moved the core libs selection in the 'TARGET_M%'
pattern rule from the pre-requisites into the rule's recipe. This is
required because when the wildcard expression used before as a
pre-requisite is expanded (make's 1st phase), it won't find any files
(not built yet via 'rsync' target), so it won't create the associated
'TARGET_M%' rules, finally causing the 'publish' target building to fail
due to missing rules for 'TARGET_M3' and 'TARGET_M4'.
With this change and the previous one, it is ensured that 'rsync' is
done before executing the recipe for 'TARGET_M%', so the required core
libs are already available and can be used from withing the recipe. The
same wildcard pattern is used as before.
The issues being fixed are visible with GNU Make 4.2.1, but not seen
with GNU Make 3.81.
Fixes issue #3905.
cleanup in include files (unrequired removed + other moved to aes_alt.h)
hcryp_aes moved to mbedtls_aes_context to allow multi instances
remove ctx->nr, ctx->buf
doxygen comments are removed (kept in .h file)
function _ALT are removed (full module _ALT)
handle error returned by HAL_CRYPxx functions
aes is symetric, remove the dupplicated set_key_enc and set_key_dec
buffer, and factorize the call to set_key function
Intention is to make filesystem api and network stack api consistent
as current designs diverge greatly. Attempted to change as little as
possible outside of api structure.
By default the number of pstorage pages is set 1 and all addresses are
calculated in the pstorage module accordingly. Nordic recommends
changing this macro to whatever number is suitable for the app (see
https://devzone.nordicsemi.com/question/53066/what-will-be-the-starting-
address-of-pstorage-page-how-we-can-change-it/?answer=53085#post-id-5308
5) which is not quite elegant given that pstorage_platform.h is part of
the mbed-os repo. With this modification you can e.g. define
PSTORAGE_NUM_OF_PAGES on the command line, however note that you should
rebuild mbed-os with this setting as it affects pstorage_platform.c.
Sometimes when under heavy load, the CI machines can take a significant
amount of time to bring up a python process (~10s). The timeouts for
the network tests were chosen without much thought, and didn't leave
much room for this sort of delay.
This patch brings up timeouts for ntetwork tests 20s -> 60s
- Remove write set of functions
- Caused confusion with small benefit
- Trivial to add later
- Remove unused error codes
- Initial expirementation indicates most of these may not be useful
- Trivial to add later
- Removed bd_error_t
- Carries to additional type information, int already carries
sufficient connotation
- Trivial to add later
per @c1728p9, @sg-
- Fixing code formatting errors with astyle tool.
- Replaced use of TOOLCHAIN_xxx macros with compiler emitted macros.
- Added const to BlockDevice::get_xxx_size() member functions.
- Added documentation for FAT filesystem thread support.
- Added documentation for fat_filesystem_set_errno().
- Added documentation clarifying the reasons for errno/stat symbol definitions in retarget.h.
- Removed FAT filesystem from mbed 2 testing.
- Fixed FATMisc.h Copyright (c) 2016 year to 2017 as its a new file.
- Removed #ifndef NDEBUG from HeapBlockDevice.cpp.
- Removed unnecessary todo comment in retarget.cpp.
- renaming FATFileSystemSetErrno() fat_file_system_set_errno.
- changing FATFileSystem::format() to be mount fs internally in function, rather than expecting fs to be mounted.
- requested const char *filename change.
* Updated docs
* Re-factored vMPU drivers
* Non-backwards-compatible API change: uvisor_ctx is now called
__uvisor_ctx and requires the user to explicitly cast it to their own
private context structure.
This only affects applications with uVisor enabled.
* Use "public box" instead of main box for box 0.
The core_cmSecureAccess.h file contains secure-access APIs that are a
good candidate for a proposal to CMSIS. At the moment we maintain these
APIs ourselves in ARMmbed/uvisor, and will push updates to
ARMmbed/mbed-os when running our usual importer script.
This commit includes
- Removing CoAP sources from mbed-client-c to its own repository.
- mbed-client-c is moved outside of mbed-os source tree because it is used by mbed-client, so
it will be part of mbed-client offering.
- CoAP sources are used by coap-service which is a part of nanostack deliveries hence coap now existing
as independent module under mbed-coap.
- Commit handles the interdepdency of coap-service with mbed-client-c because of coap sources, coap-service
header files are now fixed to point to right header directory.
The speed of packets on the local network exceeds even the speed of
the ethernet hardware on some of the less powerful devices. Adding
a small delay which can be expected from a real DTLS handshake prevents
this condition from occuring.
In sendto(), memory allocation failures were mistakenly being treated as
would blocks (assumption was that the device might be able to recover).
However, that put the blocking socket into deep sleep and there was no mechanism to wake it up
ever again. Somehow that got slipped through testing. Fixed in this amenment
As a result of major overhaul in Nanostack generally for socket API and especially
for TCP, the adaptation layer for mbed-OS is being upgraded.
Previously, as nanostack was not able to provide receive queue, adaptation layer had been
faking it. Now with Stream Socket by default Nanostack provides 2K receive queue and 2K send queue.
Receive queue size can be changed using setsockopt(). Batre metal nanostack would not provide with any
receive queues with Datagram Socket, however in this adaptation layer we introduce a 2K receive queue size
for the Datagram Socket as well.
Layer state machine handling is polished to ensure robustness.
::socket_connect() will can return 2 new error codes now. NSAPI_ERROR_ALREADY (like posix EALREADY) in case
if the connection is in progress or NSAPI_ERROR_IS_CONNECTED (like posix EISCONN) if already connected.
NSAPI_ERROR_WOULDBLOCK is now mapped directly to nanostack NS_WOULDBLOCK.
NanostackLockGaurd class is introduced which enables us to claim and release mutex using RAII style.
Note, the registered callback is still disabled by a call to
socket_attach. This will avoid being called after the socket is closed
unless close is called from the attached callback, which is in irq
context.
As pointed out by kjbracey-arm, the previous behaviour was broken
for sockets that started out listening.
Add sleep/deepsleep functions to platform layer which are replacing HAL
functions with the same name, rename existing symbols in HAL layer
to hal_sleep/hal_deepsleep. This way sleep functions
are always available, even if target doesn't implement them, which makes
the code using sleep clearer. It also enables us to make decision on in
which builds (debug/release) the sleep will be enabled.
This commit reduces the thread stack from 2k to 1k for each thread in
the parallel network tests. This allows the test to run on more
constrained devices (like the LPC1768).