-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Common change for migration to Mbed CE from Mbed CLI 1/2 (1) Remove *.lib originally for library import. Replace with git submodule. (2) Rename mbed_app.json/mbed_lib.json to mbed_app.json5/mbed_lib.json5 (3) Add/update CMakeLists.txt (4) Remove .mbedignore originally for Mbed CLI 1 (5) Update document 2. Support VS Code development 3. Temporary fix to build profile inconsistent with mbed-lora library build See: mbed-ce/mbed-os#407
- Loading branch information
Showing
7 changed files
with
151 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.build | ||
.mbed | ||
projectfiles | ||
*.py* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"cmake.buildDirectory": "${workspaceFolder}/build", | ||
"cmake.generator": "Ninja", | ||
"cmake.configureOnOpen": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Copyright (c) 2022 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.19) | ||
cmake_policy(VERSION 3.19) | ||
|
||
set(MBED_OS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os CACHE INTERNAL "") | ||
|
||
# Set default path for mbed_app.json5 (no force-write for override) | ||
set(MBED_APP_JSON_PATH mbed_app.json5 CACHE INTERNAL "") | ||
|
||
# Set default path for custom_targets.json5 (no force-write for override) | ||
set(CUSTOM_TARGETS_PATH custom_targets CACHE INTERNAL "") | ||
set(CUSTOM_TARGETS_JSON_PATH ${CUSTOM_TARGETS_PATH}/custom_targets.json5 CACHE INTERNAL "") | ||
|
||
# Load Mbed CE toolchain file and basic build system | ||
include(${MBED_OS_PATH}/tools/cmake/app.cmake) | ||
|
||
set(APP_PROJECT NUMAKER_MBED_CE_LORAWAN_EXAMPLE) | ||
set(APP_TARGET NuMaker-mbed-ce-lorawan-example) | ||
|
||
# Set up project name | ||
project(${APP_PROJECT}) | ||
|
||
# Add Nuvoton CMake list files to CMake default module path | ||
# | ||
# Normally, this is added in ${MBED_OS_PATH}, but ${CUSTOM_TARGETS_PATH} | ||
# is in front and needs it. | ||
list(APPEND CMAKE_MODULE_PATH | ||
${MBED_OS_PATH}/targets/TARGET_NUVOTON/scripts | ||
) | ||
|
||
# Add Mbed OS library | ||
add_subdirectory(${MBED_OS_PATH}) | ||
|
||
# User-provided MBEDTLS_USER_CONFIG_FILE for mbedtls | ||
target_include_directories(mbed-mbedtls | ||
PUBLIC | ||
. | ||
) | ||
|
||
add_executable(${APP_TARGET}) | ||
|
||
target_include_directories(${APP_TARGET} | ||
PRIVATE | ||
. | ||
) | ||
|
||
target_sources(${APP_TARGET} | ||
PRIVATE | ||
main.cpp | ||
trace_helper.cpp | ||
) | ||
|
||
target_link_libraries(${APP_TARGET} | ||
PRIVATE | ||
mbed-os | ||
mbed-lorawan | ||
) | ||
|
||
# Temporary fix to build profile inconsistent with mbed-lora library build. | ||
# See: https://github.com/mbed-ce/mbed-os/issues/407 | ||
target_link_libraries(mbed-lorawan PUBLIC mbed-rtos-flags) | ||
|
||
# Must call this for each target to set up bin file creation, code upload, etc | ||
mbed_set_post_build(${APP_TARGET}) | ||
|
||
# Make sure this is the last line of the top-level build script | ||
mbed_finalize_build() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
buildType: | ||
default: Develop | ||
choices: | ||
Develop: | ||
short: Develop | ||
long: Emit debug information but also optimize | ||
buildType: Develop | ||
Debug: | ||
short: Debug | ||
long: Emit debug information and don't optimize | ||
buildType: Debug | ||
Release: | ||
short: Release | ||
long: Optimize generated code | ||
buildType: Release | ||
board: | ||
default: NUMAKER_IOT_M467 | ||
choices: | ||
NUMAKER_PFM_NANO130: | ||
short: NUMAKER_PFM_NANO130 | ||
settings: | ||
MBED_TARGET: NUMAKER_PFM_NANO130 | ||
UPLOAD_METHOD: OPENOCD | ||
NUMAKER_PFM_NUC472: | ||
short: NUMAKER_PFM_NUC472 | ||
settings: | ||
MBED_TARGET: NUMAKER_PFM_NUC472 | ||
UPLOAD_METHOD: OPENOCD | ||
NUMAKER_PFM_M453: | ||
short: NUMAKER_PFM_M453 | ||
settings: | ||
MBED_TARGET: NUMAKER_PFM_M453 | ||
UPLOAD_METHOD: OPENOCD | ||
NUMAKER_PFM_M487: | ||
short: NUMAKER_PFM_M487 | ||
settings: | ||
MBED_TARGET: NUMAKER_PFM_M487 | ||
UPLOAD_METHOD: OPENOCD | ||
NUMAKER_IOT_M487: | ||
short: NUMAKER_IOT_M487 | ||
settings: | ||
MBED_TARGET: NUMAKER_IOT_M487 | ||
UPLOAD_METHOD: OPENOCD | ||
NUMAKER_M483KG: | ||
short: NUMAKER_M483KG | ||
settings: | ||
MBED_TARGET: NUMAKER_M483KG | ||
UPLOAD_METHOD: OPENOCD | ||
NUMAKER_IOT_M467: | ||
short: NUMAKER_IOT_M467 | ||
settings: | ||
MBED_TARGET: NUMAKER_IOT_M467 | ||
UPLOAD_METHOD: OPENOCD | ||
NUMAKER_IOT_M252: | ||
short: NUMAKER_IOT_M252 | ||
settings: | ||
MBED_TARGET: NUMAKER_IOT_M252 | ||
UPLOAD_METHOD: OPENOCD | ||
NUMAKER_IOT_M263A: | ||
short: NUMAKER_IOT_M263A | ||
settings: | ||
MBED_TARGET: NUMAKER_IOT_M263A | ||
UPLOAD_METHOD: OPENOCD | ||
NU_M2354: | ||
short: NU_M2354 | ||
settings: | ||
MBED_TARGET: NU_M2354 | ||
UPLOAD_METHOD: OPENOCD | ||
NU_IOT_M2354: | ||
short: NU_IOT_M2354 | ||
settings: | ||
MBED_TARGET: NU_IOT_M2354 | ||
UPLOAD_METHOD: OPENOCD |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters