-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
56 lines (44 loc) · 1.41 KB
/
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
47
48
49
50
51
52
53
54
55
56
cmake_minimum_required(VERSION 3.12)
# Pull in SDK (must be before project)
include(pico_sdk_import.cmake)
project(RP2040-Decoder C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(PICO_DECODER_PATH ${PROJECT_SOURCE_DIR})
# Stop the compiler from inling method calls making it easier to debug
set(PICO_DEOPTIMIZED_DEBUG 1)
# Initialize the SDK
pico_sdk_init()
add_compile_options(-Wall
-Wno-format # int != int32 _t as far as the compiler is concerned because gcc has int32_t as long int
-Wno-unused-function # we have some for the docs that aren't called
-Wno-maybe-uninitialized
)
add_executable(
RP2040-Decoder
core0.c
core0.h
core1.c
core1.h
shared.c
shared.h)
# Multiplier to lengthen XOSC startup delay to accommodate slow-starting oscillator
target_compile_definitions(
RP2040-Decoder PUBLIC
PICO_XOSC_STARTUP_DELAY_MULTIPLIER=64
)
# Add pico_multicore which is required for multicore functionality
target_link_libraries(
RP2040-Decoder
pico_stdlib
hardware_pwm
hardware_adc
hardware_flash
pico_multicore
)
# disable usb stack
pico_enable_stdio_usb(RP2040-Decoder 0)
# disable uart output (to enable put a 1 instead of the 0)
pico_enable_stdio_uart(RP2040-Decoder 0)
# create map/bin/hex file etc.
#pico_add_extra_outputs(RP2040-Decoder)