-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
87 lines (68 loc) · 2.23 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# == DO NEVER EDIT THE NEXT LINES for Raspberry Pi Pico VS Code Extension to work ==
if(WIN32)
set(USERHOME $ENV{USERPROFILE})
else()
set(USERHOME $ENV{HOME})
endif()
set(sdkVersion 2.0.0)
set(toolchainVersion 13_2_Rel1)
set(picotoolVersion 2.0.0)
set(picoVscode ${USERHOME}/.pico-sdk/cmake/pico-vscode.cmake)
if (EXISTS ${picoVscode})
include(${picoVscode})
endif()
# ====================================================================================
cmake_minimum_required(VERSION 3.13)
set_property(GLOBAL PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
set(PICO_SDK_PATH ../deps/pico-sdk)
set(PICO_EXTRAS_PATH ../deps/pico-extras)
set(PICO_PLAYGROUND_PATH ../deps/pico-playground)
# Pull in PICO SDK (must be before project)
include(pico_sdk_import.cmake)
# We also need PICO EXTRAS
include(pico_extras_import.cmake)
project(picos C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 20)
pico_sdk_init()
add_executable(picos
src/windowRendering.S
src/mem.S
src/draw.cpp
src/font.cpp
src/fontData8.c
src/main.cpp
src/text.cpp
src/menu.cpp
src/input.cpp
)
pico_set_binary_type(picos copy_to_ram)
target_compile_definitions(picos PRIVATE
PICO_SCANVIDEO_SCANLINE_BUFFER_COUNT=4
#PICO_SCANVIDEO_MAX_SCANLINE_BUFFER_WORDS=600
PICO_SCANVIDEO_PLANE_COUNT=2
# Layer 1 Background: Direct rendered
PICO_SCANVIDEO_MAX_SCANLINE_BUFFER_WORDS=60
# Layer 2 Text: DMA rendered
PICO_SCANVIDEO_MAX_SCANLINE_BUFFER2_WORDS=600
PICO_SCANVIDEO_PLANE2_FIXED_FRAGMENT_DMA=true
# Layer 3 Icons: DMA rendered?
#PICO_SCANVIDEO_MAX_SCANLINE_BUFFER3_WORDS=400
)
pico_add_extra_outputs(picos)
pico_enable_stdio_usb(picos 1)
pico_enable_stdio_uart(picos 0)
#pico_set_float_implementation(picos none)
#pico_set_double_implementation(picos none)
target_compile_options(picos PUBLIC "-Ofast" "-DDO_CHECKS")
target_link_options(picos PUBLIC "-Ofast")
target_link_libraries(picos PRIVATE
pico_multicore
hardware_gpio
hardware_clocks
hardware_sleep
pico_binary_info
pico_runtime
pico_stdlib
pico_scanvideo_dpi)
include_directories(picos include)