board test running with cmake

This commit is contained in:
hathach 2023-04-20 16:42:13 +07:00
parent fab48e5bcc
commit b42d3e431c
3 changed files with 15 additions and 6 deletions

View File

@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="rt1010" type="com.jetbrains.cidr.embedded.customgdbserver.type" factoryName="com.jetbrains.cidr.embedded.customgdbserver.factory" folderName="imxrt" PROGRAM_PARAMS="gdbserver -p 55503 -t mimxrt1010" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="board_test" TARGET_NAME="board_test" CONFIG_NAME="rp2040" version="1" RUN_TARGET_PROJECT_NAME="board_test" RUN_TARGET_NAME="board_test">
<custom-gdb-server version="1" gdb-connect="tcp::55503" executable="$USER_HOME$/.local/bin/pyocd" warmup-ms="0" download-type="UPDATED_ONLY" reset-cmd="monitor reset" reset-type="AFTER_DOWNLOAD">
<debugger kind="GDB" isBundled="true" />
</custom-gdb-server>
<method v="2">
<option name="CLION.COMPOUND.BUILD" enabled="true" />
</method>
</configuration>
</component>

View File

@ -11,7 +11,7 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR})
project(${PROJECT})
project(${PROJECT} C CXX ASM)
# Checks this example is valid for the family and initializes the project
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR})

View File

@ -26,13 +26,8 @@ else ()
target_link_options(${PROJECT} PUBLIC
--specs=nosys.specs
--specs=nano.specs
#-lgcc -lm -lnosys
)
# target_link_libraries(${PROJECT} PUBLIC
# -lgcc -lm -lnosys
# )
target_sources(${PROJECT} PUBLIC
# TinyUSB
${TOP}/src/portable/chipidea/ci_hs/dcd_ci_hs.c
@ -53,6 +48,10 @@ else ()
target_sources(${PROJECT} PUBLIC
${SDK_DIR}/devices/${MCU_VARIANT}/gcc/startup_${MCU_VARIANT}.S
)
target_link_options(${PROJECT} PUBLIC
"LINKER:--script=${SDK_DIR}/devices/${MCU_VARIANT}/gcc/${MCU_VARIANT}xxxxx_flexspi_nor.ld"
)
endif ()
target_include_directories(${PROJECT} PUBLIC