Commit Graph

1707 Commits (8b6a7aacc5d2b90ba40d89c8eeb680ebee81ea18)

Author SHA1 Message Date
Cruz Monrreal 21483cd59d
Merge pull request #6167 from hug-dev/cm3ds-bug-fix
CM3DS Maintenance Pull Request: Bug fixes (1/4)
2018-02-27 13:44:05 -06:00
Cruz Monrreal 478fda70e0
Merge pull request #6166 from u-blox/apn_default
Make APN lookup the default behaviour for PPPCellularInterface
2018-02-27 13:43:32 -06:00
Tero Jääskö f0cc00ef3b nanostack-hal: add alternative critical section implementation
The nanostack hal's critical section uses a mutex for mutual exclusion,
which is nice for many use cases. But when one needs to use the critical
section from interrupts, the RTX will have a assertion failure and panic.

Add a configurable for mbed_lib, which can be used to enable a alternative
version of critical section, which uses the underlying OS primitives, which
disables the interrupts.

Note: the default behavior is not changed, one needs to override the
"nanostack-hal.critical-section-usable-from-interrupt" to have "true".

Reason for this change is that there is a need for sending events using
nanostack event queue from interrupt context, eg. from a socket callback.
2018-02-27 17:12:55 +02:00
Kevin Bracey d24c7c454b
Merge pull request #6186 from TeroJaasko/eventloop_in_main_thread_to_master
Eventloop in main thread to master
2018-02-27 14:01:40 +02:00
Cruz Monrreal b7c2b1f510
Merge pull request #6120 from ARMmbed/g-fat-errors
fatfs: Update error code mapping
2018-02-26 14:46:33 -06:00
Cruz Monrreal a93342f70b
Merge pull request #6151 from pan-/fix-generic-gap-connect
BLE: Fix generic gap connect
2018-02-26 14:39:25 -06:00
Cruz Monrreal 7f812807a9
Merge pull request #6177 from geky/fix-littlefs-mkdir-root
littlefs: Fix handling of root as target for create operations
2018-02-26 14:37:54 -06:00
Rob Meades 2fe3223612 Make MBED_CONF_PPP_CELL_IFACE_APN_LOOKUP default in mbed_lib.json while
ensuring that, if there is a user-specified APN, it is still used.
2018-02-26 11:33:40 +00:00
Cruz Monrreal II b40ff8af15 Moved return statements to their own line 2018-02-23 11:23:13 -06:00
Tero Jääskö 09b8245cba nanostack-hal: remove connection from event loop init and dispatch thread
The thread flag signaling mechanism is problematic if a separate event
loop thread is not used. The problem is, that one needs to know the
thread id of the loop dispathcer, and that knowledge can be derived
only from the caller thread of the initialization function.

Remove the magic connection from caller thread to dispatcher thread
by using event flags instead of thread flags on signaling. As the
event flags require the massive amount 20 bytes of RAM whereas
thread flags requires none, keep the code behind flag.
2018-02-23 15:37:33 +02:00
Tero Jääskö aed2a0cd9f nanostack-hal: modify eventloop to allow running it in a main thread
The separate eventloop thread may not be necessary on all uses, as one
can use the existing main thread for event dispatching. Add a
conditional nanostack-hal.event-loop-dispatch-from-application, which
disables the thread creation.

Note: the ns_hal_init must be ran from the same thread which will be
used to execute the event loop later.
2018-02-23 15:37:32 +02:00
Vincent Coubard e91570e4ba
BLE: Fix default connection params type. 2018-02-23 13:30:16 +00:00
Cruz Monrreal 1d1eef47ff
Merge pull request #6160 from TeemuKultala/status_callback_fix
fix issue 6150
2018-02-22 21:56:42 -06:00
Christopher Haster f67a795ef0 littlefs: Fixed handling of root as target for create operations
Before this patch, when calling lfs_mkdir or lfs_file_open with root
as the target, littlefs wouldn't find the path properly and happily
run into undefined behaviour.

The fix is to populate a directory entry for root in the lfs_dir_find
function. As an added plus, this allowed several special cases around
root to be completely dropped.
2018-02-22 15:56:24 -06:00
Martin Kojtal 414b2d971d
Revert "Update Mbed TLS HW acceleration partner code to new hashing API" 2018-02-22 11:20:35 +00:00
Teemu Kultala 34ef11630c fix issue 6150 by always setting net interface UP in mbed_set_dhcp 2018-02-22 13:00:46 +02:00
Hugues de Valon ef7b16d9c5 CM3DS: fix non aligned access in Ethernet driver
This patch changes the way data is put in the TX_DATA_PORT register when
sending packet over Ethernet.
When this driver is compiled with release compilation profile
(space optimization compiler options) with Arm compiler version 5,
the line:
SMSC9220->TX_DATA_PORT = *pktptr;
generates the assembly instruction to get the pktptr pointed value:
LDM r2!, {r3}
with pktptr = r2
However, the code does not prevent the pktptr value from being unaligned
(to a 32 bits boundary) in that zone and the LDM instruction causes a
HardFault if this is the case. When the compiler option is not activated
(debug and develop compilation profiles), the compiler generates LDR
instruction instead which does not cause a HardFault.
The ARM v7-M states page B3-601: "Unaligned load-store multiples and
word or halfword exclusive accesses always fault."

To face that problem, we check if the data pointer is aligned or not. If
it is, we apply the same algorithm than before. If not, a local variable
is created and we copy in it, byte per byte, the contents at the
unaligned pointer. However, it will impact performances adding 8
instructions (one LD and one ST for each copied byte).

Change-Id: I11f6e82ce5521960d2ecf499f718f76fec29c0b0
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-02-21 17:54:12 +00:00
Galanakis, Minos 5b8ff81e02 CM3DS: fix a minor bug in the ethernet LWIP driver
This patch fixes a memory bug. `eth_arch_enetif_init` method call
would attempt to write to un-initialized area of memory.

Change-Id: I9881de71d58fa14db609fe3e24617a210b896471
Signed-off-by: Galanakis, Minos <minos.galanakis@arm.com>
2018-02-21 17:51:09 +00:00
Vincent Coubard 0158971387 BLE: Move cordio default scan and connection params in global memory. 2018-02-21 15:00:17 +00:00
Martin Kojtal 5c7cd1f689
Merge pull request #6139 from VeijoPesonen/eth_n_wifi-drv_n_tc_fixes
LWIP PBUF_POOL_BUFSIZE increased to fit also IPv6 header
2018-02-21 15:19:55 +01:00
Vincent Coubard f3c453b077 BLE: Handle NULL parameters in Gap::connect. 2018-02-21 12:42:54 +00:00
Vincent Coubard 7941a6fcc7 BLE: Force stop scan before connection initiation. 2018-02-21 12:13:24 +00:00
Veijo Pesonen a7ef67a92a fixup! LWIP PBUF_POOL_BUFSIZE increased to fit also IPv6 header 2018-02-21 08:25:46 +02:00
Cruz Monrreal 24a3acd647
Merge pull request #6141 from hasnainvirk/dr_bug_fix
Verifying datarate bug fix
2018-02-20 13:44:51 -06:00
Cruz Monrreal e66cc74b8f
Merge pull request #6046 from geky/fix-lookahead-noack-pop
littlefs: Fix incorrect lookahead population before ack
2018-02-20 13:19:13 -06:00
Cruz Monrreal 817f9a569c
Merge pull request #5812 from OpenNuvoton/nuvoton_crypto
M487: Support ECP H/W accelerator
2018-02-20 11:53:23 -06:00
Veijo Pesonen e1d9d8783d LWIP PBUF_POOL_BUFSIZE increased to fit also IPv6 header
IPv6 header requires 20 more bytes compared to IPv4 header.
2018-02-20 15:45:44 +02:00
Hasnain Virk b163057da7 Verifying datarate bug fix
A patch was missed from the feature PR.
verify_channel_DR() in LoRaPHY class had a loop with uninitialized
loop counter.
2018-02-20 15:08:04 +02:00
Martin Kojtal 3fec23e505
Merge pull request #6115 from andrewleech/nRF5XPalGattClient_include_new
NRF5x: Fix `error_t` conflict with gcc std>=gnu++11
2018-02-19 17:19:09 +01:00
Cruz Monrreal 1e1a1787d4
Merge pull request #6087 from ARMmbed/feature-lorawan
Integrating Mbed LoRaWAN Stack in Mbed-OS 5.8
2018-02-16 10:46:53 -06:00
Christopher Haster b548fd8a39 fatfs: Update error code mapping
A lot of the error codes in fatfs were mapped incorrectly. This patch
revisits the error code mapping to try to correct these mistakes
2018-02-16 00:29:22 -06:00
Andrew Leech d001fb1c66 Avoid importing <memory> as this causes a typedef conflict on `error_t` whien compiling with gcc "-std=gnu++11" or above 2018-02-16 12:10:44 +11:00
Kevin Bracey d5dc655a6d Correct LoRaWAN license header 2018-02-15 15:40:18 +02:00
Kevin Bracey 984cc1ab50
Merge pull request #6032 from jarlamsa/status-callbacks
Status callbacks
2018-02-15 13:02:10 +02:00
Cruz Monrreal f9cd95f30d
Merge pull request #6095 from ARMmbed/g-note-mbr-limits
mbr: Add note about limitations
2018-02-14 14:10:41 -06:00
Cruz Monrreal 06b618447f
Merge pull request #5973 from k-stachowiak/IOTSSL-1727-update-to-new-md-api
Update Mbed TLS HW acceleration partner code to new hashing API
2018-02-14 12:58:08 -06:00
Cruz Monrreal 975b940001
Merge pull request #6053 from deepakvenugopal/master
Nanostack release for Mbed OS 5.8
2018-02-14 12:44:53 -06:00
Christopher Haster db965c1652
mbr: Added note about limitations 2018-02-14 10:31:14 -06:00
Krzysztof Stachowiak 2e9243f2e1 Expand guards for conditional compilation of ALT MD API 2018-02-14 16:33:58 +01:00
Christopher Haster 5b09daf0f9 mbr: Added checks for extended partitions 2018-02-13 14:03:02 -06:00
Hasnain Virk d7c22a6b09 A few Cosmetics & methods for mask manipulation
LoRaMacChannelPlan class provides APIs which are not usable for
PHY layer implementations who do not support custom channel plans.
So we had some code in APIs which was explicitely using magic numbers
for the channel mask. Although it turned out to be not a bug as a layer
down we were checking for custom channel support. However, we now
check for custom channel support before going deep into PHY layer that will
make the code run faster and we have done some cosmetics to the code for
readability.

Channel mask is manipulated with inline methods
2018-02-13 15:09:58 +02:00
Krzysztof Stachowiak 8c412ed886 Resolve compiler and linker issues in MD APIs
The features/mbedtls/targets/TARGET_STM/* files include constant needed
for the error codes returned from the MD functions.

The features/mbedtls/targets/hash_wrappers.c provides thin redirection
layer for the hardware accelerated MD implementations that rely on the
old API.

The TESTS/mbedtls/multi/main.cpp has been changed to use the new API
as its build environment does not rely on the translation unit
containing the necessary wrappers.
2018-02-13 10:07:28 +01:00
Christopher Haster fd9e4c12fd Added test to catch multiple nested MBRs 2018-02-12 18:57:41 -06:00
Christopher Haster 70cfef8630 fatfs: Removed extra MBR block
Regression after ChanFS update: Due to parameter changes in the f_mkfs
function, the option to use a separate block for MBR (FDISK) was turned
back on. This should be off as it conflicts with an explicit MBR when
using the MBRBlockDevice.
2018-02-12 17:16:10 -06:00
Cruz Monrreal cf60266584
Merge pull request #6058 from pan-/fix-gap-type-static
Ble: fix size function in advertising_data_t and address_t.
2018-02-12 10:28:32 -06:00
Cruz Monrreal bab8cc4de7
Merge pull request #6018 from bmcdonnell-ionx/fix-dir_seek-warn
fix compiler warning
2018-02-12 10:25:54 -06:00
Kimmo Vaisanen 90c02f2843 Check correct return value
mib_get_request() returns lorawan_status_t value so comparing
return value to boolean is incorrect.
2018-02-12 12:09:16 +02:00
Jarno Lamsa 8bea5ef438 Add some documentation for the callback 2018-02-12 11:02:07 +02:00
ccli8 03f0ea1117 [M487] Refine internal_mpi_write_eccreg in ECP alter. 2018-02-12 14:11:15 +08:00
Hasnain Virk 7224fbae1c Style Changes in MAC layer
Style changed according to Mbed-OS guidelines.
2018-02-11 00:31:47 +02:00