UBLOX_EVK_ODIN_W2: Fix baremetal build and greentea tests

Remove lwIP reliant networking and BLE tests for baremetal

Mbed OS 5 ported lwIP in its OS mode and uses threads. Networking
that rely on lwIP needs to be removed so it can be compiled with the
baremetal profile.

The BLE cordio Greentea tests are also disabled given that the feature
is not supported without an RTOS.
pull/11881/head
Hugues Kamba 2019-11-15 11:32:27 +00:00
parent 699372421a
commit 157d126769
7 changed files with 25 additions and 1 deletions

View File

@ -1,6 +1,7 @@
{
"name": "ble",
"config": {
"present": 1,
"ble-role-observer": {
"help": "Include observer BLE role support (scanning for and processing advertising packets).",
"value": true,

View File

@ -13,6 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if !MBED_CONF_BLE_PRESENT
#error [NOT_SUPPORTED] BLE cordio test cases require the BLE library.
#else
#include <stdio.h>
@ -109,3 +112,5 @@ Specification specification(greentea_test_setup, cases, greentea_test_teardown_h
int main() {
return !Harness::run(specification);
}
#endif // !MBED_CONF_BLE_PRESENT

View File

@ -14,6 +14,10 @@
* limitations under the License.
*/
#if !MBED_CONF_BLE_PRESENT
#error [NOT_SUPPORTED] BLE cordio test cases require the BLE library.
#else
#include <stdio.h>
#include <algorithm>
@ -265,3 +269,5 @@ int main()
return !Harness::run(specification);
}
#endif // CORDIO_ZERO_COPY_HCI
#endif //!MBED_CONF_BLE_PRESENT

View File

@ -1,6 +1,7 @@
{
"name": "lwip",
"config": {
"present": 1,
"ipv4-enabled": {
"help": "Enable IPv4",
"value": true

View File

@ -14,6 +14,8 @@
* limitations under the License.
*/
#if MBED_CONF_LWIP_PRESENT
#include "OdinWiFiInterface.h"
#include "cb_main.h"
#include "cb_wlan.h"
@ -2107,3 +2109,4 @@ static cbTARGET_PowerSaveMode convertPowerSaveAtToIoctl(target_power_save_mode_e
return mode;
}
#endif // MBED_CONF_LWIP_PRESENT

View File

@ -1,5 +1,5 @@
/* ODIN-W2 implementation of WiFiInterface
* Copyright (c) 2016 u-blox Malmö AB
* Copyright (c) 2016 u-blox Malm<EFBFBD> AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -17,6 +17,8 @@
#ifndef ODIN_WIFI_INTERFACE_H
#define ODIN_WIFI_INTERFACE_H
#if MBED_CONF_LWIP_PRESENT
#include "WiFiInterface.h"
#if DEVICE_WIFI_AP
#include "UbloxWiFiSoftAPInterface.h"
@ -443,3 +445,5 @@ private:
};
#endif
#endif // MBED_CONF_LWIP_PRESENT

View File

@ -15,6 +15,8 @@
* limitations under the License.
*/
#ifdef MBED_CONF_LWIP_PRESENT
#include "OdinWiFiInterface.h"
WiFiInterface *WiFiInterface::get_target_default_instance()
@ -22,3 +24,5 @@ WiFiInterface *WiFiInterface::get_target_default_instance()
static OdinWiFiInterface wifi;
return &wifi;
}
#endif // MBED_CONF_LWIP_PRESENT