-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
65 lines (51 loc) · 1.91 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
cmake_minimum_required(VERSION 3.12)
include(pico_sdk_import.cmake)
project(asd C CXX ASM)
pico_sdk_init()
add_executable(negcart
src/main.c
src/coreboot.c
src/frm.c
src/neg.c
src/picart_setup.c
src/bf_table.c
src/bf.c
src/png.c
)
pico_generate_pio_header(negcart ${CMAKE_CURRENT_LIST_DIR}/src/nicart.pio)
pico_set_linker_script(negcart ${CMAKE_CURRENT_LIST_DIR}/neg.ld)
#pico_set_linker_script(negcart ${CMAKE_CURRENT_LIST_DIR}/neg_ram.ld)
pico_set_binary_type(negcart blocked_ram)
#pico_set_binary_type(negcart no_flash)
target_link_libraries(negcart
pico_stdlib
pico_multicore
hardware_pio
hardware_dma
hardware_gpio
hardware_irq
hardware_exception
)
#target_compile_options(negcart PUBLIC -Os -g)
#target_link_options(negcart PUBLIC -Os -g)
#target_compile_definitions(hardware_timer INTERFACE PICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1)
pico_set_double_implementation(negcart none)
pico_set_float_implementation(negcart none)
add_compile_definitions(PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS=5000)
add_compile_definitions(PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE=0)
add_compile_definitions(PICO_DEFAULT_UART_TX_PIN=0)
add_compile_definitions(PICO_DEFAULT_UART_RX_PIN=1)
add_compile_definitions(PICO_DEFAULT_UART_BAUD_RATE=115200)
add_compile_definitions(PICO_PRINTF_ALWAYS_INCLUDED=1)
add_compile_definitions(PICO_PRINTF_SUPPORT_LONG_LONG=0)
add_compile_definitions(PICO_PRINTF_SUPPORT_FLOAT=0)
add_compile_definitions(PICO_PRINTF_SUPPORT_EXPONENTIAL=0)
add_compile_definitions(PICO_FLOAT_PROPAGATE_NANS=0)
add_compile_definitions(PICO_NO_FPGA_CHECK=1)
add_compile_definitions(PICO_FLOAT_SUPPORT_ROM_V1=0)
add_compile_definitions(PICO_DOUBLE_SUPPORT_ROM_V1=0)
#add_compile_definitions(PICO_RP2040_B1_SUPPORTED=0)
#add_compile_definitions(PICO_RP2040_B2_SUPPORTED=0)
pico_enable_stdio_uart(negcart 1)
pico_enable_stdio_usb(negcart 0)
pico_add_extra_outputs(negcart)