diff --git a/.gitmodules b/.gitmodules index 6f20e0297105ef..7579297dd656fe 100644 --- a/.gitmodules +++ b/.gitmodules @@ -81,7 +81,7 @@ [submodule "mbed-os"] path = third_party/mbed-os/repo url = https://github.com/ARMmbed/mbed-os.git - branch = feature-chip + branch = master [submodule "wifi-ism43362"] path = third_party/wifi-ism43362/repo url = https://github.com/ATmobica/wifi-ism43362.git diff --git a/.vscode/launch.json b/.vscode/launch.json index 8766e06a3f475c..ba4b1825c9c4ee 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -90,7 +90,7 @@ "type": "cortex-debug", "request": "launch", "cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed", - "executable": "./build-CY8CPROTO_062_4343W/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example", + "executable": "./build-CY8CPROTO_062_4343W/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example.elf", "servertype": "openocd", "searchDir": [ "${workspaceRoot}/config/mbed/scripts", @@ -121,7 +121,7 @@ "type": "cortex-debug", "request": "launch", "cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed", - "executable": "./build-CY8CPROTO_062_4343W/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example", + "executable": "./build-CY8CPROTO_062_4343W/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example.elf", "servertype": "external", "gdbTarget": "host.docker.internal:3334", //port 3333 for the CM0+, 3334 for the CM4 "overrideLaunchCommands": [ @@ -147,7 +147,7 @@ "type": "cortex-debug", "request": "launch", "cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed", - "executable": "./build-CY8CPROTO_062_4343W/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example", + "executable": "./build-CY8CPROTO_062_4343W/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example.elf", "servertype": "openocd", "searchDir": [ "${workspaceRoot}/config/mbed/scripts", @@ -170,7 +170,7 @@ "type": "cortex-debug", "request": "launch", "cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed", - "executable": "./build-CY8CPROTO_062_4343W/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example.hex", + "executable": "./build-CY8CPROTO_062_4343W/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example.elf", "servertype": "external", "gdbTarget": "host.docker.internal:3334", //port 3333 for the CM0+, 3334 for the CM4 "overrideLaunchCommands": [ @@ -187,7 +187,7 @@ "type": "cortex-debug", "request": "launch", "cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed", - "executable": "./build-DISCO_L475VG_IOT01A/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example", + "executable": "./build-DISCO_L475VG_IOT01A/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example.elf", "servertype": "openocd", "searchDir": [ "${workspaceRoot}/config/mbed/scripts", @@ -209,7 +209,7 @@ "type": "cortex-debug", "request": "launch", "cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed", - "executable": "./build-DISCO_L475VG_IOT01A/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example", + "executable": "./build-DISCO_L475VG_IOT01A/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example.elf", "servertype": "external", "gdbTarget": "host.docker.internal:3333", "overrideLaunchCommands": [ @@ -227,7 +227,7 @@ "type": "cortex-debug", "request": "launch", "cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed", - "executable": "./build-DISCO_L475VG_IOT01A/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example", + "executable": "./build-DISCO_L475VG_IOT01A/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example.elf", "servertype": "openocd", "searchDir": [ "${workspaceRoot}/config/mbed/scripts", @@ -248,7 +248,7 @@ "type": "cortex-debug", "request": "launch", "cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed", - "executable": "./build-DISCO_L475VG_IOT01A/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example.hex", + "executable": "./build-DISCO_L475VG_IOT01A/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example.elf", "servertype": "external", "gdbTarget": "host.docker.internal:3333", "overrideLaunchCommands": [ @@ -265,7 +265,7 @@ "type": "cortex-debug", "request": "launch", "cwd": "${workspaceRoot}/src/test_driver/mbed/unit_tests", - "executable": "./build-DISCO_L475VG_IOT01A/${input:mbedDebugProfile}/chip-mbed-unit-tests", + "executable": "./build-DISCO_L475VG_IOT01A/${input:mbedDebugProfile}/chip-mbed-unit-tests.elf", "servertype": "openocd", "searchDir": [ "${workspaceRoot}/config/mbed/scripts", @@ -287,7 +287,7 @@ "type": "cortex-debug", "request": "launch", "cwd": "${workspaceRoot}/src/test_driver/mbed/unit_tests", - "executable": "./build-CY8CPROTO_062_4343W/${input:mbedDebugProfile}/chip-mbed-unit-tests", + "executable": "./build-CY8CPROTO_062_4343W/${input:mbedDebugProfile}/chip-mbed-unit-tests.elf", "servertype": "openocd", "searchDir": [ "${workspaceRoot}/config/mbed/scripts", diff --git a/config/mbed/CMakeLists.txt b/config/mbed/CMakeLists.txt index af97211fa439da..96678e6132c783 100644 --- a/config/mbed/CMakeLists.txt +++ b/config/mbed/CMakeLists.txt @@ -142,6 +142,32 @@ mbed_get_lang_compile_flags(CHIP_CFLAGS_C mbed-core C) list(APPEND CHIP_CFLAGS_C ${CMAKE_C_FLAGS_INIT}) mbed_get_lang_compile_flags(CHIP_CFLAGS_CC mbed-core CXX) list(APPEND CHIP_CFLAGS_CC ${CMAKE_CXX_FLAGS_INIT}) +mbed_get_target_common_compile_flags(CHIP_MBEDCMSISCM_CFLAGS mbed-cmsis-cortex-m) +list(APPEND CHIP_CFLAGS ${CHIP_MBEDCMSISCM_CFLAGS}) + +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") + mbed_get_target_common_compile_flags(CHIP_MBEDCMSISCY8_CFLAGS mbed-cy8cproto-062-4343w) + list(APPEND CHIP_CFLAGS ${CHIP_MBEDCMSISCY8_CFLAGS}) + mbed_get_target_common_compile_flags(CHIP_MBEDPSOC6_CFLAGS mbed-psoc6) + list(APPEND CHIP_CFLAGS ${CHIP_MBEDPSOC6_CFLAGS}) + mbed_get_target_common_compile_flags(CHIP_MBEDCAT1_CFLAGS mbed-cat1a) + list(APPEND CHIP_CFLAGS ${CHIP_MBEDCAT1_CFLAGS}) + mbed_get_target_common_compile_flags(CHIP_MBEDCMSISCY8MODUS_CFLAGS mbed-cy8cproto-062-4343w-bsp-design-modus) + list(APPEND CHIP_CFLAGS ${CHIP_MBEDCMSISCY8MODUS_CFLAGS}) +endif() + +if(MBED_TARGET STREQUAL "DISCO_L475VG_IOT01A") + mbed_get_target_common_compile_flags(CHIP_MBEDSTM_CFLAGS mbed-stm ) + list(APPEND CHIP_CFLAGS ${CHIP_MBEDSTM_CFLAGS}) + mbed_get_target_common_compile_flags(CHIP_MBEDCMSISCM_CFLAGS mbed-stm32l4) + list(APPEND CHIP_CFLAGS ${CHIP_MBEDCMSISCM_CFLAGS}) + mbed_get_target_common_compile_flags(CHIP_MBEDCSTMCUBE_CFLAGS mbed-stm32l4cube-fw) + list(APPEND CHIP_CFLAGS ${CHIP_MBEDCSTMCUBE_CFLAGS}) + mbed_get_target_common_compile_flags(CHIP_MBEDSTML4_CFLAGS mbed-stm32l475xg) + list(APPEND CHIP_CFLAGS ${CHIP_MBEDSTML4_CFLAGS}) + mbed_get_target_common_compile_flags(CHIP_MBEDSTML4IOT_CFLAGS mbed-disco-l475vg-iot01a) + list(APPEND CHIP_CFLAGS ${CHIP_MBEDSTML4IOT_CFLAGS}) +endif() # Add support for Mbed BLE mbed_get_target_common_compile_flags(CHIP_MBEDBLE_CFLAGS mbed-ble) diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index 01b955a2fa45a0..87af4b8aacbf34 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -14,14 +14,14 @@ configure_file( @ONLY ) -set(MBED_PATH $ENV{MBED_OS_PATH} CACHE INTERNAL "") +set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os CACHE INTERNAL "") set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") set(APP_TARGET chip-mbed-all-clusters-app-example) include(${MBED_PATH}/tools/cmake/app.cmake) add_subdirectory(${MBED_PATH} ./mbed_build) -if("wifi_ism43362" IN_LIST MBED_TARGET_LABELS) +if(MBED_TARGET STREQUAL "DISCO_L475VG_IOT01A") add_subdirectory(wifi-ism43362) endif() @@ -99,29 +99,17 @@ add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) mbed_configure_app_target(${APP_TARGET}) -mbed_set_mbed_target_linker_script(${APP_TARGET}) - project(${APP_TARGET}) -if("wifi_ism43362" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - wifi-ism43362 - ) -endif() - -if("BlueNRG_MS" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - mbed-ble-blue_nrg - ) +if(MBED_TARGET STREQUAL "DISCO_L475VG_IOT01A") + target_link_libraries(${APP_TARGET} wifi-ism43362) endif() -if("WHD" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - mbed-cy_psoc6_common_network mbed-emac mbed-cy_psoc6_whd - ) +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") + target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) endif() -target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-mbedtls-cryptocell310 chip) +target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) mbed_set_post_build(${APP_TARGET}) diff --git a/examples/lighting-app/mbed/CMakeLists.txt b/examples/lighting-app/mbed/CMakeLists.txt index b1aa06d51a7b1c..8702e9ccfc6d86 100644 --- a/examples/lighting-app/mbed/CMakeLists.txt +++ b/examples/lighting-app/mbed/CMakeLists.txt @@ -14,14 +14,14 @@ configure_file( @ONLY ) -set(MBED_PATH $ENV{MBED_OS_PATH} CACHE INTERNAL "") +set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os CACHE INTERNAL "") set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") set(APP_TARGET chip-mbed-lighting-app-example) include(${MBED_PATH}/tools/cmake/app.cmake) add_subdirectory(${MBED_PATH} ./mbed_build) -if("wifi_ism43362" IN_LIST MBED_TARGET_LABELS) +if(MBED_TARGET STREQUAL "DISCO_L475VG_IOT01A") add_subdirectory(wifi-ism43362) endif() @@ -72,27 +72,15 @@ add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) mbed_configure_app_target(${APP_TARGET}) -mbed_set_mbed_target_linker_script(${APP_TARGET}) - + project(${APP_TARGET}) -if("wifi_ism43362" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - wifi-ism43362 - ) -endif() - -if("BlueNRG_MS" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - mbed-ble-blue_nrg - ) +if(MBED_TARGET STREQUAL "DISCO_L475VG_IOT01A") + target_link_libraries(${APP_TARGET} wifi-ism43362) endif() - -if("WHD" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - mbed-cy_psoc6_common_network mbed-emac mbed-cy_psoc6_whd - ) +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") + target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) endif() if("capsense" IN_LIST MBED_TARGET_LABELS) @@ -106,7 +94,7 @@ if("capsense" IN_LIST MBED_TARGET_LABELS) target_link_libraries(${APP_TARGET} capsense ${CAPSENSE_LIB}) endif() -target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-mbedtls-cryptocell310 chip) +target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) mbed_set_post_build(${APP_TARGET}) diff --git a/examples/lighting-app/mbed/mbed_app.json b/examples/lighting-app/mbed/mbed_app.json index 237c0b101f2b98..e26becaa154e11 100644 --- a/examples/lighting-app/mbed/mbed_app.json +++ b/examples/lighting-app/mbed/mbed_app.json @@ -30,7 +30,7 @@ "CORDIO" ], "led-active-state": 1, - "lighting-button": "USER_BUTTON", + "lighting-button": "BUTTON1", "function-button": "NC" }, "CY8CPROTO_062_4343W": { diff --git a/examples/lock-app/mbed/CMakeLists.txt b/examples/lock-app/mbed/CMakeLists.txt index e8c0b16258a470..9351bd18f7f4c1 100644 --- a/examples/lock-app/mbed/CMakeLists.txt +++ b/examples/lock-app/mbed/CMakeLists.txt @@ -14,14 +14,14 @@ configure_file( @ONLY ) -set(MBED_PATH $ENV{MBED_OS_PATH} CACHE INTERNAL "") +set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os CACHE INTERNAL "") set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") set(APP_TARGET chip-mbed-lock-app-example) include(${MBED_PATH}/tools/cmake/app.cmake) add_subdirectory(${MBED_PATH} ./mbed_build) -if("wifi_ism43362" IN_LIST MBED_TARGET_LABELS) +if(MBED_TARGET STREQUAL "DISCO_L475VG_IOT01A") add_subdirectory(wifi-ism43362) endif() @@ -71,26 +71,14 @@ add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) mbed_configure_app_target(${APP_TARGET}) -mbed_set_mbed_target_linker_script(${APP_TARGET}) - project(${APP_TARGET}) -if("wifi_ism43362" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - wifi-ism43362 - ) -endif() - -if("BlueNRG_MS" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - mbed-ble-blue_nrg - ) +if(MBED_TARGET STREQUAL "DISCO_L475VG_IOT01A") + target_link_libraries(${APP_TARGET} wifi-ism43362) endif() -if("WHD" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - mbed-cy_psoc6_common_network mbed-emac mbed-cy_psoc6_whd - ) +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") + target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) endif() if("capsense" IN_LIST MBED_TARGET_LABELS) @@ -104,7 +92,7 @@ if("capsense" IN_LIST MBED_TARGET_LABELS) target_link_libraries(${APP_TARGET} capsense ${CAPSENSE_LIB}) endif() -target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-mbedtls-cryptocell310 chip) +target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) mbed_set_post_build(${APP_TARGET}) diff --git a/examples/lock-app/mbed/mbed_app.json b/examples/lock-app/mbed/mbed_app.json index c06296c162981f..d18924ecbfd667 100644 --- a/examples/lock-app/mbed/mbed_app.json +++ b/examples/lock-app/mbed/mbed_app.json @@ -30,7 +30,7 @@ "CORDIO" ], "led-active-state": 1, - "lock-button": "USER_BUTTON", + "lock-button": "BUTTON1", "function-button": "NC" }, "CY8CPROTO_062_4343W": { diff --git a/examples/pigweed-app/mbed/CMakeLists.txt b/examples/pigweed-app/mbed/CMakeLists.txt index b05b25a7375a46..c71e48ccf49df8 100644 --- a/examples/pigweed-app/mbed/CMakeLists.txt +++ b/examples/pigweed-app/mbed/CMakeLists.txt @@ -13,14 +13,14 @@ configure_file( @ONLY ) -set(MBED_PATH $ENV{MBED_OS_PATH} CACHE INTERNAL "") +set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os CACHE INTERNAL "") set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") set(APP_TARGET chip-mbed-pigweed-app-example) include(${MBED_PATH}/tools/cmake/app.cmake) add_subdirectory(${MBED_PATH} ./mbed_build) -if("wifi_ism43362" IN_LIST MBED_TARGET_LABELS) +if(MBED_TARGET STREQUAL "DISCO_L475VG_IOT01A") add_subdirectory(wifi-ism43362) endif() @@ -42,29 +42,17 @@ add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) mbed_configure_app_target(${APP_TARGET}) -mbed_set_mbed_target_linker_script(${APP_TARGET}) - project(${APP_TARGET}) -if("wifi_ism43362" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - wifi-ism43362 - ) -endif() - -if("BlueNRG_MS" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - mbed-ble-blue_nrg - ) +if(MBED_TARGET STREQUAL "DISCO_L475VG_IOT01A") + target_link_libraries(${APP_TARGET} wifi-ism43362) endif() -if("WHD" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - mbed-cy_psoc6_common_network mbed-emac mbed-cy_psoc6_whd - ) +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") + target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) endif() -target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-mbedtls-cryptocell310 chip) +target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) mbed_set_post_build(${APP_TARGET}) diff --git a/examples/shell/mbed/CMakeLists.txt b/examples/shell/mbed/CMakeLists.txt index f3936e9e10881b..e0b93531ac332b 100644 --- a/examples/shell/mbed/CMakeLists.txt +++ b/examples/shell/mbed/CMakeLists.txt @@ -12,14 +12,14 @@ configure_file( @ONLY ) -set(MBED_PATH $ENV{MBED_OS_PATH} CACHE INTERNAL "") +set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os CACHE INTERNAL "") set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") set(APP_TARGET chip-mbed-shell-example) include(${MBED_PATH}/tools/cmake/app.cmake) add_subdirectory(${MBED_PATH} ./mbed_build) -if("wifi_ism43362" IN_LIST MBED_TARGET_LABELS) +if(MBED_TARGET STREQUAL "DISCO_L475VG_IOT01A") add_subdirectory(wifi-ism43362) endif() @@ -43,29 +43,17 @@ add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) mbed_configure_app_target(${APP_TARGET}) -mbed_set_mbed_target_linker_script(${APP_TARGET}) - project(${APP_TARGET}) -if("wifi_ism43362" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - wifi-ism43362 - ) -endif() - -if("BlueNRG_MS" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - mbed-ble-blue_nrg - ) +if(MBED_TARGET STREQUAL "DISCO_L475VG_IOT01A") + target_link_libraries(${APP_TARGET} wifi-ism43362) endif() -if("WHD" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - mbed-cy_psoc6_common_network mbed-emac mbed-cy_psoc6_whd - ) +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") + target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) endif() -target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-mbedtls-cryptocell310 chip) +target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) mbed_set_post_build(${APP_TARGET}) diff --git a/examples/shell/mbed/cmd_mbed_utils.cpp b/examples/shell/mbed/cmd_mbed_utils.cpp index 29a295eee04de7..914da21bf53b18 100644 --- a/examples/shell/mbed/cmd_mbed_utils.cpp +++ b/examples/shell/mbed/cmd_mbed_utils.cpp @@ -45,7 +45,7 @@ #include #include "netdb.h" -#include +#include #include using namespace chip; diff --git a/scripts/examples/mbed_example.sh b/scripts/examples/mbed_example.sh index 297efd0278c4af..d0f51eeefe50d6 100755 --- a/scripts/examples/mbed_example.sh +++ b/scripts/examples/mbed_example.sh @@ -154,5 +154,5 @@ if [[ "$COMMAND" == *"flash"* ]]; then MBED_FLASH_SCRIPTS_PATH=$CHIP_ROOT/config/mbed/scripts # Flash application - openocd -f $MBED_FLASH_SCRIPTS_PATH/$TARGET_BOARD.tcl -c "program $BUILD_DIRECTORY/chip-mbed-$APP-example verify reset exit" + openocd -f $MBED_FLASH_SCRIPTS_PATH/$TARGET_BOARD.tcl -c "program $BUILD_DIRECTORY/chip-mbed-$APP-example.elf verify reset exit" fi diff --git a/src/inet/BUILD.gn b/src/inet/BUILD.gn index e160c29d3eb281..23a5db5acc5732 100644 --- a/src/inet/BUILD.gn +++ b/src/inet/BUILD.gn @@ -79,7 +79,7 @@ if (chip_device_platform == "mbed") { "${chip_root}/src/platform/mbed/posix/src/socket.cpp", "${chip_root}/src/platform/mbed/posix/src/select.cpp", "${chip_root}/src/platform/mbed/posix/src/netdb.cpp", - "${chip_root}/src/platform/mbed/net/src/common.cpp", + "${chip_root}/src/platform/mbed/net/src/net_common.cpp", "${chip_root}/src/platform/mbed/net/src/net_if.cpp", "${chip_root}/src/platform/mbed/net/src/net_socket.cpp", "${chip_root}/src/platform/mbed/net/src/net_dns.cpp", diff --git a/src/platform/mbed/net/include/BSDSocket.h b/src/platform/mbed/net/include/BSDSocket.h index 3e9731e3a1c471..943467485ca9b5 100644 --- a/src/platform/mbed/net/include/BSDSocket.h +++ b/src/platform/mbed/net/include/BSDSocket.h @@ -19,7 +19,7 @@ #define MBED_NET_BSD_SOCKET_H #include "OpenFileHandleAsFileDescriptor.h" -#include "common.h" +#include "net_common.h" #include #include #include diff --git a/src/platform/mbed/net/include/common.h b/src/platform/mbed/net/include/net_common.h similarity index 100% rename from src/platform/mbed/net/include/common.h rename to src/platform/mbed/net/include/net_common.h diff --git a/src/platform/mbed/net/src/common.cpp b/src/platform/mbed/net/src/net_common.cpp similarity index 98% rename from src/platform/mbed/net/src/common.cpp rename to src/platform/mbed/net/src/net_common.cpp index 0ba937d470bff0..bbfe171df1ca98 100644 --- a/src/platform/mbed/net/src/common.cpp +++ b/src/platform/mbed/net/src/net_common.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "net_common.h" #include #include diff --git a/src/platform/mbed/net/src/net_dns.cpp b/src/platform/mbed/net/src/net_dns.cpp index 8753b26d83c25c..82bb689af767e9 100644 --- a/src/platform/mbed/net/src/net_dns.cpp +++ b/src/platform/mbed/net/src/net_dns.cpp @@ -1,5 +1,5 @@ #include "net_dns.h" -#include +#include #include int mbed_getaddrinfo(const char * nodename, const char * servname, const struct addrinfo * hints, struct addrinfo ** res) diff --git a/src/platform/mbed/net/src/net_if.cpp b/src/platform/mbed/net/src/net_if.cpp index f64ea5cb96b00b..2c5a2095ca09f7 100644 --- a/src/platform/mbed/net/src/net_if.cpp +++ b/src/platform/mbed/net/src/net_if.cpp @@ -1,8 +1,8 @@ #include "net_if.h" -#include "common.h" #include #include #include +#include #include static int mbed_get_if_flags(unsigned int * flags); diff --git a/src/platform/mbed/net/src/net_socket.cpp b/src/platform/mbed/net/src/net_socket.cpp index 22f2d6e2ba26a3..7cccf0d2b72fa0 100644 --- a/src/platform/mbed/net/src/net_socket.cpp +++ b/src/platform/mbed/net/src/net_socket.cpp @@ -5,7 +5,7 @@ #include #include -#include "common.h" +#include "net_common.h" #include "mbed-trace/mbed_trace.h" @@ -15,7 +15,6 @@ using namespace rtos; #define TRACE_GROUP "NETS" #define NO_FREE_SOCKET_SLOT (-1) - static BSDSocket sockets[MBED_NET_SOCKET_MAX_NUMBER]; static BSDSocket * getBSDSocket(int fd) diff --git a/src/test_driver/mbed/unit_tests/CMakeLists.txt b/src/test_driver/mbed/unit_tests/CMakeLists.txt index b026529537a432..12735bfcfb1aa0 100644 --- a/src/test_driver/mbed/unit_tests/CMakeLists.txt +++ b/src/test_driver/mbed/unit_tests/CMakeLists.txt @@ -37,7 +37,7 @@ add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) mbed_configure_app_target(${APP_TARGET}) -mbed_set_mbed_target_linker_script(${APP_TARGET}) + project(${APP_TARGET}) @@ -47,18 +47,12 @@ if("wifi_ism43362" IN_LIST MBED_TARGET_LABELS) ) endif() -if("BlueNRG_MS" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - mbed-ble-blue_nrg - ) -endif() - if("WHD" IN_LIST MBED_TARGET_LABELS) - target_link_libraries(${APP_TARGET} - mbed-cy_psoc6_common_network mbed-emac mbed-cy_psoc6_whd - ) +target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) endif() +target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) + # As noted in the nrfconnect impl: # TODO: this list is hard to maintain manually (and currently incomplete). # An automated way that includes figuring out dependencies would be much better @@ -101,7 +95,7 @@ target_link_libraries(${APP_TARGET} MinimalMdnsRecords ) -target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-mbedtls-cryptocell310 chip) +target_link_libraries(${APP_TARGET} mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls chip) mbed_set_post_build(${APP_TARGET}) diff --git a/third_party/mbed-os/repo b/third_party/mbed-os/repo index 2c6928cec0cbd9..4e121a7d798b85 160000 --- a/third_party/mbed-os/repo +++ b/third_party/mbed-os/repo @@ -1 +1 @@ -Subproject commit 2c6928cec0cbd91285409b39768a12a75c7a7433 +Subproject commit 4e121a7d798b859dc06932b62f83c1a69e5d1167