Commit Graph

15823 Commits (5472a9703fb5d281a4bd658fe756a2f558e90698)

Author SHA1 Message Date
Kevin Bracey 5472a9703f EMAC: check link status callback is set
Nanostack doesn't set the link status callback. Make sure the two
example drivers don't crash if it isn't set.
2018-05-23 12:24:02 +03:00
Mika Leppänen ef68eb8b4d Enabled greentea and mbed-os-example-tls/client/sockets test for STM 2018-05-23 12:24:02 +03:00
Kevin Bracey 7ce098acb4 K64F EMAC: Fix TX error path leaks 2018-05-23 12:24:02 +03:00
Mika Leppänen 5da3cd9cce Added preferred alignment to emac and copy to/from to memory manager 2018-05-23 12:24:01 +03:00
Kevin Bracey 4950a993fd Move STM EMAC driver out out lwIP 2018-05-23 12:24:01 +03:00
Mika Leppänen 4e10cc097e Updated STM ethernet driver to use emac and memory manager 2018-05-23 12:24:01 +03:00
Mika Leppänen 668e0821a1 Updated K64F ethernet driver to use memory manager 2018-05-23 12:24:00 +03:00
Mika Leppänen bc5d4d1c0d Created memory manager class to netsocket and updated lwip to use it
instead of old memory interface.
2018-05-23 12:24:00 +03:00
Kevin Bracey f584ac3b59 Connectivity test: don't create interface object twice 2018-05-23 12:24:00 +03:00
Kevin Bracey d831bcb514 Remove Ethernet from NUCLEO_F429ZI test
Pending EMAC driver update, these tests won't compile.
2018-05-23 12:24:00 +03:00
Kevin Bracey 6930c6d3cf Ignore old EMAC Wifi drivers
Suppress Odin W2 and Realtek Wi-fi drivers using .mbedignore
2018-05-23 12:23:59 +03:00
Kevin Bracey 1683ff18ba Disable Nanostack border router test
Pending Nanostack EMAC work, disable the border router.
2018-05-23 12:23:59 +03:00
Kevin Bracey 2548f1894d Restrict client and socket example tests to K64F+K66F
I would like to restrict these to devices with "device_has": "EMAC", but
the framework doesn't currently permit that.  Revisit as more drivers
are EMAC-enabled or if the framework changes.
2018-05-23 12:23:59 +03:00
Kevin Bracey 586a62a87b Adjust test configurations for EMAC
Make ETHERNET configuration the default if DEVICE_EMAC is present,
instead of if FEATURE_LWIP is present.

This limits it to targets which have been ported to the new EMAC API.

Add LWIP feature to JSON config, as in principle the targets shouldn't
be adding it themselves. Opens scope to having Nanostack-based tests.

Disable tests for the Realtek and Wifi drivers that aren't ported yet.
2018-05-23 12:23:59 +03:00
Kevin Bracey b222c25435 Work around Nuvoton #define EMAC 2018-05-23 12:23:58 +03:00
Kevin Bracey 958247265b Tell mbed build to ignore old lwIP+EMAC drivers 2018-05-23 12:23:58 +03:00
Kevin Bracey 0ecf4e4695 Move Freescale EMAC driver out of lwIP 2018-05-23 12:23:58 +03:00
Mika Leppänen 28ff255533 Updated greentea network interface configuration files 2018-05-23 12:23:57 +03:00
Kevin Bracey 74dfe3423a Add downcast methods to NetworkInterface
As we've introduced virtual inheritance to support EMACInterface, we can
no longer use C-style casts or static_cast to downcast from
NetworkInterface to more specific types. RTTI is disabled in the
toolchains, so dynamic_cast is unavailables.

Add virtual downcast methods to permit conversions to the 6 derived
classes. Probably only needed for EMACInterface, WiFiInterface and
EthInterface, but handles the set.
2018-05-23 12:23:55 +03:00
Kevin Bracey 6dffe6e4e7 Remove CellularInterface
This has been superceded by CellularBase. Name change occurred late
in review of https://github.com/ARMmbed/mbed-os/pull/4119 and
original unused CellularInterface was left behind.
2018-05-22 11:44:46 +03:00
Kevin Bracey 1c5bbaf4d8 Insert EMACInterface class
Rather than let "EthernetInterface" be the base EMAC NetworkInterface,
insert an "EMACInterface" class.

EthernetInterface then derives from EMACInterface and EthInterface.

A Wi-Fi driver can derive from EMACInterface and WiFiInterface - this
will be more logical than deriving from EthernetInterface and
WiFiInterface.

This does mean adding a couple of virtual inheritances to avoid
duplicate NetworkInterfaces:

                   NetworkInterface
                     /           \
            virtual /             \ virtual
                   /               \
             EMACInterface     WiFiInterface
                   \               /
                    \             /
                     \           /
                  MyCustomWiFiInterface
2018-05-22 11:44:45 +03:00
Kevin Bracey 0386f73719 Networking update: general refactoring, unifying EMAC
Initial work by Bartek Szatkowski in https://github.com/ARMmbed/mbed-os/pull/4079,
reworked following review of https://github.com/ARMmbed/mbed-os/pull/5202 to
transform the entire system into C++, retaining the basic functionality.

Bartek's summary:

* Porting ethernet to EMAC
* Updating EMAC to enable multiple interfaces
* Untangling networking classes, making the abstractions a bit clearer to follow, etc
* General refactoring
* Removal of DEVICE_EMAC flag and introducing DEVICE_ETH and DEVICE_WIFI

Revisions since initial branch:

* Remove lwip depencies
* Correct doxygen warnings
* Remove emac_api.h, replace with C++ EMAC abstract class.
* Create OnboardNetworkInterface, and LWIP implementation.
* Mappings since #4079
     lwip-interface/nsapi_stack_lwip.c -> LWIPStack.cpp
     lwip-interface/ipstack_lwip.c -> LWIPInterface.cpp
     netsocket/mbed_ipstack.h -> OnboardNetworkStack.h
     hal/emac_api.h -> EMAC.h
* Reinstate use of EthInterface abstraction
* Correct and clarify HW address EMAC ops
* Restore MBED_MAC_ADDR implementation
* Integrate PPP support with LWIP::Interface.
* Convert K64F lwIP driver to K64F_EMAC.

To do:

* Convert emac_stack_mem.h to follow this pattern.
* Figure out DEVICE_ETH/EMAC
* Update all drivers to use EMAC
2018-05-22 11:44:45 +03:00
Cruz Monrreal db73ed0751
Merge pull request #6480 from davidsaada/david_nvstore_alloc_key
NVStore: add the allocate_key API (instead of set_alloc_key)
2018-05-21 17:32:00 -05:00
Cruz Monrreal a301db5d43
Merge pull request #6791 from kjbracey-arm/fcntl
Add POSIX fcntl flag support
2018-05-21 17:17:02 -05:00
Cruz Monrreal cd1ff94db2
Merge pull request #6866 from geky/fat-erase-disk
fatfs: Add erase disk to format
2018-05-21 17:14:14 -05:00
Cruz Monrreal ea13262aec
Merge pull request #6951 from bcostm/fix_spi_nss_config
STM32 SPI: fix NSS pin configuration
2018-05-21 10:26:00 -05:00
Cruz Monrreal ab5d7e1c2f
Merge pull request #6952 from jeromecoutant/PR_MSP
STM32 ETHERNET : Allow user defined Ethernet PHY init functions
2018-05-21 10:25:06 -05:00
Cruz Monrreal 97b1615dcc
Merge pull request #6821 from deepikabhavnani/system_stats
System stats - API addition
2018-05-21 10:16:59 -05:00
Cruz Monrreal b165e9c3da
Merge pull request #6823 from theotherjimmy/remove-build-everything
tools: Remove long-deprecated build_everything.py
2018-05-21 10:16:02 -05:00
Cruz Monrreal 2fa6cb519e
Merge pull request #6826 from marcuschangarm/feature-ota
Reorganize SoftDevices for NRF52 series
2018-05-21 10:15:09 -05:00
Cruz Monrreal a651cb220f
Merge pull request #6863 from k-stachowiak/update-mbedtls-2.9.0
Update Mbed TLS to version 2.9.0
2018-05-21 10:13:31 -05:00
Cruz Monrreal 86d04d7b15
Merge pull request #6901 from kivaisan/eventqueue_time_left
events: Introduce API to query how much time is left for delayed event
2018-05-21 10:12:13 -05:00
Cruz Monrreal 16d30776aa
Merge pull request #6905 from kivaisan/remove_common_pal_flags
Lora: Remove obsolete FEATURE_COMMON_PAL flags
2018-05-21 10:11:20 -05:00
Cruz Monrreal 1ae48fcee9
Merge pull request #6939 from jeromecoutant/PR_NOT_SUPPORTED
NOT_SUPPORTED error was not supported any more in test_api.py script
2018-05-21 10:08:03 -05:00
jeromecoutant 7622083da9 STM32 ETHERNET : Allow user defined Ethernet PHY init
If user adds USE_USER_DEFINED_HAL_ETH_MSPINIT macro in the json config,
he can implement his own HAL_ETH_MspDeInit and HAL_ETH_MspDeInit functions.
2018-05-18 14:42:27 +02:00
bcostm 2d7b13c540 STM32 SPI: fix NSS pin configuration 2018-05-18 14:26:26 +02:00
Kimmo Vaisanen 990da085d9 Introduce API to query how much time is left for delayed event
If user has initiated a delayed event (either with call_in or call_every),
user might need to know how much time is left until the event is
due to be dispatched.

Added time_left() function can be used to get the remaining time.
2018-05-18 12:55:06 +03:00
Martin Kojtal 79640c6a88
Merge pull request #6940 from JanneKiiskila/nvstore-thread-mstr
NVStore - remove Thread.h include
2018-05-18 09:05:05 +01:00
Cruz Monrreal 4b721583b5
Merge pull request #6559 from davidsaada/david_flash_sim_bd
Implement FlashSimBlockDevice - flash simulated block device over RAM
2018-05-17 21:54:34 -05:00
Cruz Monrreal 73eebaecf7
Merge pull request #6919 from cmonr/nvstore-example-targets
tools: Add explicit target for NVStore example
2018-05-17 21:39:12 -05:00
Cruz Monrreal bb0c345af1
Merge pull request #6917 from ARMmbed/g-astyle-rename-warnings
Travis: Quick name-fix for warnings reported by Astyle
2018-05-17 21:38:44 -05:00
Cruz Monrreal 77f5c4ac04
Merge pull request #6749 from AndrzejKurek/feature-mbedtls-platform-setup
Add platform setup and teardown calls to mbedtls tests
2018-05-17 10:08:44 -05:00
Cruz Monrreal 54ac02b080
Merge pull request #6865 from jamesbeyond/greentea_fix
fix greentea-client, require a character input between K-V pairs
2018-05-17 10:07:41 -05:00
Cruz Monrreal bce32b097e
Merge pull request #6876 from JuhPuur/master
Nanostack release for Mbed OS 5.9
2018-05-17 10:07:21 -05:00
Marcus Chang ef9bc9ccc9 Add NRF52 support for building bootloader and updateable firmware
New directory structure:

 * TARGET_SOFTDEVICE_COMMON
 * TARGET_SOFTDEVICE_S112
 * TARGET_SOFTDEVICE_S132_FULL (MBR + SoftDevice, default)
 * TARGET_SOFTDEVICE_S132_OTA (SoftDevice only, for firmware updates)
 * TARGET_SOFTDEVICE_S132_MBR (MBR only, for bootloader builds)
 * TARGET_SOFTDEVICE_S140_FULL (MBR + SoftDevice, default)
 * TARGET_SOFTDEVICE_S140_OTA (SoftDevice only, for firmware updates)
 * TARGET_SOFTDEVICE_S140_MBR (MBR only, for bootloader builds)
 * TARGET_SOFTDEVICE_NONE

The X_OTA and X_MBR binaries are obtained from the original x_FULL SoftDevice
by splitting it in an MBR part and a SoftDevice part. The MBR is needed for
the bootloader and the SoftDevice for firmware updates.

Build application without SoftDevice:

  "target_overrides": {
      "*": {
          "target.extra_labels_remove": ["SOFTDEVICE_COMMON", "SOFTDEVICE_X_FULL"],
          "target.extra_labels_add": ["SOFTDEVICE_NONE"]
      }
  }

Build application for firmware update using SoftDevice X:

  "target_overrides": {
      "*": {
          "target.extra_labels_remove": ["SOFTDEVICE_X_FULL"],
          "target.extra_labels_add": ["SOFTDEVICE_X_OTA"]
      }
  }

Build bootloader without SoftDevice X:

  "target_overrides": {
      "*": {
          "target.extra_labels_remove": ["SOFTDEVICE_COMMON", "SOFTDEVICE_X_FULL"],
          "target.extra_labels_add": ["SOFTDEVICE_X_MBR"]
      }
  }
2018-05-17 07:32:09 -07:00
Janne Kiiskila 16a27a2602 NVStore - remove Thread.h include
As this include is not actually needed. Having it will cause issues
with the bootloader, as this will cause a need to get the full
CMSIS/RTOS package etc., which would bloat the bootloader size.
2018-05-17 13:07:59 +03:00
jeromecoutant 109524d83d NOT_SUPPORTED error was not supported any more in test_api.py script 2018-05-17 11:58:13 +02:00
Cruz Monrreal II 4ea96d982d Added explicit target for NVStore, per example readme 2018-05-15 12:48:48 -05:00
Christopher Haster fa54351a64
Travis: Quick name-fix for warnings reported by Astyle
Currently Astyle is reporting files with warnings, not the actual count
of warnings. This is a bug, but fixing right now will cause incorrect results.
At least for the short-term we can change the name to avoid as much confusion
as possible.
2018-05-15 11:55:57 -05:00
Deepika 1961428c1b OS version added + CPUID for cortex-M only
CPUID base register is available for Cortex-M processors only.
Cortex-A devices have Main ID Register, which can be used in future to
get processor info.
2018-05-15 10:22:13 -05:00