Commit Graph

821 Commits (7355219583f11713a2eb8d91860ec97ba5620d4d)

Author SHA1 Message Date
Sam Grove cfd517a3a0 Merge pull request #3783 from geky/cb-deprecate-attach
Callback: Deprecate attach member function in favor of simple assignment
2017-02-21 10:55:44 -06:00
Sam Grove 094fab43e7 Merge pull request #3760 from adustm/usb_txsize_fix
Fix #3756 for 64 bytes transfers
2017-02-21 10:47:44 -06:00
Alessandro Angelino ad436c4c92 uVisor: Update to version 0.27.0
* 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.
2017-02-21 13:24:23 +00:00
Alessandro Angelino e18c1186b8 uVisor: Add header file copy to importer script
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.
2017-02-21 13:09:31 +00:00
Mika Leppänen 90db9c0cb4 Corrected IAR compilation and removed compiler warnings 2017-02-21 14:31:26 +02:00
Mika Leppänen 30b6d2304d Set TCP socket created by accept to non-blocking mode 2017-02-21 14:31:10 +02:00
Mika Leppänen 93f02e4fed Renamed filter constant 2017-02-21 14:30:45 +02:00
Mika Leppänen b62df0033f Merged lwip 2.0.1 stable to mbed-os
* commit '61a7b15741c964dfa1f1a14244de38ea4e2ce22a':
  Squashed 'features/FEATURE_LWIP/lwip-interface/lwip/' changes from d7a6c6d..10f93f4
2017-02-21 14:27:32 +02:00
Sam Grove 7fc73e42f2 Merge pull request #3781 from geky/lwip-dtls-speed
lwip: Added delay to dtls handshake test to compensate for local network
2017-02-17 09:20:58 -06:00
Sam Grove 2a331143c8 Merge pull request #3772 from Ingramz/master
Improve readability of USBHID related descriptors
2017-02-17 09:20:42 -06:00
Sam Grove 02f6cd0f5c Merge pull request #3754 from mikaleppanen/lwip_send_filter
Added filter to send minus events to lwip adaptation
2017-02-17 09:16:39 -06:00
Yogesh Pande f57433a00a Separating CoAP library from mbed-client-c
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.
2017-02-16 19:08:28 +02:00
Christopher Haster d4e686be63 nsapi: Renamed attach -> sigio to decrease confusion on its behaviour 2017-02-16 10:47:06 -06:00
Christopher Haster 417524f562 Callback: Adopt better use of assignment/call operators 2017-02-15 15:19:38 -06:00
Christopher Haster 64ccff3fe1 lwip: Added delay to dtls handshake test to compensate for local network
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.
2017-02-15 12:38:05 -06:00
Indrek Ardel 29d5ebbb61 Improve readability of USBHID related descriptors 2017-02-14 14:56:51 +02:00
adustm 67a2f4b276 Bug fix to fullfill 64bytes transfer in HID 2017-02-13 17:10:19 +01:00
Hasnain Virk 1ac5700eb6 [ONME-2953 ]Minor glitch in error handling
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
2017-02-13 16:37:12 +02:00
Hasnain Virk 1f24533847 Minor amendments
NanostackLockGuard usage is now consistent throughout.
Missing Lock assertion added at a few locations in the code
2017-02-13 11:13:56 +02:00
Mika Leppänen 46396da1cf Added filter to send minus events to lwip adaptation 2017-02-13 09:50:38 +02:00
Seppo Takalo 7dc2dc8c66 Squashed 'features/nanostack/FEATURE_NANOSTACK/coap-service/' changes from a1982c1..e125164
e125164 Check secure session pointer in timer callback (#61)
f49e596 Update unit tests (#59)
6a5634a Support for multiple virtual services (#58)
7fe6b98 Remove yotta files (#57)
5c5c8fe Fix socket send return value overflow (#56)
0870d05 Update unit test stubs to match latest socket api (#55)
e687be8 Merge pull request #54 from ARMmbed/warn_fixes
b8fe613 updated unittests
8640d05 Compilation warnings fixed
eea83e5 Flag out entropy source addition (#53)
7d72eb4 Fix unittests (#52)
4a6991e Avoid referencing ns_msghdr_t::flags

git-subtree-dir: features/nanostack/FEATURE_NANOSTACK/coap-service
git-subtree-split: e1251645d38d5b1b90350957f0e8b66e0fb59235
2017-02-12 22:06:41 +02:00
Seppo Takalo 667006e1ba Nanostack 6.0.1 2017-02-12 22:05:33 +02:00
Hasnain Virk e4f91cd0dc [ONME-2927] Socket adaptation layer for nanostack
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.
2017-02-12 22:05:26 +02:00
Sam Grove ec329be6f2 Revert "Target stm usb config" 2017-02-09 15:37:19 -06:00
Sam Grove 29cfee4ae7 Merge pull request #3708 from OpenNuvoton/nuvoton_usb
[NUC472/M453] Fix USB EP setting error in USBAudio
2017-02-09 10:05:54 -06:00
Sam Grove d990385058 Merge pull request #3684 from jamike/TARGET_STM_USB_CONFIG
Target stm usb config
2017-02-09 09:35:16 -06:00
Sam Grove e0fb062ae8 Merge pull request #3649 from adustm/STM32F7_folderstruct
[STM32F7] Modify folder structure
2017-02-09 09:30:28 -06:00
Brian Daniels bca993a602 Fixing uvisor defines to fix build issues 2017-02-08 09:49:47 -06:00
Sam Grove 12edb2cac2 Merge pull request #3655 from adustm/STM32F4_folderstruct
[STM32F4] Modify folder structure
2017-02-07 10:35:26 -06:00
Sam Grove 2b6fed7b73 Merge pull request #3619 from geky/nsapi-fix-initial-events
nsapi: Change initial state of sockets to allow events
2017-02-07 10:31:57 -06:00
ccli8 f96b1c0ad7 [NUC472/M453] Fix USB EP setting error in USBAudio
NUC472/M453 USB doesn't support configuration of the same EP number for IN/OUT simultaneously.
2017-02-07 16:57:04 +08:00
Michel Jaouen 4d59c8857d TARGET_STM :move usb config file to target dir 2017-02-03 10:32:19 +01:00
bcostm e609796406 Enable USB Host 2017-01-27 17:22:07 +01:00
bcostm 592a25aa3c Add F412ZG in USBHAL files 2017-01-27 17:22:07 +01:00
adustm dd7c00f1b6 STM32F429 / F439 folder rework 2017-01-27 15:41:49 +01:00
adustm 0e70959e4d Modify forder structure so that targets with the same device can share
files
2017-01-26 14:21:26 +01:00
Martin Kojtal ade6722707 Merge pull request #3607 from ARMmbed/feature_hal_sleep
Platform: Add sleep/deepsleep user facing functions
2017-01-26 13:55:33 +02:00
Martin Kojtal 4e28b25399 Merge pull request #3612 from bulislaw/fix_network_host_tool
tests: Fix error on MacOS for udp_dtls_handshake test
2017-01-26 10:33:32 +02:00
Martin Kojtal dec3f01dd9 Merge pull request #3604 from bridadan/rename_gt_test_env
Renaming test_env.cpp in greentea to avoid warning
2017-01-26 10:31:13 +02:00
Martin Kojtal addd2b2965 Merge pull request #3548 from bridadan/reduce_stack_network_parallel_tests
Reduce thread stack size for parallel network tests
2017-01-26 10:21:46 +02:00
Christopher Haster d741c135f4 nsapi: Changed initial state of sockets to allow events
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.
2017-01-20 07:58:34 -06:00
Bartek Szatkowski 537f4db0af tests: Fix error on MacOS for udp_dtls_handshake test 2017-01-19 13:13:18 +00:00
Bartek Szatkowski 6a045a49a9 Platform: Add sleep/deepsleep user facing functions
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.
2017-01-19 09:39:29 +00:00
Brian Daniels 8a29f54ae4 Renaming test_env.cpp in greentea to avoid warning 2017-01-17 17:27:41 -06:00
Brian Daniels bdd0ff4272 Reduce thread stack size for parallel network tests
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).
2017-01-17 11:19:35 -06:00
Martin Kojtal e592c8a8b2 Merge pull request #3571 from jeromecoutant/PR_DISCO_F769NI
DISCO_F769NI introduction
2017-01-16 16:38:20 +00:00
Martin Kojtal c14d7154e6 Merge pull request #3397 from AlessandroA/stm32f4_support
Add uVisor support for the DISCO_F429ZI
2017-01-16 16:24:33 +00:00
Anna Bridge 209ac788c4 Merge pull request #3547 from SeppoTakalo/master
Add support for ethernet-only configuration with Nanostack.
2017-01-12 16:05:26 +00:00
Anna Bridge 236258bf05 Merge pull request #3546 from bcostm/dev_can_nucleo-f412zg
NUCLEO-F412ZG - Add CAN peripheral
2017-01-12 16:04:40 +00:00
jeromecoutant 66c3f8ed44 DISCO_F769NI: Add analog loop test support 2017-01-12 15:38:05 +01:00
jeromecoutant b65b2bd395 DISCO_F769NI: Add USB support 2017-01-12 15:37:37 +01:00
Alessandro Angelino 5f1c04745a uVisor: Update to v0.26.2
* Add support for uVisor own SRAM.
    * This enables targets where uVisor sits in a TCM.
* Distinguish between uVisor and public SRAMs.
2017-01-10 13:15:54 +00:00
Anna Bridge 9e24117b68 Merge pull request #3403 from geky/lwip-fix-tcp-connect-error
lwip - Fixed error codes for failed TCP connect
2017-01-10 10:43:37 +00:00
bcostm 25e885eafc Add NUCLEO_F412ZG in main.cpp files used for the tests 2017-01-10 11:07:45 +01:00
Sam Grove 7b83e0ff93 Merge pull request #3526 from geky/lwip-fix-static-ip-dns
lwip - Fix static IP address issues with IPv4
2017-01-09 10:27:11 -06:00
Seppo Takalo 1a5d6d7f19 Add support for ethernet-only configuration with Nanostack.
This saves about 100kB of flash when using ethernet only configuration.
Otherwise only border router configuration was supporting ethernet.
2017-01-09 18:26:56 +02:00
Sam Grove 110deed4ae Merge pull request #3514 from OpenNuvoton/nuvoton_usb
[NUC472/M453] Remove Tab in USB HAL
2017-01-09 10:20:50 -06:00
Sam Grove ddcd3ad711 Merge pull request #3488 from LMESTM/dev_stm_i2c_v2_unitary_functions
Dev stm i2c v2 unitary functions
2017-01-09 10:15:55 -06:00
Sam Grove 41b22bfa3c Merge pull request #3432 from jamike/TARGET_STM_USBHOST_FS
Target STM USBHOST support
2017-01-09 10:08:45 -06:00
Sam Grove 6af7b2916f Merge pull request #3265 from geky/lwip-tests
lwip - Add more network tests
2017-01-09 10:08:17 -06:00
Christopher Haster bbcf8de9e3 lwip - Filtered network tests based on DEVICE_EMAC
Currently DEVICE_EMAC is incompatible with the EthernetInterface
2017-01-05 11:16:24 -06:00
Christopher Haster 5f728e1b66 lwip - Marked *_packet_pressure tests as "extended tests"
*_packet_pressure_parallel tests are useful for checking for synchronization
errors, but push the practical limitations of the network stack. Failing
these tests is not unreasonable.

*_packet_pressure tests are a little bit less unreasonable, but also
push the practical limitations of the network stack. Hopefully these
will become stable in the near future.
2017-01-05 10:58:15 -06:00
Christopher Haster 6f375d20f8 lwip - Fixed missing dns servers after bringup with static ipv4 address
Generalized handling of dns servers when brought up with both ipv4 and
ipv6 addresses. Falls back to google dns servers if not dns server is
found through dhcp.

Also added support for the `add_dns_server` method to lwip to support
custom servers.
2017-01-04 12:12:16 -06:00
Christopher Haster 146577731e lwip - Fixed lwip connected state after bringup with static ips
Thanks to @YixiaoLi for noting this was incorrect
2017-01-04 12:10:47 -06:00
ccli8 614a451970 [NUC472/M453] Remove Tab in USB HAL 2017-01-03 13:23:30 +08:00
Michel Jaouen 25c0d9034f USBHOST STM : add more board
NUCLEO : F411RE, L476VG, F746ZG
DISCO : L476VG
2017-01-02 09:51:48 +01:00
Michel Jaouen 815194a98b USBHOST : add mouse test 2017-01-02 09:48:17 +01:00
Michel Jaouen 72dae26774 USBHOST : test mass storage 2017-01-02 09:48:16 +01:00
Michel Jaouen 14153dcbc3 USBHOST STM support :
NUCLEO : F429ZI, F446ZE, F207ZG, F767ZI, F401RE,
DISCO : F429ZI
2017-01-02 09:48:16 +01:00
Michel Jaouen 54db0a4143 USBHOST : introduce USBHOST_OTHER (USBHost on USB IP not OHCI). 2017-01-02 09:48:14 +01:00
Michel Jaouen 48434cfd64 USBHOST: fix call back 2017-01-02 09:48:14 +01:00
Michel Jaouen 1577037b4b USBHOST : add return value to queue transfer
modify add transfer to support return value.
2017-01-02 09:48:13 +01:00
Martin Kojtal e7361ebc44 Merge pull request #3365 from OpenNuvoton/nuvoton_usb
[NUC472/M453] Support USB device
2016-12-30 12:43:53 +01:00
Martin Kojtal 2f6f3c6631 Merge pull request #3500 from kuggenhoffen/update-mbed-client-c-3.0.4
Update mbed-client-c version 3.0.4
2016-12-30 12:41:45 +01:00
Martin Kojtal c6a1109cd6 Merge pull request #3473 from adustm/stm32f7_ethernet_dbg
Stm32f7 ethernet fix for IAR issue #3387
2016-12-30 12:32:46 +01:00
Martin Kojtal 131b23895c Merge pull request #3458 from hasnainvirk/nsapi_levels
[ONME-2844] Avoid option level collisions
2016-12-23 13:07:58 +00:00
Martin Kojtal bba527fdc2 Merge pull request #3457 from hasnainvirk/nsapi_connect
[ONME-2844] Supporting non-blocking connect()
2016-12-23 13:06:55 +00:00
Jaakko Kukkohovi d80f863647 Update mbed-client-c version 3.0.4 2016-12-23 13:52:42 +02:00
adustm ee3faa408d fix for #3387 need to disable the data cache for Ethernet to use the DMA
descriptors if they are located in SRAM1 and SRAM2
2016-12-22 17:57:50 +01:00
Martin Kojtal 08509e75df Merge pull request #3339 from jamike/USBAudio_CB_RX_TX
USB audio callback  rx and tx
2016-12-21 14:58:52 +00:00
Laurent MEUNIER 517d0d910a I2C test: add L073RZ 2016-12-21 09:28:56 +01:00
Laurent MEUNIER bcf82b0901 I2C test: master should send stop
it's master not slave that shall send STOP at the end of I2C transfer
2016-12-21 09:28:52 +01:00
Laurent MEUNIER d67b431f17 I2C test: let slave time to get notified
depending on timing and HW, there might be some delay before the master
request gets notified, so better loop in while than a single call
to slave.receive()
2016-12-21 09:28:45 +01:00
Laurent MEUNIER 70667349ee I2C test: change slave address
This avoids conflicts with slave on ci-test-shield
2016-12-21 09:28:39 +01:00
Seth King c83bcbf9cc Update lwipopts.h
Enable broadcast by disabling Broadcast filters 
resolve #3163
2016-12-20 15:04:32 -05:00
Hasnain Virk fcd55fe65b [ONME-2844] Avoid option level collisions
To allow a network stack to support both NSAPI and its own options, try to make
sure the NSAPI levels don't collide with level numbers likely to be used by
network stacks.

Distinguish between socket and stack options, and tighten up documentation. Add
IP MRU stack options as an example (implementation not immediately planned for
any stack, but could be useful).
2016-12-20 14:03:23 +02:00
Christopher Haster 51a093d6d8 lwip - Added windowing to tcp packet pressure tests
Despite being able to buffer an arbitrary stream of data,
TCP send is still limited by the available buffer space in the
network stack. Errors from TCP send are perfectly reasonable
and should be handled by reducing the buffer that is attempted.
2016-12-19 16:12:01 -06:00
Christopher Haster 2da71a7f87 lwip - Reduced size of buffers in echo-parallel tests
These tests could adopt the dynamically sized buffers used for the
packet-pressure tests, however throughput is not an important feature
of these tests.
2016-12-19 16:11:49 -06:00
Christopher Haster 4551dfa667 lwip - Moved dropped packets into debug condition
Printing out dropped packets caused significantly more overhead in the
parallel tests due to increased noise on the network. This noise would
push the tests past their provided timeouts.
2016-12-19 12:05:43 -06:00
Christopher Haster 39714f303d lwip - Added parallel versions of the packet pressure tests 2016-12-19 12:05:43 -06:00
Christopher Haster 8e7a3c8b04 lwip - Added handling of packet loss to udp echo test
Before the test would only succeed if all packets (16) succeed. Updated
to succeed if 75% succed.
2016-12-19 12:05:43 -06:00
Christopher Haster 9df82e5811 lwip - Added parallel versions of the echo tests
Simply runs the echo tests with multiple sockets in parallel
2016-12-19 12:05:43 -06:00
Christopher Haster 5c51a3d5ba lwip - Restructured pressure tests to use dynamic buffers and avoid floods
Dynamic buffers gives the network stack the maximum throughput while
still supporting smaller devices. This should expose the largest number
of issues across differently sized platforms.

Additionally, restructured the UDP tests to avoid unintentionally flooding
the recieving side with bad data after failed packets.

Also, added a bit more documentation
2016-12-19 12:05:43 -06:00
Christopher Haster 2295e40fc0 lwip - Reduced buffer used for packet-pressure tests
A larger buffer gives the network stack the best options for maximizing
throughput. However, the initial buffer size did not fit on small
targets. Resized 8192 -> 1024.
2016-12-19 12:05:43 -06:00
Christopher Haster 0d42ba6401 lwip - Added connectivity tests
Checks for connecting/disconnecting the network interface
2016-12-19 12:05:42 -06:00
Christopher Haster 938770e9ac lwip - Added udp_dtls_handshake test
Added test for the pattern of packets used during the DTLS
handshake. This pattern (5x ~300 byte packets) has been very
problematic for new network interfaces.
2016-12-19 12:05:42 -06:00
Christopher Haster fb00d20f56 lwip - Removed nist_internet_time_service test
- Unreliable service would occasionally lead to false-failures
- Redundant with hello world and echo tests
2016-12-19 12:05:42 -06:00
Christopher Haster ad79c20c6a lwip - Added packet pressure tests
Attempt to maximize the devices bandwidth with an exponentially growing
transaction of random sequences. Also prints the time taken and bandwidth
reached during the tests.
2016-12-19 12:05:42 -06:00
Anna Bridge e182ff48b6 Merge pull request #3428 from LMESTM/fix_i2c_asynch_test_slave_addr
Change slave address in I2C master slave asynch test
2016-12-19 17:41:38 +00:00
Anna Bridge 9e03765d04 Merge pull request #3422 from szechyjs/disco_f303vc_can
Enable CAN on DISCO_F303VC
2016-12-19 17:37:48 +00:00
Anna Bridge 3c84f49084 Merge pull request #3402 from geky/nsapi-fix-socket-close
nsapi - Fixed open/close issue in Socket
2016-12-19 17:25:09 +00:00
Michel Jaouen 71f570fbc7 USB_8 : audio loopback test at 16khz stereo 16bits
- Callback TX and RX interface is used.
2016-12-16 15:16:56 +01:00
Michel Jaouen 3a6a5ab858 USBAudio: tx/rx iso call back. 2016-12-16 15:16:55 +01:00
Hasnain Virk 35e4896ed3 [ONME-2844] Supporting non-blocking connect()
A few new error codes are added to nsapi_error_t and
support for non-blocking socket connect is added.
Nanostack's connect call will be non-blocking.
Whereas LWIP connect call is currently blocking, and it could be changed now
to be non-blocking.
2016-12-16 15:35:33 +02:00
ccli8 5fe22742f1 [NUC472/M453] Add target SPI pins into SPI SD test samples with Travis CI 2016-12-16 09:42:24 +08:00
Sam Grove 899c5422ac Merge pull request #3436 from ARMmbed/net_echo_test_host_fix
Fix network echo test host scripts for Mac
2016-12-15 10:40:39 -06:00
Sam Grove 6b64dbc5fe Merge pull request #3434 from OpenNuvoton/nuvoton
[NUC472/M453] Fix stuck in lp_ticker_init and other updates
2016-12-15 10:38:35 -06:00
Anna Bridge ad8a77d1ae Merge pull request #3368 from simonqhughes/master
CFSTORE fixes for building with DEBUG trace enabled
2016-12-15 10:53:18 +00:00
Bartek Szatkowski b77f663520 Add defined port fallback for network echo tests
The 0 aka 'any' port doesn't for on Mac, but, only, using defined port
may interfere with running multiple tests on CI.
2016-12-15 09:27:02 +00:00
Bartek Szatkowski 859c160ddc Fix network echo test host scripts for Mac
It seems that the 0 aka 'any port' doesn't work well on Mac, causing
[Errno 49] Can't assign requested address errors.
2016-12-15 09:27:02 +00:00
cyliangtw 0053b70d1e [NUC472] Fix LWIP implementation contains printf issue #3441 2016-12-14 15:12:58 +08:00
Laurent MEUNIER 63cd036d5b Change slave address in I2C master slave asynch test
Change test slave address to 0x80 because 0x90 is used by a real slave
(temperature sensor) on few boards like the CI shield.
2016-12-12 14:54:36 +01:00
Jared Szechy f5f3dc8143 Enable CAN on DISCO_F303VC 2016-12-11 22:03:29 -05:00
ccli8 fc16917d37 [NUC472/M453] Add license header for USBEndpoints_NUC472/M453.h 2016-12-12 09:19:08 +08:00
Martin Kojtal 00696e623f Merge pull request #3378 from NXPmicro/K66_ENET
K66F: Enable LWIP feature
2016-12-09 15:36:58 +01:00
Martin Kojtal 04f940de2d Merge pull request #3324 from LMESTM/dev_i2c_common_code
Dev i2c common code
2016-12-09 15:30:00 +01:00
ccli8 8c0948d605 [NUC472/M453] Integrate with Travis CI
1. Add targets into build_travis.py and tests.py.
2. Add target SPI pins into SPI SD test samples.
3. Rename target TOOLCHAIN_GCC_ARM/retarget.c to avoid name collision of compiled retarget.o with platform/retargets.cpp.
2016-12-09 13:46:38 +08:00
Christopher Haster 9b2a02f9ec lwip - Fixed error codes for failed TCP connect
condition               posix error     mbed error
good host, closed port  ECONNREFUSED    NSAPI_ERROR_NO_CONNECTION
bad host                EHOSTUNREACH    NSAPI_ERROR_NO_CONNECTION
bad network             ENETUNREACH     NSAPI_ERROR_NO_CONNECTION
2016-12-08 16:46:21 -06:00
Christopher Haster 3643b59109 nsapi - Fixed open/close issue in Socket
During open, the socket checked the internal stack variable,
assuming it would alway be null on a socket not connected to
the network. However, when a socket is closed, the stack variable
was not updated, causing the socket to incorrectly return a
parameter error if reopened.

The simple fix was to set the stack to null on close. A non-null
stack is a predicate for a non-null socket variable, so no additional
checks are needed in socket functions.
2016-12-08 16:14:15 -06:00
Bogdan Marinescu 337c1af22c Don't send events on close()
It's currently possible to generate a socket event when a non-blocking socket is closed:

1. _pending is set to 0 in https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.cpp#L22
   when the socket is created.
2. close() calls event() in https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/Socket.cpp#L66
3. event() increments _pending, and since _pending is 1 it will call _callback() in https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.cpp#L167

However, if send() (for example) is called, this can happen:

- send() is called and sets _pending to 0.
- when the data is sent, event() is called, which sets _pending to 1 and calls _callback().
- if close() is called at this point, there won't be an event generated for close() anymore,
  since _pending will be set to 2.

Same thing for recv. Also, same thing for TCPServer and UDPSocket.

This PR changes the initial value of _pending to 1 instead of 0, so that
events are never generated for close().
2016-12-07 17:52:16 +02:00
Mahadevan Mahesh 428e8b23c1 K66F: Enable LWIP feature
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-12-06 12:37:02 -06:00
Simon D Hughes a09ad071e6 Corrections of debug trace statements which prevent compilation when CFSTORE_DEBUG is defined. 2016-12-05 15:29:22 +00:00
ccli8 7f4881fbb2 [NUC472/M453] Support USB device 2016-12-05 15:12:15 +08:00
Martin Kojtal ab46684d5d Merge pull request #3336 from mikaleppanen/lwip_dhcp_parse_corr
Squashed 'features/FEATURE_LWIP/lwip-interface/lwip/' changes from d7…
2016-12-02 15:51:19 +01:00
Martin Kojtal ab2e869a24 Merge pull request #3157 from SiliconLabs/SiliconLabs-EFR32
[Silicon Labs] Adding support for EFR32MG1 wireless SoC
2016-12-02 15:46:35 +01:00
Laurent MEUNIER 014a48d402 Add more supported boards to I2C master slave asynch test 2016-11-30 08:23:13 +01:00
Martin Kojtal e261e30d05 Merge pull request #3193 from mikaleppanen/lwip_ipv6_eth_down_supp
Added clearing of ipv6 addresses to lwip bringdown function
2016-11-29 18:13:35 +01:00
Martin Kojtal c7d5ef09d0 Merge pull request #3341 from ARMmbed/ns_timeout-rename
Rename timeout.c to not collide with Timeout.cpp
2016-11-29 18:09:35 +01:00
Martin Kojtal 93c08f340a Merge pull request #3062 from jamike/TARGET_STM_USBDEVICE_FS
TARGET_STM :USB device FS
2016-11-29 18:07:11 +01:00
Seppo Takalo 119c118e22 Rename timeout.c to not collide with Timeout.cpp
IAR builds put all object files in same directory, so same
prefix is not allowed.
2016-11-29 17:32:28 +02:00
Mika Leppänen 420d5c3bac Squashed 'features/FEATURE_LWIP/lwip-interface/lwip/' changes from d7a6c6d..cd60f73
cd60f73 Merge branch 'mbed-os-lwip-rc2-maint' into mbed-os-lwip-rc2-maint-prefixed
3a50479 fixed bug #49676 (Possible endless loop when parsing dhcp options) & added unit test for that

git-subtree-dir: features/FEATURE_LWIP/lwip-interface/lwip
git-subtree-split: cd60f73f110829e00df46593fea5db26bcfb1662
2016-11-29 15:00:02 +02:00
Simon Hughes 46411f7f73 CFSTORE issue 3327: fix to build CFSTORE SRAM mode (disabling flash storage). 2016-11-28 16:09:00 +00:00
Anna Bridge fd7d5eca14 Merge pull request #3270 from AlessandroA/update_uvisor
uVisor: Update to v0.26.1
2016-11-24 13:22:14 +00:00
Russ Butler f843d49247 Merge pull request #3267 from SeppoTakalo/mesh_refactor
ONME-2857: Ethernet interface for Nanostack
2016-11-22 12:59:50 -05:00
Alessandro Angelino 1321e12eca uVisor: Update to v0.26.1 2016-11-22 17:24:05 +00:00
Michel Jaouen bc17759226 USBHAL.h : fix indentation 2016-11-22 10:52:10 +01:00
Michel Jaouen ad09abb71f USBAudio , USBSerial :fix call back 2016-11-22 10:52:03 +01:00
Martin Kojtal f7068eb57a Merge pull request #3279 from yanesca/mbedtls-hardware-acceleration-configuration
Move crypto hardware acceleration configuration.
2016-11-21 23:22:16 +00:00
Martin Kojtal a987cc0bee Merge pull request #3271 from ARMmbed/odin_wifi_default_on
WiFi: Make WiFi default networking interface on Odin board
2016-11-21 23:19:02 +00:00
Mizuho 56d71a429e added static specifer in green_metrics.cpp 2016-11-19 08:17:05 +09:00
Janos Follath e9144ad771 Apply new naming convention to mbed TLS macros 2016-11-18 15:01:01 +00:00
Steven Cooreman 245e2e2e2d Revert "[EFR32] Adding hardware acceleration for mbed TLS"
This reverts commit c0301b15d2.
2016-11-18 11:05:36 +01:00
Steven Cooreman ad773716ff [EFR32] Move Nanostack driver to Nanostack folder
mbed compile doesn't support two different FEATURE_X folders being merged, so we'll have to move our nanostack driver into the Nanostack folder for the time being.
2016-11-18 10:58:36 +01:00
Janos Follath 9137574e4d Move mbed TLS configuration symbol to macro section
The configuration option for the mbed TLS specific hardware acceleration
has to be in the macro section and not in the device capabilities
section in targets.json.

The option has also been renamed to better reflect its function.
2016-11-18 09:55:16 +00:00
Janos Follath 80aedd2f39 Move crypto hardware acceleration configuration
The crypto hardware acceleration might require defining a lot of mbed
TLS specific macros. Enumerating all of them in `targets.json` creates
too much noise, therefore we move it into a target specific mbed TLS
header.

The target with crypto hardware acceleration has to
        - indicate its capability in `targets.json` by adding "CRYPTO"
          to the "device_has" section
        - has to define his crypto hardware acceleration related macros
          in an `mbedtls_device.h` header
        - place the `mbedtls_device.h` file in the
          `features/mbedtls/targets/TARGET_XXXX`
          directory specific to the target
2016-11-17 14:38:04 +00:00
Martin Kojtal 3aac153fa8 Merge pull request #3254 from pan-/nrf_long_write
[BLE - NRF5] Add support for long write requests.
2016-11-16 17:45:02 +00:00
Martin Kojtal 5750f31d6d Merge pull request #3238 from LMESTM/dev_i2c_stm32f4hal
Dev i2c stm32f4hal
2016-11-16 17:42:12 +00:00
Martin Kojtal 98029e3906 Merge pull request #3065 from geky/nsapi-remove-same-thread-asserts
nsapi - Remove assertions on same-thread send/recv
2016-11-16 17:41:13 +00:00
Seppo Takalo 3d5962db48 Return localhost from NanostackInterface::get_ip_address()
For NetworkStack::gethostbyname() to properly validate the
IP address version, we must return a valid address from
Networkstack::get_ip_address().
2016-11-16 19:07:23 +02:00
Bartek Szatkowski 20b7f05721 WiFi: Make WiFi default networking interface on Odin board
That disables Ethernet by default and makes sure the Ethernet tests are
not failing when it's disabled.
2016-11-16 12:00:09 +00:00
Seppo Takalo 9f8fe897d8 Add documentation for NanostackEthernetInterface. 2016-11-15 15:30:39 +02:00
Vincent Coubard c59e057717 Fix documentation of function allocateLongWriteRequest. 2016-11-15 13:25:10 +00:00
Vincent Coubard 969c63040e Various fixes regarding typos, dead code and consistency. 2016-11-15 13:22:12 +00:00
Seppo Takalo ae885ca0e9 Implement Ethernet interface for Nanostack.
* New Phy type: NanostackEthernetPhy
* New tasklet: enet_tasklet.
* New Interface: NanostackEthernetInterface,
  inherited from MeshInterfaceNanostack
2016-11-15 13:15:52 +02:00
Seppo Takalo 7732adb8a0 Rename NanostackRfPhy to NanostackPhy
This is to allow other types of PHY drivers than just RF.
Mesh-API does not actually care about driver type, it is drivers
responsibility to register right handlers with Nanostack.

* Implement a wrapper class NanostackRfPhy to ensure backward
  compatibility.
* Remove mesh_connect()/disconnect() functions from MeshInterface
  This job is already done in inherited classes.
* LoWPANNDInterface and ThreadInterface should only be used with
  NanostackRfPhy.
2016-11-15 13:12:18 +02:00
Seppo Takalo 6ba755e444 Move MeshInterfaceNanostack to own file.
+Also nanostack_lock() moved to mesh_system.h
+Added includes into NanostackInterface.h to be backward
compatible
2016-11-15 13:12:18 +02:00
Seppo Takalo 27cced74fb Get rid of Mesh6LoWPAN_ND and MeshThread classes.
* Move all the functionality to LoWPANNDInterface and
    ThreadInterface classes.
* AbstractMesh class modified to be pure virtual
* Thread/6LoWPAN specific functionality totally separated.
    Now linker will drop the unreferenced classes.
* MeshInterfaceNanostack now inherits from AbstractMesh
2016-11-15 13:12:18 +02:00
Seppo Takalo 62558e9cff Get rid of AbstractNetworkInterface class. 2016-11-15 13:12:18 +02:00
Seppo Takalo 154d66404a Get rid of MeshInterfaceFactory. 2016-11-15 13:12:18 +02:00
Seppo Takalo 53cc28f4c5 Remove some references to YOTTA_CFG. 2016-11-15 13:12:18 +02:00
Sam Grove b6cc841a54 Merge pull request #3248 from LMESTM/fix_i2c_f411re_pins
test i2c slave: use standard Arduino pins for NUCLEO_F411RE
2016-11-14 21:50:59 -06:00
Sam Grove 71d253c86d Merge pull request #3240 from ARMmbed/ns_integration
Ns integration
2016-11-14 21:50:33 -06:00
Anna Bridge 405f8937a7 Merge pull request #3191 from tung7970/fix-mbedos
Fix lwip_mac_address buffer overflow and set_ip_bytes out of bound access
2016-11-10 17:05:38 +00:00
Anna Bridge 805af00b87 Merge pull request #3194 from NXPmicro/Update_K64_SDK_Drivers
Update K64 sdk drivers
2016-11-10 17:05:02 +00:00
Vincent Coubard 453045ab74 [BLE - NRF5] Add support for long write requests. 2016-11-10 16:58:07 +00:00
Anna Bridge 5fd81b37c3 Merge pull request #3232 from geky/nsapi-fix-gethostbyname-unspec-literal
nsapi - Fix missing NSAPI_UNSPEC check in gethostbyname for ip literals
2016-11-10 16:54:27 +00:00
Laurent MEUNIER 458752262e test i2c slave: use standard Arduino pins for NUCLEO_F411RE 2016-11-10 15:25:46 +01:00
Bartek Szatkowski db15c1a0a3 WiFi: Minor fixes to docs and includes 2016-11-10 09:40:48 +00:00
Mika Leppänen 4babe02b62 Added clearing of ipv6 addresses to lwip bringdown function 2016-11-10 09:07:35 +02:00
Christopher Haster b04a8da574 nsapi - Added test cases for gethostbyname
- test_dns_query
- test_dns_query_pref
- test_dns_literal
- test_dns_literal_pref
2016-11-09 12:11:02 -06:00
Laurent MEUNIER 4c36b9cb77 test i2c asynch : test transfer return value 2016-11-09 18:03:09 +01:00
Laurent MEUNIER 3897d93b71 test i2c asynch: Remove printf usage from interrupt context
The cbmaster_done function is a callback which will be called from
the asynch I2C interrupt handler. Calling to printf from this context
sometimes lead to missing interrupts on the slave side. This was at least
encountered on STM32F3 MCUs.
2016-11-09 18:03:07 +01:00
Seppo Takalo c71abfed26 Update NanostackSocket to match API changes in v5.0.7 2016-11-09 16:07:13 +02:00
Seppo Takalo cbb300db9c Nanostack v5.0.7 2016-11-09 15:42:41 +02:00
Seppo Takalo e27c7840d7 Don't clone coap-service, it's subtree now 2016-11-09 15:34:58 +02:00
Seppo Takalo 1e791e2e76 Add 'features/nanostack/FEATURE_NANOSTACK/coap-service/' from commit 'a1982c1de752c50410d975a03f505a69972539f5'
git-subtree-dir: features/nanostack/FEATURE_NANOSTACK/coap-service
git-subtree-mainline: c0adb069c9
git-subtree-split: a1982c1de7
2016-11-09 15:27:17 +02:00
Seppo Takalo c0adb069c9 Remove coap-service 2016-11-09 15:26:30 +02:00
Seppo Takalo 8c669c6f40 Add 'features/FEATURE_COMMON_PAL/mbed-client-randlib/' from commit '26cdd3904f3042c21155a39e940fafb266af20d2'
git-subtree-dir: features/FEATURE_COMMON_PAL/mbed-client-randlib
git-subtree-mainline: 6aedb5aeb7
git-subtree-split: 26cdd3904f
2016-11-09 15:13:57 +02:00
Seppo Takalo 6aedb5aeb7 Remove Randlib 2016-11-09 15:10:38 +02:00
Michel Jaouen 26bd467995 TARGET_STM : USB FS device support on ST HAL 2016-11-09 12:08:50 +01:00
Christopher Haster a3ad6181f4 nsapi - Fixed missing NSAPI_UNSPEC check in gethostbyname for ip literals 2016-11-08 18:05:35 -06:00
Martin Kojtal 96e1d5bd73 Merge pull request #3221 from andreaslarssonublox/ublox_odin_w2_drivers_update
u-blox odin w2 drivers update
2016-11-08 10:24:53 +00:00
Sam Grove 074555b715 Merge pull request #3113 from geky/static-assert
Add static assert macro
2016-11-07 10:25:17 -06:00
Christopher Haster 40836b11a5 nsapi - Removed assertions on same-thread send/recv
Initially these assertions were added to protected simultaneous
send/recv from the same socket when similarly purposed mutexes were
removed.

However, simultaneous send/recv can still be useful for UDP if the
payload is guaranteed to be less than the MTU across the entire
connection.
2016-11-07 09:43:09 -06:00
andreas.larsson e111810830 Added emac_stack_mem_copy. Needed by the u-blox ODIN-W2 driver. 2016-11-07 15:52:56 +01:00
Martin Kojtal 7eaf32baa0 Merge pull request #3075 from geky/nsapi-error-size-types-2
nsapi - Add standardized return types for size and errors
2016-11-07 11:13:40 +00:00
Steven Cooreman 3cfdf8f302 Make GreenTea respect STDIO baud rate 2016-11-07 11:57:02 +01:00
Tony Wu 70ad0f5226 netsocket - Fix set_ip_bytes out-of-bound access
set_ip_bytes() does a 16-byte memcpy from the input buffer to
the local nsapi_addr_t despite the address version.

If the address version is ipv4, the input buffer may only be
4-byte in size. This causes a out-of-bound access on the input buffer.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2016-11-04 11:02:34 +08:00
Tony Wu d039d30abe lwip - Fix lwip_mac_address buffer overflow
Sounds serious, but should be benign.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2016-11-03 20:16:58 +08:00
Mahadevan Mahesh 177eaff847 K64F ENET: Update to remove unused variable. This is no longer available in the updated SDK ENET driver 2016-11-03 07:07:49 -05:00
Sam Grove 16a8d2380e Merge pull request #3185 from NXPmicro/Update_Tests
Update tests to fix build failures. Also make the code similar to oth…
2016-11-03 02:24:07 -05:00
Sam Grove 35dbb3f256 Merge pull request #3166 from kjbracey-arm/ipv6_dns_server
nsapi_dns: Provide 2 IPv6-hosted default servers
2016-11-03 02:17:52 -05:00
Sam Grove 53b31318d0 Merge pull request #3165 from kjbracey-arm/ns_ipv6_checks
Add address type checks to NanostackInterface
2016-11-03 02:16:42 -05:00
Sam Grove 6712ed1b71 Merge pull request #3099 from maximmbed/max32625
MAX32625
2016-11-03 02:15:43 -05:00
Sam Grove 8b05a2a02b Merge pull request #3078 from infinnovation/lwip-config
lwip: Allow several configuration macros to be set externally (bis)
2016-11-03 02:15:10 -05:00
Christopher Haster 00458c391c nsapi - Adopted standardized return types in the Nanostack interfaces 2016-11-02 15:55:42 -05:00
Christopher Haster 78b9357c80 nsapi - Adopted standardized return types in lwip 2016-11-02 15:25:22 -05:00
Christopher Haster ba748ac1f8 nsapi - Added standardized return types for size and errors
nsapi_error_t         - enum of errors or 0 for NSAPI_ERROR_OK
nsapi_size_t          - unsigned size of data that could be sent
nsapi_size_or_error_t - either a non-negative size or negative error
2016-11-02 15:25:22 -05:00
Mahadevan Mahesh ac9668a498 Update tests to fix build failures. Also make the code similar to other tests
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-11-02 11:45:14 -05:00
Martin Kojtal fe80efe1bb Merge pull request #3072 from jeromecoutant/PR_I2C_TESTS
i2c_loop tests update for STM32
2016-11-02 13:01:29 +00:00
Christopher Haster 98db3ab1cb Adopted MBED_STATIC_ASSERT where possible 2016-11-01 21:39:48 -05:00
Sam Grove 7829b2f9bf Merge pull request #3161 from geky/nsapi-dns-version-heuristic
nsapi - Add better heuristic for the default record of DNS queries
2016-11-01 14:17:08 -05:00
Sam Grove 2a3f4eda19 Merge pull request #3162 from geky/nsapi-warning-cleanup
lwip/nsapi - Clean up warnings in network code
2016-11-01 14:15:08 -05:00
Sam Grove fcfc7b46a7 Merge pull request #3135 from geky/lwip-fix-cyclic-buffer-leak
lwip - Fix memory leak in k64f cyclic-buffer overflow
2016-11-01 14:12:24 -05:00
Sam Grove b777a9c145 Merge pull request #3143 from marcuschangarm/config-store-fix
CFStore fix needed for the Cloud Client
2016-11-01 14:08:39 -05:00
Sam Grove 6893535353 Merge pull request #3169 from bridadan/USB_Updates
[Update of #3014] Usb updates
2016-11-01 10:20:57 -05:00
Jeremy Brodt 2b35a62819 Add wait for serial characters to transmit before deleting serial object. 2016-11-01 09:46:51 -05:00
Martin Kojtal 8a9a246356 Merge pull request #3158 from mikaleppanen/6lowpan_panid_filter
Add support for 6lowpan PAN ID filter to mbed mesh api configuration
2016-10-31 14:38:31 +00:00
Kevin Bracey aa583bd8ce nsapi_dns: Provide 2 IPv6-hosted default servers
Replace Comodo and OpenDNS IPv4 servers with Google and DNS.WATCH IPv6
servers, so IPv6-only devices (eg 6LoWPAN) have a default.

3 IPv4 resolvers should be plenty - existing code doesn't remember which
one last worked, so if early list entries were unreachable performance
would be consistently bad anyway. Replacing two entries avoids
increasing image size and RAM consumption.

On an IPv6-only or IPv4-only system, the sendto() for the wrong type of
address should fail immediately - change loop to move on to the next
server for any sendto() error.
2016-10-31 15:48:54 +02:00
Kevin Bracey 2135c8f368 NanostackInterface: Remove string round-trips
Older versions of SocketAddress required conversion via string - this is
no longer the case.
2016-10-31 10:20:24 +02:00
Kevin Bracey b2834b9aa6 NanostackInterface: Allow binding to address
These days Nanostack does let you bind to an address - permit this.
(Remembering to check it is an IPv6 address).
2016-10-31 10:20:24 +02:00
Kevin Bracey 8e5391ab85 NanostackInterface: Check input address is IPv6
For the two calls that use the address - sendto and connect, check that it
actually is an IPv6 address.
2016-10-31 10:20:18 +02:00
Christopher Haster 8b7c051d03 lwip - Change k64f emac layer to drop frames on buffer exhaustion
Previously, exhausting hardware buffers would begin blocking the lwip
thread. This patch changes the emac layer to simply drop ethernet
frames, leaving recovery up to a higher level protocol.

This is consistent with the behaviour of the emac layer when unable
to allocate dynamic memory.
2016-10-28 15:22:08 -05:00
Christopher Haster 42105371ef lwip/nsapi - Cleaned up warnings in network code
- cc.h@57,1: "BYTE_ORDER" redefined
- lwip_inet_chksum.c@560,44: passing argument 1 of 'thumb2_checksum'
  discards 'const' qualifier from pointer target type
- lwip_pbuf.c@1172,9: variable 'err' set but not used
- SocketAddress.cpp@293,1: control reaches end of non-void function
2016-10-28 14:24:52 -05:00
Mahadevan Mahesh ef56b3d712 FAT tests: Add support for KL43Z
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-10-28 12:12:26 -05:00
Mahadevan Mahesh 046f3cdb26 Update USB driver for devices with Kinetis SDK support
1. Fix build issues with IAR and GCC toolchain
2. Update clock initialization code

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-10-28 11:47:20 -05:00
Christopher Haster d8d2b0a41d nsapi - Added better heuristic for the default record of DNS queries
Takes advantage of the get_ip_address function to predict the IP
address version wanted by the underlying interface. The should avoid
the need for most IPv6 interfaces to overload gethostbyname.

suggested by @kjbracey-arm
2016-10-28 11:41:33 -05:00
Martin Kojtal c9f9ffa583 Merge pull request #3140 from bridadan/remove_getchar_greentea_client
[tests] Replacing getchar with RawSerial getc in greentea-client
2016-10-28 15:34:13 +02:00
Mika Leppänen fae713e4d1 Added support for 6lowpan PAN ID filter to mbed mesh api configuration 2016-10-28 13:28:11 +03:00
Steven Cooreman c0301b15d2 [EFR32] Adding hardware acceleration for mbed TLS
Initial check-in of hardware acceleration support on EFR32 for mbed TLS (AES, SHA and ECC).
2016-10-27 23:28:25 -07:00
Marcus Chang 8876b7ef38 Removed static declaration for the StorageVolumeManager in the CFStore because this componenent is shared across all users of the flash. Added define guards to the CFStore location and size so that these can be changed from the settings file. 2016-10-27 10:26:28 +01:00
Martin Kojtal bd4eca325b Merge pull request #3024 from jeromecoutant/PR_analog_loop
analog_loop tests update for STM32
2016-10-27 11:02:10 +02:00
Martin Kojtal ba47aa546b Merge pull request #2897 from geky/nsapi-consistent-unspec
nsapi - Standardize support of NSAPI_UNSPEC
2016-10-27 10:26:00 +02:00
Martin Kojtal c9c6428598 Merge pull request #3122 from SiliconLabs/SiliconLabs-cleanup-rebase
[Silicon Labs] Update of Silicon Labs HAL
2016-10-27 09:56:16 +02:00
Brian Daniels 7a8946ff24 Replacing getchar with RawSerial getc in greentea-client.
This change prevents the standard library from allocating a large buffer
on the heap. On GCC_ARM, this is a saving of 1K. On ARM, this is a saving
of 64 bytes.
2016-10-26 16:55:54 -05:00
Martin Kojtal a7a53b7b6c Merge pull request #3046 from mmorenobarm/master
[BEETLE] Update BLE stack on Beetle board
2016-10-26 15:08:55 +02:00
Martin Kojtal 8c2f874b40 Merge pull request #3093 from BrunoMPires/master
[SDFileSystem] Enable / Disable serial debug.
2016-10-26 14:46:30 +02:00
Steven Cooreman 8b36d9c55f [EFM32] Workaround for SDK5.0.0 and USB
Aliased a few macros that changed name from SDK4.x to SDK5.x. in order to make the USB library play nice with SDK5.0.0
2016-10-25 12:05:07 -07:00
Christopher Haster 2fd15f4f44 lwip - Fixed memory leak in k64f cyclic-buffer overflow
This was actually several bugs colluding together.

1. Confusion on the buffer-semaphore paradigm used led to misuse of the
tx semaphore and potential for odd behaviour.

2. Equality tests on tx_consume_index and tx_produce_index did not
handle overflow correctly. This would allow tx_consume_index to catch
up to tx_produce_index and trick the k64f_rx_reclaim function into
forgetting about a whole buffer of pbufs.

3. On top of all of that, the ENET_BUFFDESCRIPTOR_TX_READ_MASK was not
correctly read immediately after being set due to either a compiler
optimization or hardware delays. This caused k64f_low_level_output
to eagerly overrun existing buff-descriptors before they had been
completely sent. Adopting the counting-semaphore paradigm for 1 avoided
this concern.

As pointed out by @infinnovation, the overflow only occurs in the rare
case that the 120MHz CPU can actually generate packets faster than the
ENET hardware can transmit on a 100Mbps link.
2016-10-25 13:22:17 -05:00
Martin Kojtal d7c02a13b1 Merge pull request #2953 from geky/nsapi-fix-ipv6-parsing
nsapi - Fix leftover bytes from suffix during ipv6 parsing
2016-10-25 14:37:38 +02:00
Martin Kojtal 4ec2f2e3ec Merge pull request #2943 from nvlsianpu/nrf_nvic_set_vector_func_trzy
[NRF5] NVIC_SetVector functionality
2016-10-25 11:10:03 +02:00
Marc Moreno Berengue e7829cd617 [BEETLE] Update BLE Cordio libraries
This patch updates the BLE Cordio libraries.

Signed-off-by: Marc Moreno <marc.morenoberengue@arm.com>
2016-10-24 17:41:23 +01:00
Bruno Monteiro Pires 8c9d92079e [SDFileSystem] Fixed tab spacing from 0e8ba85
* Removed missplaced tabs

Signed-off-by: Bruno Monteiro Pires <brunomonteiropires@gmail.com>
2016-10-24 14:35:00 -02:00
Bruno Monteiro Pires 0e8ba855a0 [SDFileSystem] Enable / Disable serial debug.
+ Added ``void debug(bool dbg)`` method to allow enabling/disabling
  serial debug at runtime.
+ Replaced calls to ``debug`` with ``debug_if`` to prevent messges
  from being thrown via serial when debug is disabled.

Signed-off-by: Bruno Monteiro Pires <brunomonteiropires@gmail.com>
2016-10-20 14:20:32 -02:00
Andres AG 509a72ca81 Add checks for NULL_ENTROPY and SSL_TLS in mbed OS 2016-10-20 17:07:32 +01:00
Christopher Haster cce82b13ac nsapi - Fixed unaligned writes from <word-sized scanf calls 2016-10-19 16:49:35 -05:00
Colin Hogben b516503fcb lwip: Expose principal socket limits as configuration parameters.
Allow the limits on numbers of sockets to be changed via the
configuration system.  The help texts show the RAM penalty from
increasing each value.
2016-10-19 21:37:52 +01:00
Christopher Haster bf83cb28cd nsapi - Fixed leftover bytes from suffix during ipv6 parsing
Thanks to @EduardPon for hunting this down
2016-10-19 15:28:32 -05:00
Colin Hogben 55485ae61e lwip: Annotate with memory used by config parameters 2016-10-19 14:49:04 +01:00
Colin Hogben b7a48b1220 lwip: Allow several configuration macros to be set externally.
Manually rebasing after the monster restructuring.
2016-10-19 14:49:03 +01:00
Martin Kojtal 382cb9f57a Merge pull request #3021 from hasnainvirk/master
ONME-2822 Binary build script mod
2016-10-19 13:42:22 +01:00
Sam Grove 026e880943 Merge pull request #3042 from mikaleppanen/lwip_tcp_acc_corr
Corrected lwip TCP socket accept ipv6 address conversion
2016-10-19 05:48:33 -05:00
Sam Grove 97670e3e6f Merge pull request #3040 from andresag01/update-mbedtls-to-2.4.0
Update feature/mbedtls to version 2.4.0
2016-10-19 05:48:06 -05:00
Sam Grove 61e40cd90b Merge pull request #3035 from c1728p9/fix_config_store
Fix config store
2016-10-19 05:47:47 -05:00
Sam Grove 5bcebba71d Merge pull request #3023 from jeromecoutant/PR_digital_loop_tests
digital_loop tests update for STM32
2016-10-19 05:46:22 -05:00
jeromecoutant ae9041b12c i2c_loop tests update for STM32 2016-10-19 11:15:38 +02:00
Russ Butler 3601b5ebb3 CFSTORE - Fix test failures due to fragmentation
In the config store create test in test case #5 the amount of available
memory is determined by fully allocating the heap. This is done
multiple times to determine if there is a memory leak. This causes
problems when even slight fragmentation occurs in the heap, since
the size that can be allocated is decreased slightly, which the test
flags as a memory leak.

This patch makes memory leak detection more robust by using metrics
provided by mbed_stats_heap_get. These metrics are an exact
measurement of memory allocated is not changed by fragmentation.
This allows the memory leak test to report correct values regardless of
fragmentation.
2016-10-17 21:08:57 -05:00
Andres AG 57814ddbbc Update feature/mbedtls to version 2.4.0 2016-10-17 13:32:25 +01:00
Mika Leppänen 61c7f9821b Corrected lwip TCP socket accept ipv6 address conversion 2016-10-17 15:30:09 +03:00
Russ Butler 9f0e756e28 CFSTORE - Delete handle even if key ref non zero
When closing a file handle remove the handle from the handle list
regardless of what the reference count of the key it is pointing to is.
This prevents config store from keeping a handle to file handles that
have gone out of scope.
2016-10-16 20:47:43 -05:00