diff --git a/targets/TARGET_NORDIC/CMakeLists.txt b/targets/TARGET_NORDIC/CMakeLists.txt new file mode 100644 index 0000000000..1f93579623 --- /dev/null +++ b/targets/TARGET_NORDIC/CMakeLists.txt @@ -0,0 +1,9 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) + +mbed_add_cmake_directory_if_labels("TARGET") diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/CMakeLists.txt new file mode 100644 index 0000000000..c6df875e06 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) + +target_sources(mbed-os + PRIVATE + lp_ticker.c + pinmap.c + port_api.c + qspi_api.c + rtc_api.c +) + +mbed_add_cmake_directory_if_labels("TARGET") diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/CMakeLists.txt new file mode 100644 index 0000000000..fc7c7099c9 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/CMakeLists.txt @@ -0,0 +1,31 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) + +target_sources(mbed-os + PRIVATE + PeripheralPinsDefault.c + analogin_api.c + common_rtc.c + critical_section_api.c + flash_api.c + gpio_api.c + i2c_api.c + itm_api.c + object_owners.c + pinmap_ex.c + pwmout_api.c + reloc_vector_table.c + serial_api.c + sleep.c + spi_api.c + trng_api.c + us_ticker.c + watchdog_api.c +) + +mbed_add_cmake_directory_if_labels("TARGET") diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/CMakeLists.txt new file mode 100644 index 0000000000..81429730ba --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/config +) + +target_sources(mbed-os + PRIVATE + PeripheralPins.c + USBPhy_Nordic.cpp +) + +mbed_add_cmake_directory_if_labels("TARGET") +add_subdirectory(device) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_NRF52840_DK/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_NRF52840_DK/CMakeLists.txt new file mode 100644 index 0000000000..b363e2e742 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_NRF52840_DK/CMakeLists.txt @@ -0,0 +1,7 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/CMakeLists.txt new file mode 100644 index 0000000000..b5faa7caed --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/CMakeLists.txt @@ -0,0 +1,38 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +function(_mbed_get_assembly_nrf52840_dk) + if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_NRF52840.S) + elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_nrf52840.S) + elseif(${MBED_TOOLCHAIN} STREQUAL "IAR") + set(STARTUP_FILE TOOLCHAIN_IAR/startup_NRF52840_IAR.S) + endif() + target_sources(mbed-os PRIVATE ${STARTUP_FILE}) +endfunction() + +function(_mbed_set_linker_file) + if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TOOLCHAIN_GCC_ARM/NRF52840.ld) + elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TOOLCHAIN_ARM/nRF52840.sct) + elseif(${MBED_TOOLCHAIN} STREQUAL "IAR") + set(LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TOOLCHAIN_IAR/nRF52840.icf) + endif() + set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${LINKER_FILE}) +endfunction() + +_mbed_get_assembly_nrf52840_dk() +_mbed_set_linker_file() + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) + +target_sources(mbed-os + PRIVATE + cmsis_nvic.c + system_nrf52840.c +) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/TOOLCHAIN_ARM/nRF52840.sct b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/TOOLCHAIN_ARM/nRF52840.sct new file mode 100644 index 0000000000..fab6b015e0 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/TOOLCHAIN_ARM/nRF52840.sct @@ -0,0 +1,49 @@ +#! armcc -E + +/* Default to no softdevice */ +#if !defined(MBED_APP_START) + #define MBED_APP_START 0x0 +#endif + +#if !defined(MBED_APP_SIZE) + #define MBED_APP_SIZE 0x100000 +#endif + +#if !defined(MBED_RAM_START) + #define MBED_RAM_START 0x20000000 + #define MBED_RAM_SIZE 0x40000 +#endif + +#define Stack_Size MBED_BOOT_STACK_SIZE + +#define MBED_RAM0_START MBED_RAM_START +#define MBED_RAM0_SIZE 0x100 + +#define MBED_CRASH_REPORT_RAM_START (MBED_RAM0_START + MBED_RAM0_SIZE) +#define MBED_CRASH_REPORT_RAM_SIZE 0x100 + +#define MBED_RAM1_START (MBED_CRASH_REPORT_RAM_START + MBED_CRASH_REPORT_RAM_SIZE) +#define MBED_RAM1_SIZE (MBED_RAM_SIZE - (MBED_RAM0_SIZE + MBED_CRASH_REPORT_RAM_SIZE)) + + +#define RAM_FIXED_SIZE (MBED_BOOT_STACK_SIZE+MBED_RAM0_SIZE+MBED_CRASH_REPORT_RAM_SIZE) + +LR_IROM1 MBED_APP_START MBED_APP_SIZE { + ER_IROM1 MBED_APP_START MBED_APP_SIZE { + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + } + RW_IRAM0 MBED_RAM0_START UNINIT MBED_RAM0_SIZE { ;no init section + *(*nvictable) + } + RW_m_crash_data MBED_CRASH_REPORT_RAM_START EMPTY MBED_CRASH_REPORT_RAM_SIZE { ; RW data + } + RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE { + .ANY (+RW +ZI) + } + ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_SIZE-RAM_FIXED_SIZE+MBED_RAM_START-AlignExpr(ImageLimit(RW_IRAM1), 16)) { + } + ARM_LIB_STACK MBED_RAM1_START+MBED_RAM1_SIZE EMPTY -Stack_Size { ; Stack region growing down + } +} diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/TOOLCHAIN_ARM/startup_nrf52840.S b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/TOOLCHAIN_ARM/startup_nrf52840.S new file mode 100644 index 0000000000..75c1aef421 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/TOOLCHAIN_ARM/startup_nrf52840.S @@ -0,0 +1,267 @@ +;/* Copyright (c) 2012 ARM LIMITED +; +; All rights reserved. +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions are met: +; - Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; - Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in the +; documentation and/or other materials provided with the distribution. +; - Neither the name of ARM nor the names of its contributors may be used +; to endorse or promote products derived from this software without +; specific prior written permission. +; * +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +; ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE +; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +; POSSIBILITY OF SUCH DAMAGE. +; ---------------------------------------------------------------------------*/ + + PRESERVE8 + THUMB + +; Vector Table Mapped to Address 0 at Reset + + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + IMPORT |Image$$ARM_LIB_STACK$$ZI$$Limit| + +__Vectors DCD |Image$$ARM_LIB_STACK$$ZI$$Limit| ; Top of Stack + DCD Reset_Handler + DCD NMI_Handler + DCD HardFault_Handler + DCD MemoryManagement_Handler + DCD BusFault_Handler + DCD UsageFault_Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler + DCD DebugMonitor_Handler + DCD 0 ; Reserved + DCD PendSV_Handler + DCD SysTick_Handler + + ; External Interrupts + DCD POWER_CLOCK_IRQHandler + DCD RADIO_IRQHandler + DCD UARTE0_UART0_IRQHandler_v + DCD SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler_v + DCD SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler_v + DCD NFCT_IRQHandler_v + DCD GPIOTE_IRQHandler_v + DCD SAADC_IRQHandler_v + DCD TIMER0_IRQHandler_v + DCD TIMER1_IRQHandler_v + DCD TIMER2_IRQHandler_v + DCD RTC0_IRQHandler + DCD TEMP_IRQHandler_v + DCD RNG_IRQHandler + DCD ECB_IRQHandler + DCD CCM_AAR_IRQHandler + DCD WDT_IRQHandler_v + DCD RTC1_IRQHandler_v + DCD QDEC_IRQHandler_v + DCD COMP_LPCOMP_IRQHandler_v + DCD SWI0_EGU0_IRQHandler_v + DCD SWI1_EGU1_IRQHandler_v + DCD SWI2_EGU2_IRQHandler_v + DCD SWI3_EGU3_IRQHandler_v + DCD SWI4_EGU4_IRQHandler + DCD SWI5_EGU5_IRQHandler + DCD TIMER3_IRQHandler_v + DCD TIMER4_IRQHandler_v + DCD PWM0_IRQHandler_v + DCD PDM_IRQHandler_v + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD MWU_IRQHandler + DCD PWM1_IRQHandler_v + DCD PWM2_IRQHandler_v + DCD SPIM2_SPIS2_SPI2_IRQHandler_v + DCD RTC2_IRQHandler_v + DCD I2S_IRQHandler_v + DCD FPU_IRQHandler_v + DCD USBD_IRQHandler_v + DCD UARTE1_IRQHandler_v + DCD QSPI_IRQHandler_v + DCD CRYPTOCELL_IRQHandler_v + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD PWM3_IRQHandler_v + DCD 0 ; Reserved + DCD SPIM3_IRQHandler_v + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset Handler + + +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + IMPORT nrf_reloc_vector_table + + + LDR R0, =SystemInit + BLX R0 + LDR R0, =nrf_reloc_vector_table + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemoryManagement_Handler\ + PROC + EXPORT MemoryManagement_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMonitor_Handler\ + PROC + EXPORT DebugMonitor_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT POWER_CLOCK_IRQHandler [WEAK] + EXPORT RADIO_IRQHandler [WEAK] + EXPORT UARTE0_UART0_IRQHandler_v [WEAK] + EXPORT SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler_v [WEAK] + EXPORT SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler_v [WEAK] + EXPORT NFCT_IRQHandler_v [WEAK] + EXPORT GPIOTE_IRQHandler_v [WEAK] + EXPORT SAADC_IRQHandler_v [WEAK] + EXPORT TIMER0_IRQHandler_v [WEAK] + EXPORT TIMER1_IRQHandler_v [WEAK] + EXPORT TIMER2_IRQHandler_v [WEAK] + EXPORT RTC0_IRQHandler [WEAK] + EXPORT TEMP_IRQHandler_v [WEAK] + EXPORT RNG_IRQHandler [WEAK] + EXPORT ECB_IRQHandler [WEAK] + EXPORT CCM_AAR_IRQHandler [WEAK] + EXPORT WDT_IRQHandler_v [WEAK] + EXPORT RTC1_IRQHandler_v [WEAK] + EXPORT QDEC_IRQHandler_v [WEAK] + EXPORT COMP_LPCOMP_IRQHandler_v [WEAK] + EXPORT SWI0_EGU0_IRQHandler_v [WEAK] + EXPORT SWI1_EGU1_IRQHandler_v [WEAK] + EXPORT SWI2_EGU2_IRQHandler_v [WEAK] + EXPORT SWI3_EGU3_IRQHandler_v [WEAK] + EXPORT SWI4_EGU4_IRQHandler [WEAK] + EXPORT SWI5_EGU5_IRQHandler [WEAK] + EXPORT TIMER3_IRQHandler_v [WEAK] + EXPORT TIMER4_IRQHandler_v [WEAK] + EXPORT PWM0_IRQHandler_v [WEAK] + EXPORT PDM_IRQHandler_v [WEAK] + EXPORT MWU_IRQHandler [WEAK] + EXPORT PWM1_IRQHandler_v [WEAK] + EXPORT PWM2_IRQHandler_v [WEAK] + EXPORT SPIM2_SPIS2_SPI2_IRQHandler_v [WEAK] + EXPORT RTC2_IRQHandler_v [WEAK] + EXPORT I2S_IRQHandler_v [WEAK] + EXPORT FPU_IRQHandler_v [WEAK] + EXPORT USBD_IRQHandler_v [WEAK] + EXPORT UARTE1_IRQHandler_v [WEAK] + EXPORT QSPI_IRQHandler_v [WEAK] + EXPORT CRYPTOCELL_IRQHandler_v [WEAK] + EXPORT SPIM3_IRQHandler_v [WEAK] + EXPORT PWM3_IRQHandler_v [WEAK] + +POWER_CLOCK_IRQHandler +RADIO_IRQHandler +UARTE0_UART0_IRQHandler_v +SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler_v +SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler_v +NFCT_IRQHandler_v +GPIOTE_IRQHandler_v +SAADC_IRQHandler_v +TIMER0_IRQHandler_v +TIMER1_IRQHandler_v +TIMER2_IRQHandler_v +RTC0_IRQHandler +TEMP_IRQHandler_v +RNG_IRQHandler +ECB_IRQHandler +CCM_AAR_IRQHandler +WDT_IRQHandler_v +RTC1_IRQHandler_v +QDEC_IRQHandler_v +COMP_LPCOMP_IRQHandler_v +SWI0_EGU0_IRQHandler_v +SWI1_EGU1_IRQHandler_v +SWI2_EGU2_IRQHandler_v +SWI3_EGU3_IRQHandler_v +SWI4_EGU4_IRQHandler +SWI5_EGU5_IRQHandler +TIMER3_IRQHandler_v +TIMER4_IRQHandler_v +PWM0_IRQHandler_v +PDM_IRQHandler_v +MWU_IRQHandler +PWM1_IRQHandler_v +PWM2_IRQHandler_v +SPIM2_SPIS2_SPI2_IRQHandler_v +RTC2_IRQHandler_v +I2S_IRQHandler_v +FPU_IRQHandler_v +USBD_IRQHandler_v +UARTE1_IRQHandler_v +QSPI_IRQHandler_v +CRYPTOCELL_IRQHandler_v +PWM3_IRQHandler_v +SPIM3_IRQHandler_v + + B . + ENDP + ALIGN + END diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/CMakeLists.txt new file mode 100644 index 0000000000..448a3efa49 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/CMakeLists.txt @@ -0,0 +1,8 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +mbed_add_cmake_directory_if_labels("TARGET") + +add_subdirectory(components) +add_subdirectory(integration) +add_subdirectory(modules) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_COMMON/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_COMMON/CMakeLists.txt new file mode 100644 index 0000000000..6947bca73e --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_COMMON/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/ble + ${CMAKE_CURRENT_SOURCE_DIR}/ble/ble_radio_notification + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/bootloader + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/bootloader/dfu + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/fstorage +) + +target_sources(mbed-os + PRIVATE + ble/ble_radio_notification/ble_radio_notification.c + + libraries/bootloader/dfu/nrf_dfu_mbr.c + + libraries/fstorage/nrf_fstorage_sd.c +) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_NONE/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_NONE/CMakeLists.txt new file mode 100644 index 0000000000..09d235a00b --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_NONE/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/libraries + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/fstorage + ${CMAKE_CURRENT_SOURCE_DIR}/nrf_soc_nosd/ +) + +target_sources(mbed-os + PRIVATE + libraries/fstorage/nrf_fstorage_nvmc.c + + nrf_soc_nosd/nrf_nvic.c + nrf_soc_nosd/nrf_soc.c +) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S112/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S112/CMakeLists.txt new file mode 100644 index 0000000000..7b387a2868 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S112/CMakeLists.txt @@ -0,0 +1,9 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/headers + ${CMAKE_CURRENT_SOURCE_DIR}/headers/nrf52 +) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S132_FULL/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S132_FULL/CMakeLists.txt new file mode 100644 index 0000000000..7b387a2868 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S132_FULL/CMakeLists.txt @@ -0,0 +1,9 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/headers + ${CMAKE_CURRENT_SOURCE_DIR}/headers/nrf52 +) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S132_MBR/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S132_MBR/CMakeLists.txt new file mode 100644 index 0000000000..b41d2f9ab3 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S132_MBR/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/headers + ${CMAKE_CURRENT_SOURCE_DIR}/libraries + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/fstorage + ${CMAKE_CURRENT_SOURCE_DIR}/nrf_soc_nosd +) + +target_sources(mbed-os + PRIVATE + libraries/fstorage/nrf_fstorage_nvmc.c + nrf_soc_nosd/nrf_nvic.c + nrf_soc_nosd/nrf_soc.c +) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S132_OTA/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S132_OTA/CMakeLists.txt new file mode 100644 index 0000000000..b41d2f9ab3 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S132_OTA/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/headers + ${CMAKE_CURRENT_SOURCE_DIR}/libraries + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/fstorage + ${CMAKE_CURRENT_SOURCE_DIR}/nrf_soc_nosd +) + +target_sources(mbed-os + PRIVATE + libraries/fstorage/nrf_fstorage_nvmc.c + nrf_soc_nosd/nrf_nvic.c + nrf_soc_nosd/nrf_soc.c +) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S140_FULL/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S140_FULL/CMakeLists.txt new file mode 100644 index 0000000000..7b387a2868 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S140_FULL/CMakeLists.txt @@ -0,0 +1,9 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/headers + ${CMAKE_CURRENT_SOURCE_DIR}/headers/nrf52 +) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S140_MBR/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S140_MBR/CMakeLists.txt new file mode 100644 index 0000000000..b41d2f9ab3 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S140_MBR/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/headers + ${CMAKE_CURRENT_SOURCE_DIR}/libraries + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/fstorage + ${CMAKE_CURRENT_SOURCE_DIR}/nrf_soc_nosd +) + +target_sources(mbed-os + PRIVATE + libraries/fstorage/nrf_fstorage_nvmc.c + nrf_soc_nosd/nrf_nvic.c + nrf_soc_nosd/nrf_soc.c +) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S140_OTA/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S140_OTA/CMakeLists.txt new file mode 100644 index 0000000000..7b387a2868 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S140_OTA/CMakeLists.txt @@ -0,0 +1,9 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/headers + ${CMAKE_CURRENT_SOURCE_DIR}/headers/nrf52 +) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/components/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/components/CMakeLists.txt new file mode 100644 index 0000000000..2616af4065 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/components/CMakeLists.txt @@ -0,0 +1,65 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/libraries + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/atomic + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/atomic_fifo + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/balloc + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/delay + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/experimental_log + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/experimental_log/src + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/experimental_memobj + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/experimental_section_vars + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/fds + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/fstorage + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/queue + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/spi_mngr + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/strerror + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/twi_mngr + ${CMAKE_CURRENT_SOURCE_DIR}/libraries/util +) + +target_sources(mbed-os + PRIVATE + libraries/atomic/nrf_atomic.c + + libraries/atomic_fifo/nrf_atfifo.c + + libraries/balloc/nrf_balloc.c + + libraries/experimental_log/src/nrf_log_backend_flash.c + libraries/experimental_log/src/nrf_log_backend_rtt.c + libraries/experimental_log/src/nrf_log_backend_serial.c + libraries/experimental_log/src/nrf_log_backend_uart.c + libraries/experimental_log/src/nrf_log_default_backends.c + libraries/experimental_log/src/nrf_log_frontend.c + libraries/experimental_log/src/nrf_log_str_formatter.c + + libraries/experimental_memobj/nrf_memobj.c + + libraries/experimental_section_vars/nrf_section_iter.c + + libraries/fds/fds.c + + libraries/fstorage/nrf_fstorage.c + + libraries/queue/nrf_queue.c + + libraries/spi_mngr/nrf_spi_mngr.c + + libraries/strerror/nrf_strerror.c + + libraries/twi_mngr/nrf_twi_mngr.c + + libraries/util/app_error.c + libraries/util/app_error_handler_gcc.c + libraries/util/app_error_handler_iar.c + libraries/util/app_error_handler_keil.c + libraries/util/app_error_weak.c + libraries/util/app_util_platform.c + libraries/util/nrf_assert.c + libraries/util/sdk_mapped_flags.c +) \ No newline at end of file diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/integration/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/integration/CMakeLists.txt new file mode 100644 index 0000000000..072c6fc855 --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/integration/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/nrfx + ${CMAKE_CURRENT_SOURCE_DIR}/nrfx/legacy + ${CMAKE_CURRENT_SOURCE_DIR}/nrfx/legacy/ble_flash +) + +target_sources(mbed-os + PRIVATE + nrfx/legacy/nrf_drv_rng.c + nrfx/legacy/nrf_drv_usbd.c + + nrfx/legacy/ble_flash/ble_flash.c +) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/CMakeLists.txt b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/CMakeLists.txt new file mode 100644 index 0000000000..839b7f5aae --- /dev/null +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/CMakeLists.txt @@ -0,0 +1,59 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_include_directories(mbed-os + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/nrfx + ${CMAKE_CURRENT_SOURCE_DIR}/nrfx/drivers + ${CMAKE_CURRENT_SOURCE_DIR}/nrfx/drivers/include + ${CMAKE_CURRENT_SOURCE_DIR}/nrfx/drivers/src + ${CMAKE_CURRENT_SOURCE_DIR}/nrfx/drivers/src/prs + ${CMAKE_CURRENT_SOURCE_DIR}/nrfx/hal + ${CMAKE_CURRENT_SOURCE_DIR}/nrfx/mdk + ${CMAKE_CURRENT_SOURCE_DIR}/nrfx/soc + ${CMAKE_CURRENT_SOURCE_DIR}/softdevice + ${CMAKE_CURRENT_SOURCE_DIR}/softdevice/common +) + +target_sources(mbed-os + PRIVATE + nrfx/drivers/src/nrfx_adc.c + nrfx/drivers/src/nrfx_clock.c + nrfx/drivers/src/nrfx_comp.c + nrfx/drivers/src/nrfx_gpiote.c + nrfx/drivers/src/nrfx_i2s.c + nrfx/drivers/src/nrfx_lpcomp.c + nrfx/drivers/src/nrfx_pdm.c + nrfx/drivers/src/nrfx_power.c + nrfx/drivers/src/nrfx_power_clock.c + nrfx/drivers/src/nrfx_ppi.c + nrfx/drivers/src/nrfx_pwm.c + nrfx/drivers/src/nrfx_qdec.c + nrfx/drivers/src/nrfx_qspi.c + nrfx/drivers/src/nrfx_rng.c + nrfx/drivers/src/nrfx_rtc.c + nrfx/drivers/src/nrfx_saadc.c + nrfx/drivers/src/nrfx_spi.c + nrfx/drivers/src/nrfx_spim.c + nrfx/drivers/src/nrfx_spis.c + nrfx/drivers/src/nrfx_swi.c + nrfx/drivers/src/nrfx_systick.c + nrfx/drivers/src/nrfx_timer.c + nrfx/drivers/src/nrfx_twi.c + nrfx/drivers/src/nrfx_twim.c + nrfx/drivers/src/nrfx_twis.c + nrfx/drivers/src/nrfx_uart.c + nrfx/drivers/src/nrfx_uarte.c + nrfx/drivers/src/nrfx_wdt.c + + nrfx/drivers/src/prs/nrfx_prs.c + + nrfx/hal/nrf_ecb.c + nrfx/hal/nrf_nvmc.c + + softdevice/common/nrf_sdh.c + softdevice/common/nrf_sdh_ant.c + softdevice/common/nrf_sdh_ble.c + softdevice/common/nrf_sdh_soc.c +)