Skip to content

Commit 1a2eceb

Browse files
authored
Merge pull request #11881 from hugueskamba/hk-UBLOX_EVK_ODIN_W2-enable-baremetal
UBLOX_EVK_ODIN_W2: Fix baremetal build and greentea tests
2 parents e03180d + 157d126 commit 1a2eceb

File tree

7 files changed

+25
-1
lines changed

7 files changed

+25
-1
lines changed

features/FEATURE_BLE/mbed_lib.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "ble",
33
"config": {
4+
"present": 1,
45
"ble-role-observer": {
56
"help": "Include observer BLE role support (scanning for and processing advertising packets).",
67
"value": true,

features/FEATURE_BLE/targets/TARGET_CORDIO/TESTS/cordio_hci/driver/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#if !MBED_CONF_BLE_PRESENT
17+
#error [NOT_SUPPORTED] BLE cordio test cases require the BLE library.
18+
#else
1619

1720
#include <stdio.h>
1821

@@ -109,3 +112,5 @@ Specification specification(greentea_test_setup, cases, greentea_test_teardown_h
109112
int main() {
110113
return !Harness::run(specification);
111114
}
115+
116+
#endif // !MBED_CONF_BLE_PRESENT

features/FEATURE_BLE/targets/TARGET_CORDIO/TESTS/cordio_hci/transport/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17+
#if !MBED_CONF_BLE_PRESENT
18+
#error [NOT_SUPPORTED] BLE cordio test cases require the BLE library.
19+
#else
20+
1721
#include <stdio.h>
1822
#include <algorithm>
1923

@@ -265,3 +269,5 @@ int main()
265269
return !Harness::run(specification);
266270
}
267271
#endif // CORDIO_ZERO_COPY_HCI
272+
273+
#endif //!MBED_CONF_BLE_PRESENT

features/lwipstack/mbed_lib.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "lwip",
33
"config": {
4+
"present": 1,
45
"ipv4-enabled": {
56
"help": "Enable IPv4",
67
"value": true

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/sdk/ublox-odin-w2-drivers/OdinWiFiInterface.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
#if MBED_CONF_LWIP_PRESENT
18+
1719
#include "OdinWiFiInterface.h"
1820
#include "cb_main.h"
1921
#include "cb_wlan.h"
@@ -2107,3 +2109,4 @@ static cbTARGET_PowerSaveMode convertPowerSaveAtToIoctl(target_power_save_mode_e
21072109
return mode;
21082110
}
21092111

2112+
#endif // MBED_CONF_LWIP_PRESENT

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/sdk/ublox-odin-w2-drivers/OdinWiFiInterface.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ODIN-W2 implementation of WiFiInterface
2-
* Copyright (c) 2016 u-blox Malmö AB
2+
* Copyright (c) 2016 u-blox Malm� AB
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,6 +17,8 @@
1717
#ifndef ODIN_WIFI_INTERFACE_H
1818
#define ODIN_WIFI_INTERFACE_H
1919

20+
#if MBED_CONF_LWIP_PRESENT
21+
2022
#include "WiFiInterface.h"
2123
#if DEVICE_WIFI_AP
2224
#include "UbloxWiFiSoftAPInterface.h"
@@ -443,3 +445,5 @@ class OdinWiFiInterface : public WiFiInterface, public EMACInterface
443445
};
444446

445447
#endif
448+
449+
#endif // MBED_CONF_LWIP_PRESENT

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/sdk/ublox-odin-w2-drivers/default_wifi_interface.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@
1515
* limitations under the License.
1616
*/
1717

18+
#ifdef MBED_CONF_LWIP_PRESENT
19+
1820
#include "OdinWiFiInterface.h"
1921

2022
WiFiInterface *WiFiInterface::get_target_default_instance()
2123
{
2224
static OdinWiFiInterface wifi;
2325
return &wifi;
2426
}
27+
28+
#endif // MBED_CONF_LWIP_PRESENT

0 commit comments

Comments
 (0)