Firmwares/hello-world/CMakeLists.txt

13 lines
412 B
CMake

cmake_minimum_required(VERSION 3.21)
project(hello-world C)
set(TARGET hello)
add_executable(${TARGET} hello.c)
set(BOARD "iss" CACHE STRING "Target board")
add_subdirectory(../bare-metal-bsp bsp)
target_link_libraries(${TARGET} PRIVATE bsp)
add_custom_command(TARGET ${TARGET} POST_BUILD
COMMAND ${CMAKE_OBJDUMP} -S ${TARGET}.elf > ${TARGET}.dis
COMMENT "Creating disassembly for ${TARGET}")