Commit Graph

7055 Commits (7a07c386cb9908cddcdc4170bd530ff2f8937c6c)

Author SHA1 Message Date
Rohit Grover 02738b7af6 Add a separate error code for runtime/intergrity-check failures 2016-07-22 09:51:11 +01:00
Martin Kojtal 37e254fa16 Merge pull request #2204 from fvincenzo/master
Lp_ticker and Us_ticker time count fix
2016-07-22 09:50:05 +01:00
Rohit Grover 8396aafb5a add missing include for stdint.h to Driver_Storage.h 2016-07-22 09:38:11 +01:00
Rohit Grover 81ab477abc switch to using more specific names in DEVICE_STORAGE_CONFIG_*
This should help avoid conflicts with configs for other Storage devices in the
future.
2016-07-22 09:31:43 +01:00
Rohit Grover c82e7775b1 minor fixes to include headers 2016-07-22 09:21:58 +01:00
Rohit Grover 9014777a31 remove an un-necessary comment header 2016-07-22 09:17:44 +01:00
Rohit Grover 4f2c3edf5b salvaging the changes from PR#2150 which are useful in spite of fix to RWW
The RWW fix is controversial because it requires holding off interrupts for
periods of around 5ms at a time. But there were still some minor improvements
around that change which could be retained. This commit contains these
changes.
2016-07-22 09:14:39 +01:00
Martin Kojtal 781fda0465 Merge pull request #2193 from neilt6/lpc15xx-ticker-fix
[LPC15XX] Fixed µs_ticker implementation
2016-07-22 09:11:17 +01:00
Vincent Coubard 50ce4fd59c Initialize ticker prior to read, this is required by the wait_api module. 2016-07-22 08:41:34 +01:00
Christopher Haster 1fcc02318a Add 'features/net/FEATURE_IPV4/lwip-interface/' from commit '63e816f0858cf3de3678aea4deec941add516790'
git-subtree-dir: features/net/FEATURE_IPV4/lwip-interface
git-subtree-mainline: 83f24fb0bd
git-subtree-split: 63e816f085
2016-07-22 02:04:56 -05:00
Christopher Haster 63e816f085 Adopted nsapi_stack_t in lwip
- Removes problem with non-gced vtables
- Moves some tedius operations up into the nsapi
2016-07-22 02:02:38 -05:00
Christopher Haster a40c23d214 Adopted the nsapi_socket_t type in lwip 2016-07-22 02:02:38 -05:00
Christopher Haster f49aa238d2 Adopted nsapi header in lwip 2016-07-22 02:02:38 -05:00
Christopher Haster c412a0cfde Adopted SingletonPtr to avoid vtable leak in lwip
Globally declared C++ classes with vtables are not gced by current
toolchains, even if the C++ class contains no member variables and
no constructor. This causes all of lwip to be dragged into resulting
binaries, even if lwip is not accessed.

Adoption of the SingletonPtr class in lwip allows us to workaround
this issue.
2016-07-22 02:02:38 -05:00
Christopher Haster 3b20e4b8f3 Moved to static declaration of LWIPStack and refactored a bit
- Renamed LWIPInterface to LWIPStack
- Moved LWIPStack to static declaration
- Removed hidden comments
- Reduced lwip includes
2016-07-22 02:02:38 -05:00
Christopher Haster 004750be26 Move to lwip netconn api to correctly synchronize multiple threads
- lwip socket api did not provide signaling mechanism compatible with
  mutliple stacks
- lwip raw api did not support multiple threads

The netconn api provides the necessary signalling mechanism while still
supporting multiple threads. The netconn api also shares several design
similarities to the current socket api.

Additionally, the move to a higher-level api reduced implementation
complexity significantly and will hopefully reduce integration
difficulties
2016-07-22 02:02:38 -05:00
Christopher Haster 41629b49c6 Added stddef.h include to cc.h in lwip for size_t define
per @cyliangtw
2016-07-22 02:02:37 -05:00
Armelle DUBOC 59a18290de Workshop st: Add IPV4 feature to NUCLEO_F746ZG platform (#438)
* NUCLEO_F746ZG : enable Ethernet and LwIP for this target.
Net tests were passed :
mbed-os-features-feature_ipv4-tests-mbedmicro-net-nist_internet_time_service
| OK
mbed-os-features-feature_ipv4-tests-mbedmicro-net-tcp_client_hello_world
| OK
The 2 other are failing because I cannot test them on my ST computer.
2016-07-22 02:02:37 -05:00
Russ Butler 35ca7d108a Separate interface from stack for ethernet
Refactor LWIPInterface so it is a NetworkInterface rather than a
NetworkStack.  Rename LWIPInterface to EthernetInterface since it
is no longer a stack.  Update tests to use this new name.
2016-07-22 02:02:37 -05:00
Sam Grove 6762ead376 add lwip to all c files that come from the lwip codebase to reduce duplicate file names when exporting. 2016-07-22 02:02:37 -05:00
Russ Butler 3fe5d320ec Fix LPC1768 tests
Don't have GCC_ARM use GCC_CR's memory region in mem.c.  This fixes
some tests.
2016-07-22 02:02:37 -05:00
Sam Grove 89d02fab17 added default placement macro for all boards and toolchains 2016-07-22 02:02:37 -05:00
Sam Grove f4e3ab4058 add IAR placement for LPC1768 and lwip buffers 2016-07-22 02:02:37 -05:00
Christopher Haster 68365a9a59 Increased lwip connect timeout to 5 seconds by default
For very slow networks the previous default has be problematically short
2016-07-22 02:02:37 -05:00
Christopher Haster d82bbb1c40 Fixed incorrect semaphore handling on lwip connect and socket_connect
- Semaphore returns 0 on timeout, and negative was incorrect used for
  errors
- Correctly checked error code on tcp_connect

thanks to @LiyouZhou
fixes #284, fixes #285, fixes #166
2016-07-22 02:02:37 -05:00
Christopher Haster df5c05f38c Added handling for already connected sockets in LWIPInterface::connect 2016-07-22 02:02:37 -05:00
Christopher Haster 9eac5102fd Fixed behaviour of get_ip_address and get_mac_address for LWIPInterface
per the socket API documentation:

  /** Get the local IP address
   *
   *  @return         Null-terminated representation of the local IP address
   *                  or null if not yet connected
   */
  virtual const char *get_ip_address() = 0;

LWIPInterface incorrectly returned "\0" if unconnected
2016-07-22 02:02:37 -05:00
Christopher Haster 53349343e9 Added NSAPI_KEEPIDLE option to the socket API and LWIPInterface 2016-07-22 02:02:37 -05:00
geky 864c73b64a Implement the NSAPI_KEEPINTVL in the LWIPInterface 2016-07-22 02:02:37 -05:00
Christopher Haster b251c59ffe Added support for NSAPI_KEEPALIVE in LWIPInterface 2016-07-22 02:02:37 -05:00
Christopher Haster 05b21d7b2d Fixed uninitialized port in lwip dragged in by KSDK2 2016-07-22 02:02:37 -05:00
Russ Butler 3b32e53c54 Pull in lwip-eth updates from mbedmicro/mbed
Sync the directory lwip-eth with that of mbedmicro/mbed at revision
b32f7a9aaf.
2016-07-22 02:02:37 -05:00
Russ Butler 59f444f0ce Remove hal
Remove all the hal files in preparation for pulling in mbedmicro/mbed.
2016-07-22 02:02:37 -05:00
Devaraj Ranganna c9d0447a3e Incrase netif_up semaphore timeout from 1500ms to 2500ms 2016-07-22 02:02:37 -05:00
Christopher Haster a263b91360 Add rudimentary support for server side
mirrored from:
https://developer.mbed.org/teams/NetworkSocketAPI/code/LWIPInterface/
2016-07-22 02:02:37 -05:00
Christopher Haster 0d0d008411 Match changes to NSAPI in LWIPInterface
mirrored from:
https://developer.mbed.org/teams/NetworkSocketAPI/code/LWIPInterface/
2016-07-22 02:02:37 -05:00
Christopher Haster a7c07996d9 Separate Stack/Interface concept into two distinct classes 2016-07-22 02:02:37 -05:00
Christopher Haster def3b408f0 Rename Interface -> Stack
NetworkInterface  -> NetworkStack
EthernetInterface -> EthernetStack
WiFiInterface     -> WiFiStack
CellularInterface -> CellularStack
MeshInterface     -> MeshStack
2016-07-22 02:02:37 -05:00
Christopher Haster 3850933298 Standardized comment style 2016-07-22 02:02:37 -05:00
Christopher Haster e51f157c33 Revised stack specific configurations
Adds the following functions for direct configuration of interface
- (set|get)stackopt
- (set|get)sockopt
2016-07-22 02:02:37 -05:00
Christopher Haster 1aa0b6ce2a Added better support for SocketAddress/string addresses/ports 2016-07-22 02:02:37 -05:00
Christopher Haster e47bb97eff Renamed NetworkInterface create/destroy methods to match Socket methods
- socket_create -> socket_open
- socket_destroy -> socket_close
2016-07-22 02:02:37 -05:00
Christopher Haster db8495c7ed Move to single state-change interrupt
Pros
- Easier to implement
- More similar to SIGIO in BDS sockets

Cons
- Less information, but this information had a high risk of being
  faulty/spurious
2016-07-22 02:02:37 -05:00
Christopher Haster 41d7277a4b Remove shutdown parameter from close call
Pros
- Simplifies interface
- Easier base implementation

Cons
- May need shutdown functionality, in this case shutdown
  can be added as another function in the future
2016-07-22 02:02:37 -05:00
Christopher Haster a25aeea977 Move to asynch lwip sockets based on armmbed/sal-stack-lwip
Move the backend of LWIPInterface from the LWIP socket API to the
asynch UDP/TCP APIs used in https://github.com/armmbed/sal-stack-lwip.
Provides asynchronous functionality for the LWIPInterface.
2016-07-22 02:02:37 -05:00
Martin Kojtal 498add7f9f lwip - fix size of sys mutex for RTX 4.79
The size was increased to 4 bytes. Thanks @c1728p9 for spotting this.
2016-07-22 02:02:37 -05:00
Christopher Haster 697ac558be Matched changes NetworkSocketAPI
Responded to feedback from mbed-client implementation
to introduce a full feature set that should support most
of the use cases for the API.
2016-07-22 02:02:37 -05:00
Bogdan Marinescu b032d1886f Preparing new layout - moving lwip 2016-07-22 02:02:28 -05:00
Christopher Haster a5ea143c77 Updated config tests to match change in error message 2016-07-22 00:35:13 -05:00
Christopher Haster 9bd7a2fe72 Added proper support for the extra_labels target override
Due to dependencies between the config/target systems, the config
has been modified to preparse the mbed_app.json for overrides.
This means that attributes with dependencies in the targets are
only valid at the application level. A hard error has been
added for these attributes if they are supplied at the library
level.
2016-07-22 00:35:13 -05:00