-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
46 lines (37 loc) · 974 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
cmake_minimum_required(VERSION 3.13)
# set project name
set(PROJECT picow_rom_emu)
# set pico board
set(PICO_BOARD pico_w)
# initialize the SDK based on PICO_SDK_PATH
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
# set the project name
project(${PROJECT} C CXX ASM)
# initialize the Raspberry Pi Pico SDK
pico_sdk_init()
# add the executable
add_executable(${PROJECT}
src/main.c
src/bin.h
src/cmd.c
src/rom.c
)
# add compile definitions
add_compile_definitions(
ROM_STACK_START=0x0000
ROM_STACK_END=0x07FF
)
# add target link libraries
target_link_libraries(
${PROJECT}
pico_stdlib
pico_cyw43_arch_none
)
# add compile options
target_compile_options(${PROJECT} PRIVATE -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-variable)
# create map/bin/hex file etc.
pico_add_extra_outputs(${PROJECT})
# enable USB output
pico_enable_stdio_usb(${PROJECT} 1)
# enable UART output
pico_enable_stdio_uart(${PROJECT} 1)