2022-10-09 15:11:05 +00:00
|
|
|
cmake_minimum_required(VERSION 3.12)
|
|
|
|
|
|
|
|
# Pull in SDK
|
|
|
|
include(pico_sdk_import.cmake)
|
|
|
|
|
|
|
|
project(ceda2vga C CXX ASM)
|
|
|
|
set(CMAKE_C_STANDARD 11)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
|
|
|
|
# Initialize 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(ceda2vga
|
2022-12-08 14:14:34 +00:00
|
|
|
src/crtc.c
|
2022-10-09 15:11:05 +00:00
|
|
|
src/main.c
|
2022-12-02 21:49:07 +00:00
|
|
|
src/draw_demo.c
|
|
|
|
src/framebuffer.c
|
2022-12-03 19:52:47 +00:00
|
|
|
src/vga.c
|
2022-10-09 15:11:05 +00:00
|
|
|
)
|
|
|
|
|
2022-10-10 17:10:52 +00:00
|
|
|
pico_generate_pio_header(ceda2vga
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/src/vga.pio
|
|
|
|
)
|
|
|
|
|
2022-12-08 14:14:34 +00:00
|
|
|
pico_generate_pio_header(ceda2vga
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/src/crtc.pio
|
|
|
|
)
|
|
|
|
|
2022-10-10 17:10:52 +00:00
|
|
|
# configure stdio to make I/O on virtual usb serial port
|
2022-10-09 15:11:05 +00:00
|
|
|
pico_enable_stdio_usb(ceda2vga 1)
|
|
|
|
pico_enable_stdio_uart(ceda2vga 0)
|
|
|
|
|
|
|
|
# create map/bin/hex file etc.
|
|
|
|
pico_add_extra_outputs(ceda2vga)
|
|
|
|
|
|
|
|
# pull in common dependencies
|
2022-10-10 17:10:52 +00:00
|
|
|
target_link_libraries(ceda2vga
|
|
|
|
pico_stdlib
|
|
|
|
hardware_pio
|
2022-10-15 22:09:51 +00:00
|
|
|
hardware_dma
|
|
|
|
hardware_irq
|
2022-10-10 17:10:52 +00:00
|
|
|
)
|
2022-10-09 15:11:05 +00:00
|
|
|
|
|
|
|
# add url via pico_set_program_url
|
|
|
|
# example_auto_set_url(ceda2vga)
|