Skip to content

Commit 683b73f

Browse files
committed
fixed the below build issue
- Emac - NFC-EEPROM - PSA-CRYPTO
1 parent 3fc8905 commit 683b73f

23 files changed

+58
-38
lines changed

TESTS/configs/baremetal.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
"littlefs",
1313
"mbed-trace",
1414
"device-key",
15-
"lora"
16-
]
15+
"lora",
16+
"nfc",
17+
"network-emac",
18+
"nanostack-libservice"
19+
],
20+
"target_overrides": {
21+
"*": {
22+
"target.device_has_remove": ["EMAC"]
23+
}
24+
}
1725
}

TESTS/network/emac/emac_TestMemoryManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include <stdio.h>
1919
#include <stdarg.h>
2020
#include <string.h>
@@ -553,4 +553,4 @@ EmacTestMemoryManager &EmacTestMemoryManager::get_instance()
553553
static EmacTestMemoryManager test_memory_manager;
554554
return test_memory_manager;
555555
}
556-
556+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)

TESTS/network/emac/emac_TestMemoryManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#ifndef EMAC_TEST_MEMORY_MANAGER_H
1919
#define EMAC_TEST_MEMORY_MANAGER_H
20-
20+
#if defined(MBED_CONF_RTOS_PRESENT)
2121
#include <list>
2222

2323
#include "EMACMemoryManager.h"
@@ -225,5 +225,5 @@ class EmacTestMemoryManager : public EMACMemoryManager {
225225
unsigned int m_alloc_unit;
226226
bool m_memory_available;
227227
};
228-
228+
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
229229
#endif /* EMAC_TEST_MEMORY_MANAGER_H */

TESTS/network/emac/emac_TestNetworkStack.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include "unity.h"
1919

2020
#include "EMACMemoryManager.h"
@@ -202,4 +202,5 @@ OnboardNetworkStack &OnboardNetworkStack::get_default_instance()
202202
{
203203
return EmacTestNetworkStack::get_instance();
204204
}
205+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
205206
#endif

TESTS/network/emac/emac_TestNetworkStack.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#ifndef EMAC_TEST_NETWORK_STACK_H
1919
#define EMAC_TEST_NETWORK_STACK_H
20-
20+
#if defined(MBED_CONF_RTOS_PRESENT)
2121
#include "netsocket/nsapi_types.h"
2222
#include "netsocket/EMAC.h"
2323
#include "netsocket/OnboardNetworkStack.h"
@@ -387,5 +387,5 @@ class EmacTestNetworkStack : public OnboardNetworkStack, private mbed::NonCopyab
387387

388388
Interface *m_interface;
389389
};
390-
390+
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
391391
#endif /* EMAC_TEST_NETWORK_STACK_H */

TESTS/network/emac/emac_ctp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include "greentea-client/test_env.h"
1919
#include "unity/unity.h"
2020
#include "utest.h"
@@ -149,5 +149,5 @@ void emac_if_ctp_msg_build(int eth_frame_len, const unsigned char *dest_addr, co
149149
emac_if_get()->link_out(buf);
150150
emac_if_check_memory(false);
151151
}
152-
152+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
153153

TESTS/network/emac/emac_ctp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#ifndef EMAC_CTP_H
1919
#define EMAC_CTP_H
20-
20+
#if defined(MBED_CONF_RTOS_PRESENT)
2121
enum ctp_function {
2222
CTP_NONE,
2323
CTP_FORWARD,
@@ -37,5 +37,5 @@ enum ctp_function {
3737
ctp_function emac_if_ctp_header_handle(unsigned char *eth_input_frame, unsigned char *eth_output_frame, unsigned char *origin_addr, int *receipt_number);
3838
void emac_if_ctp_msg_build(int eth_frame_len, const unsigned char *dest_addr, const unsigned char *origin_addr, const unsigned char *forward_addr, int options);
3939
void emac_if_ctp_reply_handle(int lenght, int invalid_data_index);
40-
40+
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
4141
#endif /* EMAC_CTP_H */

TESTS/network/emac/emac_initialize.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
#ifndef EMAC_INITIALIZE_H
1919
#define EMAC_INITIALIZE_H
20-
20+
#if defined(MBED_CONF_RTOS_PRESENT)
2121
unsigned char *emac_if_get_hw_addr(void);
2222
bool emac_if_init(EMAC *emac);
2323
EMAC *emac_if_get(void);
2424
EmacTestMemoryManager *emac_m_mngr_get(void);
25-
25+
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
2626
#endif /* EMAC_INITIALIZE_H */

TESTS/network/emac/emac_membuf.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include "mbed.h"
1919
#include "greentea-client/test_env.h"
2020
#include "unity.h"
@@ -75,3 +75,4 @@ void emac_if_memory_buffer_write(void *buf, unsigned char *eth_frame, bool write
7575
}
7676
}
7777
}
78+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)

TESTS/network/emac/emac_membuf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
#ifndef EMAC_MEMBUF_H
1919
#define EMAC_MEMBUF_H
20-
20+
#if defined(MBED_CONF_RTOS_PRESENT)
2121
int emac_if_memory_buffer_read(void *buf, unsigned char *eth_frame);
2222
void emac_if_memory_buffer_write(void *buf, unsigned char *eth_frame, bool write_data);
23-
23+
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
2424
#endif /* EMAC_MEMBUF_H */

TESTS/network/emac/emac_test_broadcast.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include "mbed.h"
1919
#include "greentea-client/test_env.h"
2020
#include "unity.h"
@@ -99,3 +99,4 @@ void test_emac_broadcast(void)
9999
RESET_OUTGOING_MSG_DATA;
100100
}
101101

102+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)

TESTS/network/emac/emac_test_initialize.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include <inttypes.h>
1919
#include "mbed.h"
2020
#include "mbed_stats.h"
@@ -117,3 +117,4 @@ bool emac_if_init(EMAC *emac)
117117

118118
return true;
119119
}
120+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)

TESTS/network/emac/emac_test_memory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include "mbed.h"
1919
#include "greentea-client/test_env.h"
2020
#include "unity.h"
@@ -161,3 +161,4 @@ void test_emac_memory()
161161
TEST_ASSERT_FALSE(ERROR_FLAGS);
162162
RESET_OUTGOING_MSG_DATA;
163163
}
164+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)

TESTS/network/emac/emac_test_multicast_filter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include "mbed.h"
1919
#include "greentea-client/test_env.h"
2020
#include "unity.h"
@@ -171,3 +171,4 @@ void test_emac_multicast_filter()
171171
TEST_ASSERT_FALSE(ERROR_FLAGS);
172172
RESET_OUTGOING_MSG_DATA;
173173
}
174+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)

TESTS/network/emac/emac_test_unicast.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include "mbed.h"
1919
#include "greentea-client/test_env.h"
2020
#include "unity.h"
@@ -76,3 +76,4 @@ void test_emac_unicast()
7676
RESET_OUTGOING_MSG_DATA;
7777
}
7878

79+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)

TESTS/network/emac/emac_test_unicast_burst.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include "mbed.h"
1919
#include "greentea-client/test_env.h"
2020
#include "unity.h"
@@ -84,3 +84,4 @@ void test_emac_unicast_burst()
8484
TEST_ASSERT_FALSE(ERROR_FLAGS);
8585
RESET_OUTGOING_MSG_DATA;
8686
}
87+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)

TESTS/network/emac/emac_test_unicast_frame_len.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include "mbed.h"
1919
#include "greentea-client/test_env.h"
2020
#include "unity.h"
@@ -79,3 +79,4 @@ void test_emac_unicast_frame_len()
7979
TEST_ASSERT_FALSE(ERROR_FLAGS);
8080
RESET_OUTGOING_MSG_DATA;
8181
}
82+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)

TESTS/network/emac/emac_test_unicast_long.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include "mbed.h"
1919
#include "greentea-client/test_env.h"
2020
#include "unity.h"
@@ -81,3 +81,4 @@ void test_emac_unicast_long()
8181
TEST_ASSERT_FALSE(ERROR_FLAGS);
8282
RESET_OUTGOING_MSG_DATA;
8383
}
84+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)

TESTS/network/emac/emac_tests.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#ifndef EMAC_TESTS_H
1919
#define EMAC_TESTS_H
20-
20+
#if defined(MBED_CONF_RTOS_PRESENT)
2121
void test_emac_initialize();
2222
void test_emac_broadcast();
2323
void test_emac_unicast();
@@ -26,5 +26,5 @@ void test_emac_unicast_burst();
2626
void test_emac_unicast_long();
2727
void test_emac_multicast_filter();
2828
void test_emac_memory();
29-
29+
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
3030
#endif /* EMAC_TESTS_H */

TESTS/network/emac/emac_util.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1818
#include "mbed.h"
1919
#include "greentea-client/test_env.h"
2020
#include "unity.h"
@@ -582,3 +582,4 @@ void emac_if_set_mtu_size(int mtu_size)
582582
{
583583
eth_mtu_size = mtu_size;
584584
}
585+
#endif //#if defined(MBED_CONF_RTOS_PRESENT)

TESTS/network/emac/emac_util.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1718

1819
#ifndef EMAC_UTIL_H
1920
#define EMAC_UTIL_H
@@ -124,5 +125,5 @@ void worker_loop_init(void);
124125
void worker_loop_start(void (*test_step_cb_fnc)(int opt), int timeout);
125126
void worker_loop_end(void);
126127
void worker_loop_link_up_wait(void);
127-
128+
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
128129
#endif /* EMAC_UTIL_H */

features/device_key/TESTS/device_key/functionality/main.cpp

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

17+
#if !DEVICEKEY_ENABLED
18+
#error [NOT_SUPPORTED] DeviceKey needs to be enabled for this test
19+
#else
20+
1721
#include "DeviceKey.h"
1822
#include "mbedtls/config.h"
1923
#include "utest/utest.h"
@@ -28,10 +32,6 @@
2832
using namespace utest::v1;
2933
using namespace mbed;
3034

31-
#if !DEVICEKEY_ENABLED
32-
#error [NOT_SUPPORTED] DeviceKey needs to be enabled for this test
33-
#else
34-
3535
#define MSG_VALUE_DUMMY "0"
3636
#define MSG_VALUE_LEN 32
3737
#define MSG_KEY_LEN 32

features/storage/nvstore/TESTS/nvstore/functionality/main.cpp

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

17+
#if !NVSTORE_ENABLED
18+
#error [NOT_SUPPORTED] NVSTORE needs to be enabled for this test
19+
#else
20+
1721
#include "nvstore.h"
1822
#ifdef MBED_CONF_RTOS_PRESENT
1923
#include "Thread.h"
@@ -27,10 +31,6 @@
2731
#include <stdio.h>
2832
#include <algorithm>
2933

30-
#if !NVSTORE_ENABLED
31-
#error [NOT_SUPPORTED] NVSTORE needs to be enabled for this test
32-
#else
33-
3434
using namespace utest::v1;
3535

3636
static const uint16_t max_test_keys = 20;

0 commit comments

Comments
 (0)