-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (21 loc) · 910 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
cmake_minimum_required(VERSION 3.12)
# Pull in SDK (must be before project)
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
# Initialize the SDK
pico_sdk_init()
project(Otaku C CXX ASM)
# Run from RAM only. Flash is too slow for heavy overclocking.
set(PICO_DEFAULT_BINARY_TYPE copy_to_ram)
add_executable(pico_rom)
target_sources(pico_rom PRIVATE rom.c)
# Enable USB output, disable UART output.
pico_enable_stdio_usb(pico_rom 1)
pico_enable_stdio_uart(pico_rom 0)
target_link_libraries(pico_rom PRIVATE pico_stdlib hardware_dma hardware_pwm)
pico_add_extra_outputs(pico_rom)
# Add url via pico_set_program_url.
#example_auto_set_url(pico_rom)
# Slow down flash during boot for heavy overclocking.
pico_define_boot_stage2(slower_boot2 ${PICO_DEFAULT_BOOT_STAGE2_FILE})
target_compile_definitions(slower_boot2 PRIVATE PICO_FLASH_SPI_CLKDIV=4)
pico_set_boot_stage2(pico_rom slower_boot2)