From 961ec0ce7fcb800d75099f9899b4404bc962f638 Mon Sep 17 00:00:00 2001 From: harmut01 Date: Mon, 19 Apr 2021 14:04:40 +0100 Subject: [PATCH 1/2] CMake: Add `.cpp` files to target_sources C++ files were excluded from target_sources, this meant that those files were being missed entirely during the build process. This adds any files that may have missed in the first commit. --- targets/TARGET_RENESAS/TARGET_RZ_A1XX/CMakeLists.txt | 1 + targets/TARGET_RENESAS/TARGET_RZ_A2XX/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/CMakeLists.txt b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/CMakeLists.txt index 29472e227fd..0cb09e6caa1 100644 --- a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/CMakeLists.txt +++ b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/CMakeLists.txt @@ -31,6 +31,7 @@ target_sources(mbed-rz-a1xx spi_api.c trng_api.c us_ticker.c + USBPhy_RZ_A1.cpp common/rza_io_regrw.c ) diff --git a/targets/TARGET_RENESAS/TARGET_RZ_A2XX/CMakeLists.txt b/targets/TARGET_RENESAS/TARGET_RZ_A2XX/CMakeLists.txt index 0a474ff8455..0a217502176 100644 --- a/targets/TARGET_RENESAS/TARGET_RZ_A2XX/CMakeLists.txt +++ b/targets/TARGET_RENESAS/TARGET_RZ_A2XX/CMakeLists.txt @@ -30,11 +30,13 @@ target_sources(mbed-rz-a2xx sleep.c spi_api.c us_ticker.c + USBPhy_RZ_A2.cpp common/r_cache/src/lld/r_cache_lld_rza2m.c common/r_octabus/src/lld/r_octabus_lld_rza2m_api.c common/r_octabus/src/lld/r_octabus_memclk_setup.c common/rza_io_regrw.c + common/target_override_console.cpp r_can/src/r_can_rz.c ) From 9125c51e6c10472d038833ad27bd0ee7e702a6d8 Mon Sep 17 00:00:00 2001 From: harmut01 Date: Mon, 19 Apr 2021 15:50:49 +0100 Subject: [PATCH 2/2] Remove include dependency on `USBDevice_Types.h` mbed-usb (which provides `USBDevice_Types.h`) is a higher-level USB library in Mbed-OS that sits on top of the HAL. Targets should not implement the HAL and use higher-level libraries, hence, the dependency should be removed. This dependency also causes errors when building with the bare-metal profile. --- targets/TARGET_RENESAS/TARGET_RZ_A1XX/USBPhy_RZ_A1.cpp | 1 - targets/TARGET_RENESAS/TARGET_RZ_A2XX/USBPhy_RZ_A2.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/USBPhy_RZ_A1.cpp b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/USBPhy_RZ_A1.cpp index 9d6cebaac1b..d614d9c01a5 100644 --- a/targets/TARGET_RENESAS/TARGET_RZ_A1XX/USBPhy_RZ_A1.cpp +++ b/targets/TARGET_RENESAS/TARGET_RZ_A1XX/USBPhy_RZ_A1.cpp @@ -25,7 +25,6 @@ extern "C" } #include "USBPhyHw.h" #include "rza_io_regrw.h" -#include "USBDevice_Types.h" #include "USBEndpoints_RZ_A1.h" #include "USBPhy_RZ_A1_Def.h" diff --git a/targets/TARGET_RENESAS/TARGET_RZ_A2XX/USBPhy_RZ_A2.cpp b/targets/TARGET_RENESAS/TARGET_RZ_A2XX/USBPhy_RZ_A2.cpp index 67f9a7ca8a9..bac9aee2225 100644 --- a/targets/TARGET_RENESAS/TARGET_RZ_A2XX/USBPhy_RZ_A2.cpp +++ b/targets/TARGET_RENESAS/TARGET_RZ_A2XX/USBPhy_RZ_A2.cpp @@ -24,7 +24,6 @@ extern "C" #include "iodefine.h" } #include "USBPhyHw.h" -#include "USBDevice_Types.h" #include "USBEndpoints_RZ_A2.h" #include "USBPhy_RZ_A2_Def.h" #include "pinmap.h"