ports/All: Switch to using board pendsv entries.

This commit is contained in:
iabdalkader 2023-04-07 12:37:18 +02:00
parent afb26ddf72
commit aa6685283d
3 changed files with 13 additions and 1 deletions

View File

@ -110,6 +110,9 @@ MICROPY_ARGS = PORT=$(PORT) BOARD=$(TARGET) DEBUG=$(DEBUG) MPY_LIB_DIR=$(MPY_LIB
FROZEN_MANIFEST=$(FROZEN_MANIFEST) OMV_SRC_QSTR="$(OMV_SRC_QSTR)"\
MICROPY_ROM_TEXT_COMPRESSION=$(ROM_TEXT_COMPRESSION) USER_C_MODULES=$(TOP_DIR)/$(OMV_DIR)
# TinyUSB CDC debugger PendSV dispatch entry
MPY_PENDSV_ENTRIES += PENDSV_DISPATCH_CDC,
# Configure additional built-in modules. Note must define both the CFLAGS and the Make command line args.
ifeq ($(MICROPY_PY_SENSOR), 1)
MPY_CFLAGS += -DMICROPY_PY_SENSOR=1
@ -119,6 +122,7 @@ endif
ifeq ($(MICROPY_PY_WINC1500), 1)
MPY_CFLAGS += -DMICROPY_PY_WINC1500=1
MICROPY_ARGS += MICROPY_PY_WINC1500=1
MPY_PENDSV_ENTRIES += PENDSV_DISPATCH_WINC,
endif
ifeq ($(MICROPY_PY_IMU), 1)
@ -188,6 +192,9 @@ MPY_CFLAGS += -DMICROPY_PY_CUBEAI=1
MICROPY_ARGS += MICROPY_PY_CUBEAI=1
endif
MPY_PENDSV_ENTRIES := $(shell echo $(MPY_PENDSV_ENTRIES) | tr -d '[:space:]')
MPY_CFLAGS += -DMICROPY_BOARD_PENDSV_ENTRIES="$(MPY_PENDSV_ENTRIES)"
# Include the port Makefile.
include $(OMV_DIR)/ports/$(PORT)/omv_portconfig.mk

@ -1 +1 @@
Subproject commit fe89f40ff3726f4168eae70bf1a591198de2fbbe
Subproject commit 01a75d8501bc60e969d7fb4c1096c208693a2609

View File

@ -56,6 +56,7 @@ pico_set_linker_script(${MICROPY_TARGET} ${BUILD}/rp2.ld)
file(GLOB OMV_SRC_QSTR1 ${TOP_DIR}/${OMV_DIR}/modules/*.c)
file(GLOB OMV_SRC_QSTR2 ${TOP_DIR}/${OMV_DIR}/ports/${PORT}/modules/*.c)
list(APPEND MICROPY_SOURCE_QSTR ${OMV_SRC_QSTR1} ${OMV_SRC_QSTR2})
set(MPY_PENDSV_ENTRIES PENDSV_DISPATCH_CDC,)
target_include_directories(${MICROPY_TARGET} PRIVATE
${TOP_DIR}/${CMSIS_DIR}/include/
@ -261,6 +262,10 @@ if(MICROPY_PY_ULAB)
)
endif()
target_compile_definitions(${MICROPY_TARGET} PRIVATE
MICROPY_BOARD_PENDSV_ENTRIES=${MPY_PENDSV_ENTRIES}
)
add_custom_command(TARGET ${MICROPY_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${BIN_DIR}