Commit Graph

1102 Commits (878557e267097e7cf559e2100ac5656198a99cba)

Author SHA1 Message Date
Christopher Haster 467eb342f0 lwip: Migrated to utest framework
per @bridadan
2017-06-10 15:14:28 +01:00
Christopher Haster 0887683a13 lwip: Fixed count of udp iterations to reflect attempts 2017-06-10 15:14:28 +01:00
Christopher Haster 036f1cdfd4 lwip: Added udp buffer flushing after dropped packets
Avoids getting stuck in loop where the device always picks
up the previous test's packets
2017-06-10 15:14:28 +01:00
Christopher Haster f11f2b35e0 lwip: Increased DHCP timeout to 60 seconds
This matches the timeout used in linux:
https://linux.die.net/man/5/dhclient.conf

This resolves several issues noticed during testing when we
have a very large number of devices that try to get an IP address
around the same time.
2017-06-10 15:14:28 +01:00
Brian Daniels 70dd7cc273 Fixing some issues in the tcp/udp tests 2017-06-10 15:14:28 +01:00
Brian Daniels f313bc2988 Arranging logic in test to prevent left-over behavior 2017-06-10 15:14:28 +01:00
Brian Daniels dc87aaad1c Making udp_echo_parallel test more robust against network issues.
Making the test more forgiven for minor networking issues. Also adding
more debug prints to make it easier to see which packets are coming from
where.
2017-06-10 15:14:28 +01:00
Brian Daniels acaf435d64 Making UDP test less strict on dropped/mismatched packets.
Before, the UDP test was very strict on the number of packets it would
try to match before failing. Now it will keep trying for the whole test
to get enough passing packets. It also includes the test's UUID so you
can validate which packets are being received.
2017-06-10 15:14:28 +01:00
Brian Daniels 551ff03dc0 Adding ability to preserve Greentea UUID in test.
The Greentea UUID can be used as a source of entropy/randomness during
the test. This is useful for uniquely identifying a test run.
2017-06-10 15:14:28 +01:00
Brian Daniels 98a5262361 Adding failure logs to TCP echo test.
This adds some extra logs to the test for debugging purposes. Also
allows the test to fail immediately if it fails to obtain an IP address.
2017-06-10 15:14:28 +01:00
Brian Daniels 26eafd9958 Allowing dtls test to retry correctly.
The dtls test already has the ability to retry upon a UDP failure.
However the sockets are currently configured to be blocking and to wait
forever. I added a timeout of 1.5 seconds in order the test to correctly
timeout.
2017-06-10 15:14:28 +01:00
Azim Khan b03441870a Add new target in mbedtls importer Makefile for mbedtls tests 2017-06-09 17:01:00 +01:00
gabker01 fb6a2c075c Implement low-level Ethernet interface for lwIP
Based on lwip_ethernetif.c skeleton file,
use init, receive and transfer
functionality of SMSC9220 Ethernet driver
for the lightweight IP stack.

Receive mechanism is interrupt driven.

HW buffer sizes:
Tx = 4608 bytes (MTU)
Rx = 10560 bytes

lwIP fine tuning:
mbed-os/features/FEATURE_LWIP/lwip-interface/lwip/src/include/lwip/opt.h

Change-Id: I0ea95650c65fb32cafb5c2d3dde11420c61dba66
Signed-off-by: Gabor Kertesz <gabor.kertesz@arm.com>
2017-06-09 14:58:31 +01:00
Christopher Haster 40957c14b3 Added reporting of reserved heap
Note: Reporting of reserved stack is already performed by the thread
layer
2017-06-09 10:57:08 +01:00
Mika Leppänen ee30df993a Disabled lwip ethernet ipv6 multicast filter for STM boards 2017-06-09 11:57:24 +03:00
Sam Grove 8e76bf6da6 Merge pull request #4508 from kegilbert/kg-doxygen-framework-hal-rtos
Doxygen combined HAL, RTOS, and features/Framework updates to not produce warnings and errors [DOC Changes Only]
2017-06-08 23:52:33 -05:00
Sam Grove 52fde55b6f Merge pull request #4450 from deepikabhavnani/doxygen-template
Doxygen template
2017-06-08 22:42:06 -05:00
Kevin Gilbert 090e63f36a Placed verbatim tags around a pair of brackets that Doxygen interpreted as xml tags 2017-06-08 17:12:03 -05:00
Sam Grove 1afb23bdd8 Merge pull request #4441 from tung7970/fix-mbedos
lwip - fix typo and cleanup coding style
2017-06-08 16:30:16 -05:00
Kevin Gilbert 57a70d93f9 Resolved Doxygen build errors 2017-06-08 15:53:27 -05:00
Deepika 6ee4c7e219 Fix doxygen warnings in 'features/filesystem' 2017-06-08 15:48:21 -05:00
Seppo Takalo a36c9abca0 Fix compilation for NCS36510 RF driver.
RTX porting for this driver was done against the previous API that
have now been reverted.
2017-06-08 13:54:33 +03:00
Sam Grove 9f4b72d401 Merge pull request #4493 from ARMmbed/fix_timer_stack
Fix typo that used 16kB for stack.
2017-06-07 21:50:09 -05:00
Sam Grove 28eaac360a Merge pull request #4449 from c1728p9/lpc1768_fix
Fix semaphore usage on lpc1768 emac
2017-06-07 21:49:25 -05:00
Sam Grove 744b95cc9f Merge pull request #4425 from sg-/doxygen-template
Doxygen template and CI to not produce warnings and errors
2017-06-07 11:18:47 -05:00
Seppo Takalo 2f5b03e876 Fix typo that used 16kB for stack.
Intend is to use 2kB for stack, not 16kB, but the divide operand
has been forgotten here.
2017-06-07 15:36:09 +03:00
Hasnain Virk 09b07a49a6 Customer port verification tests for cellular
Basic TCP/UDP tests for PPP based onboard cellular modems.
Tests basic public APIs defined in CellularBase.h
A customer port must pass this test set, hence verifying their
particular implementation.
2017-06-07 14:57:48 +03:00
Yuguo Zou a812696c1d replace tab with space 2017-06-07 12:04:36 +08:00
Yuguo Zou ef1ddae694 resolve lwip init twice issue
resolve wifi example test fail before lwip is init
2017-06-07 12:04:36 +08:00
Sam Grove 28f590fc4c Merge pull request #4430 from pan-/utest_cases_romable
utest optimization: Allow case data structure to be put in ROM.
2017-06-06 19:58:53 -05:00
Sam Grove 6002bdd533 Merge pull request #4439 from sg-/proper-realtek-fix
Proper fix for 1fa30b7403
2017-06-06 16:00:55 -05:00
Sam Grove e9e937df04 Merge pull request #4454 from c1728p9/warning_fixes
Warning fixes
2017-06-06 16:00:02 -05:00
Antti Yli-Tokola d399395eab Revert Initialize remove_from_list flag to true.
* Cause regression in cloud registration
2017-06-06 13:48:42 +03:00
Antti Yli-Tokola fe808e0db5 mbed-coap fixes.
This commit includes:
 * Add support for sending response to duplicate messages
 * Add randomness for retransmission time
 * Fix usage sn coap blockwise max time data stored
 * CoAP parser option handler does not seem to handle "Option Length" completely according to spec
 * Handle '0' value if duplication buffer size is set through the sn_coap_protocol_set_duplicate_buffer_size()
2017-06-06 09:43:21 +03:00
Russ Butler 0de35e2a21 Fix config store deprecation warnings
Silence deprecation warnings in the config store C and C++ files. This
removes warnings that not relevant to applications. Note - using
these deprecated functions still gives an error outside of these files.
2017-06-05 18:06:10 -05:00
Russ Butler 2d7cf60278 Fix warning about unused mutex
Move the metrics mutex into the ifdef MBED_STACK_STATS_ENABLED since
it is not used ouside of it. This fixes the warning:
[Warning] greentea_metrics.cpp@37,28: 'mutex' defined but not used [-Wunused-variable]
2017-06-05 18:06:08 -05:00
Jimmy Brisson aabecf633b Remove doxygen warnings in nsapi 2017-06-05 17:32:46 -05:00
Russ Butler e57869039e Fix semaphore usage on lpc1768 emac
The semaphore xTXDCountSem had the count to match the number of
resources available, but was being used as a binary semaphore in a
loop to listen for events. This patch updates the logic to make use of
the resource count.

With RTX5 the OS traps with an error if the a semaphore is released
more times than its count with an error similar to
"Semaphore 10000e6c error -17". Because xTXDCountSem is being used
as a binary semaphore it triggered this trap. With this patch the
semaphore is no longer used as a binary semaphore and no longer traps.
2017-06-05 11:37:06 -05:00
Vincent Coubard f36619b859 utest_case.h : Fix comment indentation 2017-06-05 16:06:17 +01:00
Vincent Coubard 165d76ae25 utest case: Indicate explicitely that no data member shall be declared in
the Case class.
2017-06-05 16:06:17 +01:00
Vincent Coubard 5b27d65755 utest optimization: Allow case data structure to be put in ROM.
This patch split the Case class in two entities: Case and case_t. case_t contains the test case data structure while Case provide the interface to the test case. Unlike the class Case, case _t is a POD and can be instantiated at compile time and put in the constant data section (in ROM).

The Specification class has also been modified to accept arrays of case_t.
2017-06-05 16:06:17 +01:00
Anna Bridge 9d6a255a49 Merge pull request #4436 from NXPmicro/Fix_USB_Driver
Issue#4250: Fix USB driver for Kinetis devices
2017-06-05 14:36:38 +01:00
Tony Wu af3d6a52d1 lwip - fix typo and cleanup coding style
Signed-off-by: Tony Wu <tung7970@gmail.com>
2017-06-05 16:26:30 +08:00
Sam Grove 02bf926ffb Proper fix for 1fa30b7403
Replace #define with typedef
2017-06-04 11:26:21 -05:00
Jaeden Amero 3ef7845baa uVisor: Import uVisor v0.28.1 2017-06-04 14:42:00 +01:00
Niklas Hauser 9f63d3f603 uVisor: Remove process_malloc.h from uvisor-lib.h 2017-06-04 14:42:00 +01:00
Sam Grove 0da63eef2b Merge pull request #4087 from geky/localfs-fslike-fix
LocalFileSystem: Repair the FileSystemLike hooks
2017-06-04 08:35:26 -05:00
Sam Grove 1fa30b7403 Resolve conflict in builtin type names
In class MBRBlockDevice the tole32 function had used union member
names u32 and u8. The introduction of REALTEK_RTL8195AM cauesd a
conflict with type names in basic_types given they're aliased as
macros to uint32_t and uint8_t respectively.
2017-06-03 18:12:28 -05:00
Yuguo Zou f000eb3401 Restore TCPIP_THREAD_STACKSIZE and thread_stack_main
move some TCPIP stack data to heap;
switch off GDMA for SPI (only for SPI);
TCPIP_THREAD_STACKSIZE and thread_stack_main are identical to ARMmbed
2017-06-03 20:15:01 +01:00
Yuguo Zou 15d58690e9 fold static variables in RTWInterface.cpp to .h, modify lwipopts.h TCPIP_THREAD_STACKSIZE 2017-06-03 20:14:59 +01:00
Archcady 6a47d01c4a Rename Lwipopts_conf.h to lwipopts_conf.h 2017-06-03 20:14:51 +01:00
Archcady d0488c1076 Rename features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/target_realtek/Lwipopts_conf.h to features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_Realtek/Lwipopts_conf.h 2017-06-03 20:14:50 +01:00
Archcady 3d59643061 Add lwipopts_conf.h 2017-06-03 20:14:45 +01:00
Christopher Haster 0fc5ce2b5e LocalFileSystem: Moved away from deprecated open functions
The old open/opendir functions did not provide a route for errors and
relied on implementations manually setting errno. Updated to return
errors directly.
2017-06-03 13:18:02 -05:00
Christopher Haster eed1cec5d8 FileSystem: Provided default implementations for all non-file operations 2017-06-03 13:18:01 -05:00
Christopher Haster 5d6fc713fb FileSystem: Reintegrated FileSystemLike interface
Required for other representations of FileSystems, ie LocalFileSystem

Introduces FileSystemHandle for the same behaviour as FileHandle and
DirHandle.

Requires the following to hook into file/dir lookup:
```
int open(FileHandle **file, const char *filename, int flags)
int open(DirHandle **dir, const char *path)
```

This hook is provided by the FileSystem class, so requires no changes
from implementations.
2017-06-03 13:17:37 -05:00
Sam Grove ebeb776de9 Merge pull request #3972 from geky/fat-big-blocks
FAT: Add support for block sizes of 512-4096 bytes
2017-06-03 10:16:43 -05:00
Sam Grove 027843a64b Merge pull request #4389 from c1728p9/assert_mutex_not_in_isr
Assert that mutexes and prints are not use in interrupt or critical context
2017-06-03 10:16:20 -05:00
Martin Kojtal 533e6f0feb Merge pull request #4431 from kjbracey-arm/mbed_lwip_api_compat
Restore mbed OS 5.4 mbed_lwip_ function prototypes
2017-06-03 08:28:52 +02:00
Christopher Haster c0aa841ffd FAT: Added support for block sizes of 512-4096 bytes
This is necessary for support of block devices with >512 byte
blocks, such as most SPI flash parts.

- Enabled support of up to 4096 byte blocks
- Added support for heap-backed buffers using _FS_HEAPBUF
  - Necessary to avoid stack overflows
  - Avoids over-aggresive allocations of _MAX_SS
- Enabled _FS_TINY to further reduce memory footprint
  - Haven't found a downside for this yet except for possible
    thread contention
2017-06-03 07:10:48 +01:00
Russ Butler 96bd943ea2 RTX5: Enable priority inheritance and robust mode
Add the attribute flash to enable priority inheritance and robust mode.
The robust flag allows mutexes held by terminated threads to be
properly released.
2017-06-02 23:50:36 -05:00
Sam Grove 5f138810a9 Merge pull request #4294 from ARMmbed/feature_cmsis5
Update CMSIS-Core and RTX to version 5
2017-06-02 23:44:32 -05:00
Mahadevan Mahesh 30ef311933 Issue#4250: Fix USB driver for Kinetis devices
Move memory allocation to be done at a different location. Currently allocated
in a function that is called from the interrupt handler.

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-06-02 16:36:23 -05:00
Kevin Bracey 284843fdb3 Restore mbed OS 5.4 mbed_lwip_ function prototypes
External EMAC drivers are currently directly attaching to lwip_stack.c
via mbed_lwip_bringup et al. Restore the original prototypes to avoid
compatibility breakage.
2017-06-02 14:30:25 +03:00
Kevin Bracey 42cd1e1fac Make lwip_stack.c include its header
Fix some type mismatches that this revealed.
2017-06-02 14:29:34 +03:00
Martin Kojtal 3553a4573a Merge pull request #4178 from nvlsianpu/getAddrFromPeerTab_sd_api_5
[NRF52840]: SecurityManager::getAddressesFromBondTable
2017-06-01 14:05:39 +02:00
Martin Kojtal 9355531653 Merge pull request #4388 from c1728p9/deprecate_config_store
Deprecate config store and related libraries
2017-06-01 14:02:43 +02:00
Martin Kojtal 8a870a66c0 Merge pull request #4119 from hasnainvirk/cellular_feature_br
Cellular feature br
2017-06-01 14:01:17 +02:00
Russ Butler 58041a215d Deprecate config store and related libraries
Deprecate configuration-store, flash-journal and
storage-volume-manager for the 5.5 release. Also disable the
storage tests.
2017-05-31 12:08:11 -05:00
Jimmy Brisson b46b6c34aa Merge pull request #4321 from hanno-arm/update-mbedtls
Update mbed TLS to version 2.5.0
2017-05-31 11:26:36 -05:00
Hasnain Virk 24de27c989 Major Refactoring & extensions
For keep supporting external APIs with the same name (supposedly there are a larger
number of users of those APIs), BufferedSerial and ATParser are being renamed.
BufferedSerial becomes UARTSerial, will complement a  future USBSerial etc.
ATParser becomes ATCmdParser.

* UARTSerial moves to /drivers

* APN_db.h is moved from platform to cellular/util/.

* Original CellularInterface is restored for backward compatability (again, supposedly there
  are users of that).

* A new file, CellularBase is added which will now servce as the base class for all
  upcoming drivers.

* Special restructuring for the driver has been undertaken. This makes a clear cut distinction
  between an on-board or an off-board implementation.
  	- PPPCellularInterface is a generic network interface that works with a generic FileHandle
          and PPP. A derived class is needed to pass that FileHandle.
        - PPPCellularInterface provides some base functionality like network registration, AT setup,
          PPP connection etc. Lower level job is delegated to the derived classes and various modem
          specific APIs are provided which are supposed to be overridden.
        - UARTCellularInterface is derived from PPPCellularInterface. It constructs a FileHandle and
          passes it back to PPPCellularInterface as well as provides modem hangupf functionality.
          In future we could proive a USBInterface that would derive from PPPCellularInterface and could
          pass the FileHandle back.
	- OnboardCellularInterface is derived from UARTCellularInterfae and provides hooks to
          the target provided implementation of onbard_modem_api.h. An off-board modem, i.e, a modem on
          a shield has to override the modem_init(), modem_power_up() etc as it cannot use
          onboard_modem_api.h.
2017-05-31 15:02:11 +03:00
Hasnain Virk b51fbe817b mbedtls md5 or lwip internal crypt Fudge
Some targets define MBEDTLS_md5_C in targets.json in order to force the system to use
external mbedtls instead of lwip internal crypt, i.e.,  polarssl.
LWIP's internal md5 mechanism is tied to PPP  for some reason. In a previosly merged commit
an attempt was made to steal md5 functions by faking that PPP was turned on. However
that solution was broken in case of really turning on PPP  functionality.

This commit fixes the breakage and also corrects the logic in case a target decides to use
external md5 implementation from mbedtls or otherwise (i.e, wants to stick to the internal
implementation).
2017-05-31 15:02:11 +03:00
Hasnain Virk 1afc7bfbef A Reference CellularInterface driver
* Implements CellularInterface
* Reference design for CellularInterface implementations
* Uses an external mbed-os IP stack and talks to modem over PPP.
2017-05-31 15:02:11 +03:00
Hasnain Virk 658ddf7c30 ARMCC link errors fixed, nsapi_ppp glue layer changed
GCC have not been capable enough to catch some linker errors which arose when
ethernet support for LWIP was disabled. Checks have been added to make sure that
unrefrenced code is not linked in.

nsapi_ppp glue layer is made more transparent to public cellular API. Storage of IP
addresses is removed. PPP layer already stores the addresses, so we pass the pointer back
to the upper layers.

If PPP is not used, we provide dummy functions.
2017-05-31 15:02:11 +03:00
Hasnain Virk 01088647b9 Finalizing the public API for Cellular
* state machine corrections
* adding various standard API methods
* Addition/revision/enhancement of the nsapi_ppp glue layer
* Turning off debug by default
2017-05-31 15:02:11 +03:00
Hasnain Virk f602c936ff Redirecting LWIP debug trace to mbed-trace
This piece of code redirects LWIP debug trace to mbed-trace if configured.
This enables us to have universal traces.
2017-05-31 15:02:11 +03:00
Hasnain Virk 3b44f4758d Adding support for APN lookup
Mainly reutilizing code from ublox C027 support lib.
As we are using external PDP context, i.e., an external IP stack,
we will pass username and password to underlying stack running PPP.
We only support CHAP as the authentication protocol.
2017-05-31 15:02:11 +03:00
Hasnain Virk 93f436ebe0 Using DCD line to invoke poll() HUP
POSIX poll() provides a mechanism to attach a POLL_HUP event
if the modem or device hangs up on you. POLL_HUP and POLL_OUT are
mutually exclusive. We poll in the PPP_input() routine if the modem
hung up. If it did we stop the data consumption, close PPP and go back
to the driver for reserruction of AT parser and subsequent retries or
application specific actions.
This is achieved by attaching an interrupt to the DCD line of the modem.
When DCD line goes high (off), we have lost the carrier. So we record an
POLLHUP event using _poll_change().
2017-05-31 15:02:11 +03:00
Hasnain Virk 87a4580e5f Bug fixes & state machine corrections
In case of carrier lost, we would like to inform PPP data pump.
That involved setting up link status flag down semaphores.
mbed_lwip_bringup() and mbed_lwip_bringdown() had been Ethernet specific only.
We extend these routines to support PPP as well. Currently we support only one interface
at a time. However, future enhancement to multi interface support should be trivial.
2017-05-31 15:02:11 +03:00
Kevin Bracey 7e3c529d21 Unify LWIP Ethernet and PPP initialisation 2017-05-31 15:02:11 +03:00
Hasnain Virk 2abb078f27 Adding PPP link status callback
mbed_ppp_init() is extended to take a function ptr.
ppp_lwip will call this callback upon a change in ppp link status.
in the beginning, the Ublox driver waits until the PPP link is established properly.
2017-05-31 15:02:11 +03:00
Hasnain Virk 091396defe Adding mbed_trace to ppp_lwip
We introduce here mbed_trace to ppp_lwip shim layer.
If for some reason, FEATURE_COMMON_PAL is not included in the build,
dummies for trace functions are provided.
2017-05-31 15:02:11 +03:00
Kevin Bracey be00c1720b Separate LWIP core and Ethernet interface initialisation
Will allow LWIP to be initialised for PPP use.
2017-05-31 15:02:11 +03:00
Kevin Bracey ae7fd61d65 RAM optimizations
Trying to save RAM wherever possible for Ublox C027 platform
2017-05-31 15:02:11 +03:00
Kevin Bracey f37f265ed5 Add more LWIP JSON configuration, including PPP
Add configuration to control Ethernet, PPP and TCP support.

Replaces LWIP_TRANSPORT_ETHERNET/PPP defines formerly used by targets.

Ethernet and PPP can be enabled simultaneously.

DHCPv4 is now only enabled if IPv4 and Ethernet are both enabled - we
assume PPP uses IPCP for configuration.

PPP configuration adjusted to cope with LWIP 2.0 changes, and
optimised for RAM a little.
2017-05-31 15:02:11 +03:00
Kevin Bracey d0820d1ed3 Cope with different LWIP configurations 2017-05-31 15:02:11 +03:00
Kevin Bracey 7f136d5a35 PPP Interface for LWIP using FileHandle stream
This is a glue layer between LWIP PPP implementation and a device type FileHandle
stream. This enables an external interface which has a FileHandle, utilize LWIP network
stack via PPP, e.g., Cellular device, WiFi chips etc.
Its totally transparent to external device. Only thing this layer is interested in, is a
FileHandle. Similar is true for for the external device, it just hands over its stream to this
PPP layer and rest of the magic is done by this layer.
2017-05-31 15:02:11 +03:00
Kevin Bracey 533910cb87 Correct return type of FileHandle::size()
File size should be off_t, not size_t.
2017-05-31 15:02:11 +03:00
Sam Grove f438251aa3 Merge pull request #3936 from geky/bd-mbr
bd: Add MBR block device for standard storage partitioning
2017-05-30 13:04:50 -05:00
Bartek Szatkowski a8229b5351 Make sure all RTOS attribute structures are 0-ed before use 2017-05-30 18:55:56 +01:00
Bartek Szatkowski b01f13d1a0 Make sure all system threads and mutexes have clear names 2017-05-30 18:55:55 +01:00
Jaeden Amero 0016bd4639 uVisor: Re-import RTX5-capable uVisor
Use a newer version of uVisor that doesn't change the box main thread
function type. Previously, we required all box main thread definitions
to change from taking a `const void *` to a `void *` when moving to
RTX5. We now are backwards compatibile.
2017-05-30 18:55:53 +01:00
Jaeden Amero 6be9e47a07 uVisor: Import RTX5-capable uVisor
Imported from 20170407_v7-M tag, commit e33f2739e961 "Make function in
transition macro match target".
2017-05-30 18:55:53 +01:00
Bartek Szatkowski b793a3fb89 Update codebase for CMSIS5/RTX5
Update all of mbed-os to use RTX5.
2017-05-30 18:55:52 +01:00
jeromecoutant 2c610b392e Move STM32 USB device cpp file with other cpp files 2017-05-29 12:08:51 +02:00
jeromecoutant ba073da70a STM32 USBDevice : simplify include files
NB: there is now a default configuration
2017-05-29 12:08:48 +02:00
Sam Grove 3122abee84 Merge pull request #4230 from jamike/USBHostMSD_BockDevice
Usb host msd block device
2017-05-26 17:19:07 -05:00
Sam Grove 92e661b3c0 Merge pull request #4328 from nvlsianpu/remove_nrfsdk13_ble
Remove unwanted (and unused anymore) NRF5_SDK13 BLE port
2017-05-26 17:10:24 -05:00
Sam Grove ede77621d4 Merge pull request #4332 from yogpan01/master
Fix for blockwise observation failure
2017-05-26 17:03:17 -05:00
Sam Grove ef7ab92cb8 Merge pull request #4345 from ARMmbed/nanostack_update
Nanostack update
2017-05-26 17:01:29 -05:00
Sam Grove d11289b576 Merge pull request #4165 from adustm/can_init
fix #3863 Add an mbed API that allows the init of the CAN at the bus frequency
2017-05-26 10:45:19 -05:00
Sam Grove cb61fc5f81 Merge pull request #4333 from artokin/thread_interface_timeout
Adjust Thread interface connect timeout
2017-05-26 10:23:28 -05:00
Sam Grove 6a2d1bf870 Merge pull request #4340 from karsev/thread_med_support
Thread med support
2017-05-26 10:22:10 -05:00
Christopher Haster 3ee77e36f7 FAT: Fixed volume count check when formatted without MBR
This saves 64 blocks (32KB when used with 512B blocks) and drops
the minimum storage size from 64KB to 32KB.
2017-05-25 14:24:17 -05:00
Christopher Haster 3f92a15960 FAT: Added support for multiple active filesystems
- Increased _VOLUMES to 4
- Fixed a few issues in the FATFileSystem's _fsid
- Added tests for multiple partitions of fatfs
2017-05-24 11:18:47 -05:00
Christopher Haster d1468a68ab FAT: Removed implicit MBR from FAT filesystem during format
- Implicit MBR still allowed during mount
  - maintains storage compatibility
- Not needed
  - MBR utility is not exposed through the FAT filesystem,
    so the only used partition was always the first. Omitting
    the MBR is functionally equivalent
  - Saves a few blocks on storage for MBR + offset
    for FAT alignment
- Duplicated with MBRBlockDevice
  - The implicit MBR actually prevents nesting a FAT filesystem
    in the MBRBlockDevice
2017-05-23 11:56:00 -05:00
Christopher Haster 590a40d9bf bd: Added MBRBlockDevice for handling a master boot record on a block device 2017-05-23 11:55:57 -05:00
Jimmy Brisson a56f874510 Reduce size of heap block device test
to fit into smaller targets
2017-05-22 10:47:36 -05:00
Kari Severinkangas 4a438b6ab2 Thread minimal end device operating mode added 2017-05-19 11:30:11 +03:00
Sam Grove 8e8174ac66 Merge pull request #4274 from kjbracey-arm/dns_query_garbage
NSAPI - Don't send trailing garbage in DNS queries
2017-05-18 09:29:59 -05:00
Sam Grove 6a96481d4d Merge pull request #4311 from kjbracey-arm/lwip_cksum
Disable lwIP checksum-on-copy
2017-05-18 09:28:10 -05:00
Seppo Takalo 3126c3abf1 Update Nanostack to v6.1.0 2017-05-18 11:51:14 +03:00
Seppo Takalo ad094fc5b6 Merge commit 'dcfe6c8f37971fa8a587eb488aca0437ead84f29' as 'features/FEATURE_COMMON_PAL/sal-stack-nanostack-eventloop' 2017-05-18 11:45:57 +03:00
Seppo Takalo 92c284e85d Remove event-loop, to be added as a subtree 2017-05-18 11:15:02 +03:00
Hanno Becker ddb7cef907 Update mbed TLS to version 2.5.0 2017-05-17 15:42:07 +01:00
Arto Kinnunen 28a6fa1819 Adjust Thread interface connect timeout
Thread device needs to wait for connectivity:
-routers will create new network and get local connectivity
-end device will get connectivity once attached to existing network
-devices without network settings gets connectivity once
 commissioned and attached to network
2017-05-17 12:45:52 +03:00
Yogesh Pande 8062837848 Initialize remove_from_list flag to true 2017-05-17 02:32:14 -07:00
Martin Kojtal 8f295177ce Merge pull request #4317 from c1728p9/reduce_test_overhead
Reduce test overhead in preperation for CMSIS 5
2017-05-17 10:13:25 +01:00
Michel Jaouen 6401d48c17 USBHost : modify USB_10 since USBHostMSD inherits BlockDevice class 2017-05-17 09:04:39 +02:00
Michel Jaouen edbba13640 USBHostMSD : fix possible race condition during connection 2017-05-17 08:58:34 +02:00
Michel Jaouen d30a9a63d8 USHostMSD: rely on BlockDevice 2017-05-17 08:58:33 +02:00
Yogesh Pande 95b657bfee Fix for blockwise observation failure
This commit includes
 - Fix for https://github.com/ARMmbed/mbed-client/issues/481
 - Detailed Changelog available here https://github.com/ARMmbed/mbed-coap/compare/v4.0.3...v4.0.4
2017-05-16 22:04:53 -07:00
Andrzej Puzdrowski 39c1b3f5f3 Redirect "implemenetation of SecurityManager::getAddressesFromBondTable for SD 5.x.x" to NRF5 BLE port sources. 2017-05-16 13:48:13 +02:00
Andrzej Puzdrowski 64f2a9d467 remove unwanted (and unused anymore) NRF5_SDK13 BLE port. It was omited in https://github.com/ARMmbed/mbed-os/pull/4245. 2017-05-16 11:46:35 +02:00
Bartek Szatkowski 4f3aabc029 Reshuffled memory usage for heap block device tests on small targets
Revert removal of printfs. Make the block device size smaller.
2017-05-16 10:45:18 +01:00
Hanno Becker e9e3040297 Update mbed TLS to version 2.5.0-rc1 2017-05-15 17:07:30 +01:00
Martin Kojtal c732739897 Merge pull request #4291 from jamike/USBHost_fix_target_stm_build
USBHost : fix build for TARGET_STM
2017-05-15 16:18:36 +01:00
Martin Kojtal 27a6965842 Merge pull request #4284 from mikaleppanen/lwip_randlib
LWIP random library and TCP sequence number improvements
2017-05-15 16:15:39 +01:00
Martin Kojtal ef56d9569b Merge pull request #4245 from nvlsianpu/merge_nrf52840_to_nrf5
[NRF5 + NRF52840]: Merge nrf52840 to [NRF5] sources
2017-05-15 16:10:32 +01:00
Martin Kojtal 07c8b214f6 Merge pull request #4235 from ARMmbed/nanostack-libservice
Nanostack libservice
2017-05-15 16:05:34 +01:00
Martin Kojtal d98da4089a Merge pull request #4231 from jamike/USBH0ST_TARGET_STM_HUB_SUPPORT
USBHOST hub support for TARGET_STM
2017-05-15 16:01:34 +01:00
adustm cd15589c45 Add header to the test main.cpp 2017-05-15 14:27:22 +02:00
jeromecoutant f027cf429b Add new CAN API test MBED_A30 2017-05-15 14:27:22 +02:00
Bartek Szatkowski 6a0fcd3c58 Reduce test overhead in preparation for CMSIS 5
Reduce RAM consumption so all tests can still be built when using
CMSIS/RTX5. Also reduce clutter by removing the per target stack size
defines in the tests.
2017-05-14 19:25:19 -05:00
Kevin Bracey 69ec30b7b9 Disable lwIP checksum-on-copy
Current version of lwIP has a bug in its checksum-on-copy code - see

      https://github.com/ARMmbed/mbed-os/issues/4140
  and https://savannah.nongnu.org/bugs/?50914

Pending a fix from lwIP, set LWIP_CHECKSUM_ON_COPY to 0 to work around.
Will impact performance.
2017-05-12 10:24:17 +03:00
Martin Kojtal 1c2ebf83f5 unsupported/net: removal of net libraries
Remove all unsupported net libraries from features/unsupported. There's already lwip for mbed OS that we support, and cellular will come soon to the codebase reworked.

Plus remove unsupported/tests for these libraries.
2017-05-11 17:32:44 -05:00
Seppo Takalo bb7eecaedc Merge commit '1d3c49a408faa231d18d83fb03c65425cf22c507' into nanostack-libservice
* commit '1d3c49a408faa231d18d83fb03c65425cf22c507':
  Squashed 'features/FEATURE_COMMON_PAL/nanostack-libservice/' changes from 67affc61b..6444c8a4f
2017-05-11 13:38:20 +03:00
Michel Jaouen f27f3bbfee USBHOST: fix build for TARGET_STM 2017-05-10 09:33:29 +02:00
Mika Leppänen 55753be8ef lwip corrected coverity and compiler warnings
Coverity ids: 1373147 and 1374442.
2017-05-10 10:20:44 +03:00
Mika Leppänen 053139b85d lwip added support for random library and TCP ISN initialisation
lwip now uses mbed client random library under common pal when available.
Ported lwip reference TCP initial sequence number handling to mbed-os
lwip stack. Handling is based on RFC 6528.
2017-05-10 10:20:44 +03:00
Michel Jaouen c4a049750b USBHOST : TARGET_STM small speed device not supported on hub
add warn small speed device are connected on hub
2017-05-09 16:18:34 +02:00
Michel Jaouen fdde91037f USBHOST : mouse fix for high speed mouse 2017-05-09 16:18:33 +02:00
Michel Jaouen fdec62002e USBHOST: TARGET_STM add more hub to support larger hub 2017-05-09 16:18:32 +02:00
Michel Jaouen f3c6f95b0a USBHOST: USBHOST_OTHER Add timeout on TD (indentation) 2017-05-09 16:18:32 +02:00
Michel Jaouen 309b9aef62 USBHOST TARGET_STM : changes for hub support 2017-05-09 16:18:31 +02:00
Michel Jaouen c860377464 USBHOST : USBHOST_OTHER add control disable counter 2017-05-09 16:18:30 +02:00
Michel Jaouen 73d8e5e9ef USBHOST: USBHOST_OTHER fix in endpoint
- set_state specific
- speed init
2017-05-09 16:18:29 +02:00
Michel Jaouen ccce1c5273 USBHOST : change interrupt endpoint behaviour
In case interrupt reports error,
call back  can send interrupt request again.
2017-05-09 16:18:29 +02:00
Michel Jaouen fa2abd22c7 USBHost : USBHostHID , USBHostHub fix indentation. 2017-05-09 16:18:28 +02:00
Michel Jaouen bae762eb24 USBHOST: put deviceInited to false when device disconnected 2017-05-09 16:18:27 +02:00
Michel Jaouen bf2fc0a2cf USBHOST : as DISCONNECTED_EVENT from root hub is sent in irq handler
and connection from hub are  sent from usb task.
A connection on an hub port can be sent ,
after irq disconnection from root hub.
2017-05-09 16:18:26 +02:00
Michel Jaouen 41f12260b1 USBHost : fix indentation USBHost.cpp 2017-05-09 16:18:25 +02:00
Michel Jaouen 27877bd4e8 USBHOST : fix disconnection during device registering 2017-05-09 16:18:24 +02:00
Andrzej Puzdrowski 1f1168a51e NRF5: changes for code review of merg nrf52840 to NRF5 sources
s140 headers renamed form ble_* to nrf_ble_*,
Removed s130 and s132 headers named form ble_*
(Them had been added by #2ff572682798562e812015dc775b5896e0fda5a4)
Headers inclusinons were changed in order to meet above changes.

Revrted bad change in us_ticker.c:
use __disable_irq lock instead of core_util_critical_section_enter lock
for setting rtc1 tick for systick emulation as was good before.
2017-05-09 15:43:30 +02:00
Jimmy Brisson 3b11b23371 Merge pull request #4238 from tung7970/fix-mbedos
lwip - power up emac before reading its settings
2017-05-08 11:15:45 -05:00
Anna Bridge a85873c863 Merge pull request #4248 from screamerbg/fix/stm32-usb-support
Fixed STM32 USB Device support for mbed Classic
2017-05-05 13:51:38 +01:00
Kevin Bracey 984e87d8e9 NSAPI - Don't send trailing garbage in DNS queries
Observed during investigation of
https://github.com/ARMmbed/mbed-os/issues/4246 - DNS queries sent
the entire buffer, not just the bit filled in.

Inefficient, especially for 6LoWPAN, and a security hole - the trailing
data could be previously-used heap.
2017-05-05 11:35:48 +03:00
Anna Bridge e2469ecbba Merge pull request #4186 from geky/fs-dot-entries
Filesystem: Include '.' and '..' in directory iteration
2017-05-04 15:55:41 +01:00
Anna Bridge 9a3122af39 Merge pull request #4254 from 0x6d61726b/patch-3
Removed unused variable in TARGET_NXP/lpc17_emac.c
2017-05-04 15:47:43 +01:00
Jimmy Brisson d123ee1162 Merge pull request #4155 from karsev/thread_sec_policy
Thread sec policy
2017-05-02 11:33:25 -05:00
0x6d61726b acf18ac9c7 removed warning: unused variable 'ethhdr' [-Wunused-variable] 2017-04-30 16:29:47 +02:00
Mihail Stoyanov 301ce550c9 Fixed STM32 USB Device support by migrating all specific target headers to unsupported features where they belong until USB support is officially introduced in mbed OS 5 2017-04-28 17:23:07 +01:00
Tony Wu 0b2bfca6da lwip - delay mbed_lwip_set_mac_address until device is inited
mbed_lwip_set_mac_address calls mbed_mac_address to get hwaddr
from device, but device may not be accessible until it is powered
up and initialized.

This patch delays mbed_lwip_set_mac_address call until device is
ready.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-04-28 00:30:40 +08:00
Tony Wu cdc40ff3bb lwip - power up emac before reading its settings
emac settings are only available after powered up.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-04-28 00:15:07 +08:00
Seppo Takalo fb91d73606 Merge commit '8d65f6d10a610bd4305528f7338e081059a93fb8' as 'features/FEATURE_COMMON_PAL/nanostack-libservice' 2017-04-27 15:19:39 +03:00
Seppo Takalo 210508b801 Remove libservice, to be added as a subtree 2017-04-27 15:15:30 +03:00
Andrzej Puzdrowski 53c6f853c0 Apply resloution for the "Read long UUID of service problem" according to
NRFFOETT-1674.
2017-04-27 12:15:58 +02:00
Andrzej Puzdrowski b2080ab6d9 Make NRF5 BLE implementation compatible with SoftDevice API 2.x.x,3.x.x,5.0.0-1.alpha by
Copy of changes from
features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5_SDK13/source
to
features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source
2017-04-27 09:46:38 +02:00
Jimmy Brisson 143e3462a3 Merge pull request #4210 from adbridge/usb_logo
USB: Added support for the logo key to the keyboard
2017-04-24 10:56:29 -05:00
adbridge d23520ebb2 Maxim USB library update
Adding support for new platforms into official USB library
2017-04-21 17:06:46 +01:00
adbridge 906286f446 Added support for the logo key to the keyboard
Minor change - List of key modifiers updated to include the
logo/GUI/windows key. Also added the options to specify the right hand
versions of the keys rather than just the left if for some reason
someone wants to do this.

Changes are limited to the keyboard header file and are backwards
compatible.

The new modifier values are in line with the table given on page 56 of
this document http://www.usb.org/developers/hidpage/HID1_11.pdf
2017-04-21 16:56:56 +01:00
Anna Bridge 49802765a9 Merge pull request #4199 from adbridge/usb_prs
USB: bus reset for KL25Z fix, USBSerial update
2017-04-21 14:15:04 +01:00
Sam Grove 32401318a6 Merge pull request #4048 from tung7970/feature-lwipopt
Make LWIP options configurable
2017-04-20 09:05:31 -05:00
Anna Bridge 2e2fe377b3 bus reset for KL25Z fix, USBSerial update
1. added call to busReset() to KL25Z HAL; now the USB stack survives if you disconnect the cable, similar to LPC40 2. busReset callback to update terminal_connected in USBCDC 3. new bool USBSerial::connected() to read protected terminal_connected property, useful when you want to check if the terminal is ready from main app
2017-04-19 15:38:51 +01:00
Christopher Haster fd80dcc51b Filesystem: Include '.' and '..' in directory iteration
The standard is intentionally vague on if filesystems must
have '.' and '..' entries, allowing filesystems to omit this
concept completely:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html

However, the '.' and '..' entries are common on FAT filesystems
and in most other filesystems.

This enables '.' and '..' entries in the FAT filesystem.
2017-04-13 14:30:57 -05:00
Alessandro Angelino 8bc81e0efd uVisor: Fix copy of quick-start doc in exporter script 2017-04-12 14:28:43 +01:00
Kari Severinkangas f5d6e7d33c Update README.md
Minor changes
2017-04-12 15:21:02 +03:00
Kari Severinkangas 7d2b03bde8 Update README.md
Config table updated
2017-04-11 16:37:52 +03:00
Kari Severinkangas e10f2ae287 irrelevant zeros removed from timestamp 2017-04-11 16:19:01 +03:00
Kari Severinkangas e52d3db50e Security policy defined in .json 2017-04-11 15:45:12 +03:00
Sam Grove c776eaa767 Merge pull request #3987 from karsev/thread_link_config_update
thread link configuration bypass flag in mesh-api
2017-04-10 10:16:05 -05:00
Tony Wu e9d3cf4468 lwip - make lwip thread stack size configurable
Define tcpip-thread-stacksize and default-thread-stacksize in
lwip's mbed_lib.json, and use them accordingly in lwipopts.h.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-04-10 17:09:27 +08:00
Sam Grove 8af190f550 Merge pull request #4112 from adamgreen/fixLpc17xxEthernetIsrAlwaysLinkedIn
Only link in LPC17xx ethernet ISR as needed
2017-04-06 11:16:10 -05:00
Sam Grove 7a35a4df51 Merge pull request #3992 from u-blox/c030-dev
Introducing UBLOX_C030 platform.
2017-04-06 11:07:58 -05:00
Sam Grove 517982c6f7 Merge pull request #4060 from geky/fix-lpc1768-broadcast-recv
lpc1768: Remove invalid use of IP_SOF_BROADCAST_RECV option
2017-04-06 08:56:18 -05:00
Adam Green be0bab3f40 Only link in LPC17xx ethernet ISR as needed
Originally the ethernet ISR would be linked in to all mbed-os based
firmware because it was named ENET_IRQHandler() so that it would be
automatically placed in the FLASH image's interrupt vector table. This
meant that programs which made no use of the lwIP stack still pulled in
this ISR.

This commit changes the name of the routine so that the ISR isn't
automatically placed in the interrupt vector table at link time but is
instead dynamically placed in the interrupt vector table at runtime
when the lwIP stack is initialized. Now the ethernet ISR is only linked
in when it is actually needed.

Example arm-none-eabi-size output for a simple LED blinking program
showing the before and after size results:
   text	   data	    bss	    dec	    hex	filename
  13208	    148	   7784	  21140	   5294	LPC1768/HelloWorld.elf

   text	   data	    bss	    dec	    hex	filename
  12700	    148	   7468	  20316	   4f5c	LPC1768/HelloWorld.elf
2017-04-04 14:42:21 -07:00
Rob Meades 7387c09872 Introducing UBLOX_C030 platform. 2017-04-04 16:22:50 +01:00
bcostm bca2617662 STM32L0: add family in USBEndpoints.h 2017-03-30 14:50:13 +02:00
Sam Grove 067fe9b0e5 Merge pull request #3848 from jamike/USBAUDIO_JITTER
USBAudio: writesync with 1 sample jitter capability.
2017-03-30 00:01:07 +01:00
Christopher Haster 2918270222 lpc1768: Removed invalid use of IP_SOF_BROADCAST_RECV option
From opt.h:
IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast
filter on recv operations.

The IP_SOF_BROADCAST_RECV option does not enable or disable recieving
broadcast packets, it only enables a software filter.
2017-03-28 13:37:36 -05:00
Michel Jaouen f6f73938eb USBHOST : fix device disconnection from hub during hub port reset 2017-03-28 11:32:43 +02:00
Kari Severinkangas 8862edefad -useless static_config.h removed 2017-03-28 11:46:40 +03:00
Michel Jaouen 5913cf309e USBAudio: writesync with 1 sample jitter capability. 2017-03-28 10:22:20 +02:00
Kari Severinkangas b2b106c431 config update to the previous commit 2017-03-28 11:16:05 +03:00
Kari Severinkangas 156cd00d66 - some refactoring and cleaning 2017-03-28 11:14:03 +03:00
Anna Bridge 35a561217a Merge pull request #3934 from stevew817/siliconlabs/update_sdk_tbsense_12
[Silicon Labs] Update to HAL and devices
2017-03-24 14:16:50 +00:00
Anna Bridge 12eb5b702d Merge pull request #3841 from nvlsianpu/nRF52840_target
Add nRf52840 target
2017-03-23 15:45:44 +00:00
Anna Bridge 039ef42822 Merge pull request #3867 from geky/fs-revert-filehandle
Filesystem: Revert deprecation of FileHandle
2017-03-23 15:45:01 +00:00
Anna Bridge fd5c327de1 Merge pull request #3976 from yogpan01/master
mbed-coap error fixes merge to mbed OS
2017-03-23 15:40:41 +00:00
Anna Bridge ebfe04a841 Merge pull request #3975 from kjbracey-arm/lwip_buf_free
NSAPI/lwIP: Free held netbuf on close
2017-03-23 15:39:52 +00:00