WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
243ceb5
Start on using pydantic schemas. mbed_lib.json schema working!
multiplemonomials Nov 2, 2025
57f0a7e
Start on schema for targets.json5
multiplemonomials Nov 3, 2025
cf0a6b3
Schema almost done, start removing old stuff from targets.json5
multiplemonomials Nov 3, 2025
a1aa9c5
Add memory bank schema
multiplemonomials Nov 4, 2025
3482dac
Still crunching away on targets.json5
multiplemonomials Nov 6, 2025
6baf453
Finish targets.json5 logic, appears to generate config correctly!
multiplemonomials Nov 16, 2025
6c30ab5
Implement schema for mbed_app.json5
multiplemonomials Nov 16, 2025
e3635a9
Fix tests
multiplemonomials Nov 16, 2025
0490a08
Use `Self`
multiplemonomials Nov 17, 2025
76e4ca3
Use legacy Union
multiplemonomials Nov 17, 2025
890c0b4
Install eval_type_backport
multiplemonomials Nov 17, 2025
5c4a963
Fix another union to be legacy
multiplemonomials Nov 17, 2025
da7b086
Import future annotations
multiplemonomials Nov 17, 2025
4acba4b
Another one
multiplemonomials Nov 17, 2025
a8cf486
Another
multiplemonomials Nov 17, 2025
a0cb337
OK let's do this for every remaining python file
multiplemonomials Nov 17, 2025
9e84fcc
Fix compatibility with pydantic<2.12
multiplemonomials Nov 17, 2025
3894bd6
Fix test building in baremetal (due to previously ignored JSON config…
multiplemonomials Nov 17, 2025
b439faa
One more
multiplemonomials Nov 17, 2025
39bc4c7
options -> accepted_values
multiplemonomials Nov 17, 2025
a9818c5
Resolve lint errors
multiplemonomials Nov 30, 2025
0693e03
Fix wdt-reset-workaround option
multiplemonomials Nov 30, 2025
69c2e64
Baremetal for everything!
multiplemonomials Dec 6, 2025
cf95d84
Fix trying to build emac test on baremetal
multiplemonomials Dec 6, 2025
8222d03
Also fix wifi test building
multiplemonomials Dec 6, 2025
d3d229e
Disable building BlueNRG tests with baremetal
multiplemonomials Dec 6, 2025
c9afa6a
Fix infinite recursion, disable kvstore test on baremetal
multiplemonomials Dec 6, 2025
c357e4e
Respond to comments
multiplemonomials Dec 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/greentea_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ jobs:
apt-get update
apt-get install -y python3-venv
# Always build with baremetal profile, as it should work with every target
- name: Build ${{ matrix.target }} with baremetal profile
if: ${{ matrix.profile == 'baremetal' }}
# Note: We have to set a wifi network name and password so that the test will compile on devices that use wifi
run: |
rm -rf __build
Expand Down
10 changes: 4 additions & 6 deletions TESTS/configs/greentea_baremetal.json5
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"target_overrides": {
"*": {
"target.c_lib": "small",
"target.application-profile": "bare-metal"
}
},
"overrides": {
"target.c_lib": "small",

"target.application-profile": "bare-metal",

// Enable Mbed Stats tests
"platform.all-stats-enabled": 1,

Expand Down
9 changes: 4 additions & 5 deletions cmsis/device/rtos/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "rtos",
"config": {
"rtos": {
"help": "Select RTOS (RTX or N/A)",
"value": "RTX"
},
"present": 1,
"rtos": {
"help": "Select RTOS (RTX or N/A)",
"value": "RTX"
},
"main-thread-stack-size": {
"help": "The size of the main thread's stack",
"value": 4096
Expand Down
1 change: 0 additions & 1 deletion connectivity/FEATURE_BLE/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "ble",
"requires": ["ble-api-implementation"],
"config": {
"present": 1,
"ble-role-observer": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if("BlueNRG_2" IN_LIST MBED_TARGET_LABELS OR "BlueNRG_MS" IN_LIST MBED_TARGET_LABELS)
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "BlueNRG bluetooth modules require an RTOS!")
endif()
endif()


mbed_greentea_add_test(
TEST_NAME
mbed-connectivity-ble-cordio-hci-driver
TEST_SKIPPED
${TEST_SKIPPED}
TEST_SOURCES
main.cpp
TEST_REQUIRED_LIBS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ if("CORDIO_ZERO_COPY_HCI" IN_LIST MBED_CONFIG_DEFINITIONS OR "CORDIO_ZERO_COPY_H
set(TEST_SKIPPED "Test not relevant for zero copy hci.")
endif()

if("BlueNRG_2" IN_LIST MBED_TARGET_LABELS OR "BlueNRG_MS" IN_LIST MBED_TARGET_LABELS)
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "BlueNRG bluetooth modules require an RTOS!")
endif()
endif()

mbed_greentea_add_test(
TEST_NAME
mbed-connectivity-ble-cordio-hci-transport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ ble::SecurityManager &BLEInstanceBase::getSecurityManager()

const ble::SecurityManager &BLEInstanceBase::getSecurityManager() const
{
const BLEInstanceBase &self = const_cast<BLEInstanceBase &>(*this);
BLEInstanceBase &self = const_cast<BLEInstanceBase &>(*this);
return const_cast<const ble::SecurityManager &>(self.getSecurityManager());
}
#endif // BLE_FEATURE_SECURITY
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# This driver needs the RTOS
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
return()
endif()

add_library(mbed-bluenrg2 STATIC EXCLUDE_FROM_ALL
BlueNrg2HCIDriver.cpp)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# This driver needs the RTOS
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
return()
endif()

add_library(mbed-bluenrg-ms STATIC EXCLUDE_FROM_ALL
BlueNrgMsHCIDriver.cpp)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"name": "cordio-stm32wb",
"requires": ["cordio", "ble"]
"name": "cordio-stm32wb"
}
6 changes: 6 additions & 0 deletions connectivity/drivers/emac/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ if(NOT "DEVICE_EMAC=1" IN_LIST MBED_TARGET_DEFINITIONS)
return()
endif()

# EMAC needs the RTOS
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
return()
endif()


add_library(mbed-emac STATIC EXCLUDE_FROM_ALL
sources/CompositeEMAC.cpp
sources/GenericEthPhy.cpp
Expand Down
1 change: 0 additions & 1 deletion connectivity/drivers/lora/COMPONENT_SX126X/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "SX126X-lora-driver",
"requires": ["lora"],
"config": {
"spi-frequency": {
"help": "SPI frequency, Default: 16 MHz",
Expand Down
1 change: 0 additions & 1 deletion connectivity/drivers/lora/COMPONENT_SX1272/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "sx1272-lora-driver",
"requires": ["lora"],
"config": {
"spi-frequency": {
"help": "SPI frequency, Default: 8 MHz",
Expand Down
1 change: 0 additions & 1 deletion connectivity/drivers/lora/COMPONENT_SX1276/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "sx1276-lora-driver",
"requires": ["lora"],
"config": {
"spi-frequency": {
"help": "SPI frequency, Default: 8 MHz",
Expand Down
1 change: 0 additions & 1 deletion connectivity/drivers/lora/TARGET_STM32WL/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "stm32wl-lora-driver",
"requires": ["lora"],
"config": {
"buffer-size": {
"help": "Max. buffer size the radio can handle, Default: 255 B",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"power-on-polarity": {
"help": "Polarity of power-on for the modem. 0 means 0/1 for power on/off; 1 means 1/0 for power on/off.",
"options": [0, 1],
"accepted_values": [0, 1],
"value": 0
},
"power-on-time-ms": {
Expand Down
1 change: 0 additions & 1 deletion connectivity/lorawan/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "lora",
"requires": ["mbedtls", "events"],
"config": {
"phy": {
"help": "LoRa PHY region: EU868, AS923, AU915, CN470, CN779, EU433, IN865, KR920, US915",
Expand Down
5 changes: 5 additions & 0 deletions connectivity/lwipstack/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# LwIP needs the RTOS
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
return()
endif()

add_library(mbed-lwipstack STATIC EXCLUDE_FROM_ALL)

target_include_directories(mbed-lwipstack
Expand Down
1 change: 0 additions & 1 deletion connectivity/lwipstack/mbed_lib.json5
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "lwip",
"config": {
"present": 1,
"ipv4-enabled": {
"help": "Enable IPv4",
"value": true
Expand Down
1 change: 0 additions & 1 deletion connectivity/nanostack/mbed-mesh-api/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "mbed-mesh-api",
"requires": ["nanostack"],
"config": {
"heap-size": {
"help": "Nanostack's heap size [bytes: 0-4294967295]",
Expand Down
3 changes: 1 addition & 2 deletions connectivity/nanostack/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"name": "nanostack-interface",
"requires": ["nanostack"]
"name": "nanostack-interface"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# This lib needs the RTOS
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
return()
endif()

add_library(mbed-nanostack-hal_mbed_cmsis_rtos STATIC EXCLUDE_FROM_ALL)

target_include_directories(mbed-nanostack-hal_mbed_cmsis_rtos
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "nanostack-eventloop",
"requires": ["nanostack-hal"],
"config": {
"use_platform_tick_timer": {
"help": "Use platform provided low resolution tick timer for eventloop",
Expand Down
1 change: 0 additions & 1 deletion connectivity/nanostack/sal-stack-nanostack/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "nanostack",
"requires": ["nanostack-eventloop", "coap-service"],
"config": {
"configuration": {
"help": "Build time configuration. Refer to Handbook for valid values. Default: full stack",
Expand Down
1 change: 0 additions & 1 deletion connectivity/netsocket/mbed_lib.json5
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "nsapi",
"config": {
"present": 1,
"add-event-listener-return-change": {
"help": "Updates the add_event_listener to return a nsapi_error_t value which can indicate allocation failure. See documents for more details.",
"value": 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ list(
emac_test_unicast_long.cpp
)

if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "This test requires an RTOS!")
endif()

mbed_greentea_add_test(
TEST_NAME
mbed-connectivity-network-emac
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ if(NOT "MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE=WIFI" IN_LIST MBED_CONFI
set(TEST_SKIPPED "Requires wi-fi to be the default network interface")
endif()

if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "This test requires an RTOS!")
endif()

# Options specific to this test
set(MBED_GREENTEA_WIFI_MAX_SCAN_SIZE 30 CACHE STRING "How many networks may appear in Wifi scan result")
set(MBED_GREENTEA_WIFI_SECURE_CHANNEL 1 CACHE STRING "Channel number that the wifi network is on. Used for channel-specific connection tests, if supported by the wifi driver.")
Expand Down
1 change: 0 additions & 1 deletion events/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "events",
"config": {
"present": 1,
"shared-stacksize": {
"help": "Stack size (bytes) for shared event queue thread",
"value": 2048
Expand Down
5 changes: 1 addition & 4 deletions features/frameworks/cy_rtos_rtx_adapter/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"name": "cy_psoc6csp_rtos",
"config": {
"present": 1
}
"name": "cy_psoc6csp_rtos"
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
{
"name": "psa-services",
"requires": [
"drivers",
"platform",
"mbedtls",
"storage",
"flashiap-block-device",
"kv-global-api",
"storage_tdb_internal"
]
"name": "psa-services"
}
3 changes: 1 addition & 2 deletions platform/bare_metal/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"name": "bare-metal",
"requires": ["platform", "drivers", "rtos-api", "mbed-trace", "blockdevice"]
"name": "bare-metal"
}
2 changes: 1 addition & 1 deletion platform/mbed-trace/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"color-theme": {
"help": "Set color theme. 0 for readable, 1 for unobtrusive.",
"options": [0, 1],
"accepted_values": [0, 1],
"macro_name": "MBED_TRACE_COLOR_THEME",
"value": 0
},
Expand Down
4 changes: 4 additions & 0 deletions platform/tests/TESTS/mbed_platform/stats_cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ if((NOT "MBED_CPU_STATS_ENABLED=1" IN_LIST MBED_CONFIG_DEFINITIONS) AND (NOT "MB
set(TEST_SKIPPED "CPU stats not enabled")
endif()

if("MBED_CONF_TARGET_APPLICATION_PROFILE=bare-metal" IN_LIST MBED_CONFIG_DEFINITIONS)
set(TEST_SKIPPED "This test requires the RTOS")
endif()

mbed_greentea_add_test(
TEST_NAME
mbed-platform-stats-cpu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ if((NOT "MBED_THREAD_STATS_ENABLED=1" IN_LIST MBED_CONFIG_DEFINITIONS) AND (NOT
set(TEST_SKIPPED "Thread stats not enabled")
endif()

if("MBED_CONF_TARGET_APPLICATION_PROFILE=bare-metal" IN_LIST MBED_CONFIG_DEFINITIONS)
set(TEST_SKIPPED "This test requires the RTOS")
endif()

mbed_greentea_add_test(
TEST_NAME
mbed-platform-stats-thread
Expand Down
5 changes: 1 addition & 4 deletions rtos/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"name": "rtos-api",
"config": {
"present": 1
}
"name": "rtos-api"
}
2 changes: 1 addition & 1 deletion storage/blockdevice/COMPONENT_SPIF/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"SPI_FREQ": "40000000",
"debug": {
"help": "Enable debug logs. [0/1]",
"options" : [0, 1],
"accepted_values" : [0, 1],
"value": 0
}
},
Expand Down
5 changes: 1 addition & 4 deletions storage/filesystem/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"name": "filesystem",
"config": {
"present": 1
}
"name": "filesystem"
}
38 changes: 0 additions & 38 deletions storage/kvstore/kv_config/filesystem_no_rbp/mbed_lib.json

This file was deleted.

Loading