fix build, update freertos config for cmake
This commit is contained in:
@@ -42,17 +42,16 @@
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
// IAR assembler have limited preprocessor support and it only need following macros:
|
||||
// skip if included from IAR assembler
|
||||
#ifndef __IASMARM__
|
||||
// FIXME cause redundant-decls warnings
|
||||
extern uint32_t SystemCoreClock;
|
||||
#include "nrf.h"
|
||||
#endif
|
||||
|
||||
/* Cortex M23/M33 port configuration. */
|
||||
#define configENABLE_MPU 0
|
||||
#define configENABLE_FPU 1
|
||||
#define configENABLE_TRUSTZONE 0
|
||||
#define configMINIMAL_SECURE_STACK_SIZE (1024)
|
||||
#define configENABLE_MPU 0
|
||||
#define configENABLE_FPU 1
|
||||
#define configENABLE_TRUSTZONE 0
|
||||
#define configMINIMAL_SECURE_STACK_SIZE (1024)
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
|
||||
|
||||
@@ -6,7 +6,7 @@ function(update_board TARGET)
|
||||
NRF5340_XXAA
|
||||
NRF5340_XXAA_APPLICATION
|
||||
)
|
||||
target_sources(${TARGET} PUBLIC
|
||||
target_sources(${TARGET} PRIVATE
|
||||
${NRFX_DIR}/drivers/src/nrfx_usbreg.c
|
||||
)
|
||||
endfunction()
|
||||
|
||||
@@ -100,8 +100,6 @@ function(family_configure_example TARGET)
|
||||
#---------- Port Specific ----------
|
||||
# These files are built for each example since it depends on example's tusb_config.h
|
||||
target_sources(${TARGET} PUBLIC
|
||||
# TinyUSB Port
|
||||
${TOP}/src/portable/nordic/nrf5x/dcd_nrf5x.c
|
||||
# BSP
|
||||
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
|
||||
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
|
||||
@@ -113,8 +111,14 @@ function(family_configure_example TARGET)
|
||||
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/boards/${BOARD}
|
||||
)
|
||||
|
||||
# Add TinyUSB
|
||||
# Add TinyUSB target and port source
|
||||
family_add_tinyusb(${TARGET} OPT_MCU_NRF5X)
|
||||
target_sources(${TARGET}-tinyusb PUBLIC
|
||||
${TOP}/src/portable/nordic/nrf5x/dcd_nrf5x.c
|
||||
)
|
||||
target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
|
||||
|
||||
|
||||
|
||||
# Link dependencies
|
||||
target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
|
||||
|
||||
Reference in New Issue
Block a user