diff options
Diffstat (limited to 'pcr/neo6502/build_offline.patch')
-rw-r--r-- | pcr/neo6502/build_offline.patch | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/pcr/neo6502/build_offline.patch b/pcr/neo6502/build_offline.patch new file mode 100644 index 000000000..66616024f --- /dev/null +++ b/pcr/neo6502/build_offline.patch @@ -0,0 +1,134 @@ +diff --git a/firmware/CMakeLists.txt b/firmware/CMakeLists.txt +index a347acf4..7c4e484e 100644 +--- a/firmware/CMakeLists.txt ++++ b/firmware/CMakeLists.txt +@@ -3,19 +3,28 @@ cmake_minimum_required(VERSION 3.14) + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) + +-set(PICO_SDK_FETCH_FROM_GIT on) ++ ++if(NOT DEFINED ENV{PICO_SDK_FETCH_FROM_GIT}) ++ set(PICO_SDK_FETCH_FROM_GIT on) ++ message("Defaulting PICO_SDK_FETCH_FROM_GIT") ++endif() + include(pico_sdk_import.cmake) + + project(firmware C CXX ASM) + + include(FetchContent) + +-FetchContent_Declare( +- tinyusb +- GIT_REPOSITORY https://github.com/hathach/tinyusb.git +- GIT_TAG 0.16.0 +-) +-FetchContent_MakeAvailable(tinyusb) ++# if((NOT DEFINED ENV{PICO_TINYUSB_FETCH_FROM_GIT}) OR ENV{PICO_TINYUSB_FETCH_FROM_GIT}) ++if(DEFINED ENV{PICO_TINYUSB_PATH}) ++ set(tinyusb_SOURCE_DIR $ENV{PICO_TINYUSB_PATH}) ++else() ++ FetchContent_Declare( ++ tinyusb ++ GIT_REPOSITORY https://github.com/hathach/tinyusb.git ++ GIT_TAG 0.16.0 ++ ) ++ FetchContent_MakeAvailable(tinyusb) ++endif() + set(PICO_TINYUSB_PATH ${tinyusb_SOURCE_DIR}) + + pico_sdk_init() +@@ -34,13 +43,18 @@ include_directories( + common/include + ) + +-FetchContent_Declare( +- PicoDVI +- GIT_REPOSITORY https://github.com/Wren6991/PicoDVI +- GIT_TAG a248d72b8cc95a08b43ef4307cd954eb801272b2 # just the latest on 11/12/2023 +-) +-FetchContent_MakeAvailable(PicoDVI) +- ++# if ((NOT DEFINED ENV{PICO_DVI_FETCH_FROM_GIT}) OR ENV{PICO_DVI_FETCH_FROM_GIT}) ++if(DEFINED ENV{PICO_DVI_PATH}) ++ set(picodvi_SOURCE_DIR $ENV{PICO_DVI_PATH}) ++ set(picodvi_BINARY_DIR "_deps/picodvi-build") ++else() ++ FetchContent_Declare( ++ PicoDVI ++ GIT_REPOSITORY https://github.com/Wren6991/PicoDVI ++ GIT_TAG a248d72b8cc95a08b43ef4307cd954eb801272b2 # just the latest on 11/12/2023 ++ ) ++ FetchContent_MakeAvailable(PicoDVI) ++endif() + add_subdirectory(${picodvi_SOURCE_DIR}/software/libdvi ${picodvi_BINARY_DIR}) + + add_library(fatfs INTERFACE) +@@ -54,4 +68,4 @@ target_include_directories(fatfs INTERFACE ${tinyusb_SOURCE_DIR}/lib/fatfs/sourc + add_subdirectory(sources) + + pico_enable_stdio_usb(firmware 0) +-pico_enable_stdio_uart(firmware 0) +\ No newline at end of file ++pico_enable_stdio_uart(firmware 0) +diff --git a/firmware/sources/CMakeLists.txt b/firmware/sources/CMakeLists.txt +index a767fc49..1dd8f093 100644 +--- a/firmware/sources/CMakeLists.txt ++++ b/firmware/sources/CMakeLists.txt +@@ -1,11 +1,16 @@ + add_executable(firmware) + +-FetchContent_Declare( +- no-OS-FatFS-SD-SPI-RPi-Pico +- GIT_REPOSITORY https://github.com/carlk3/no-OS-FatFS-SD-SPI-RPi-Pico.git +- GIT_TAG bbccc5d2deea09e128e2576ef35f72b473c5ba5f # just the latest on 30/01/2024 +-) +-FetchContent_MakeAvailable(no-OS-FatFS-SD-SPI-RPi-Pico) ++if (DEFINED ENV{PICO_FATFS_PATH}) ++ set(no-os-fatfs-sd-spi-rpi-pico_SOURCE_DIR $ENV{PICO_FATFS_PATH}) ++ set(no-os-fatfs-sd-spi-rpi-pico_BINARY_DIR "_deps/no-os-fatfs-sd-spi-rpi-pico-build") ++else() ++ FetchContent_Declare( ++ no-OS-FatFS-SD-SPI-RPi-Pico ++ GIT_REPOSITORY https://github.com/carlk3/no-OS-FatFS-SD-SPI-RPi-Pico.git ++ GIT_TAG bbccc5d2deea09e128e2576ef35f72b473c5ba5f # just the latest on 30/01/2024 ++ ) ++ FetchContent_MakeAvailable(no-OS-FatFS-SD-SPI-RPi-Pico) ++endif() + + pico_generate_pio_header(firmware ${CMAKE_CURRENT_LIST_DIR}/system/sm0_memory_emulation_with_clock.pio) + +@@ -13,26 +18,26 @@ add_definitions(-Wno-error=unused-variable) + + set(COMMONSRC "../common/sources/interface") + +-target_sources(firmware PRIVATE main.cpp ++target_sources(firmware PRIVATE main.cpp + # + # Common ${COMMONSRC} routines + # +- ${COMMONSRC}/graphics.cpp ${COMMONSRC}/console.cpp ${COMMONSRC}/keyboard.cpp ${COMMONSRC}/memory.cpp +- ${COMMONSRC}/dispatch.cpp ${COMMONSRC}/maths.cpp ${COMMONSRC}/config.cpp ${COMMONSRC}/efla.cpp +- ${COMMONSRC}/gfxcommands.cpp ${COMMONSRC}/ellipse.cpp ${COMMONSRC}/fileinterface.cpp ++ ${COMMONSRC}/graphics.cpp ${COMMONSRC}/console.cpp ${COMMONSRC}/keyboard.cpp ${COMMONSRC}/memory.cpp ++ ${COMMONSRC}/dispatch.cpp ${COMMONSRC}/maths.cpp ${COMMONSRC}/config.cpp ${COMMONSRC}/efla.cpp ++ ${COMMONSRC}/gfxcommands.cpp ${COMMONSRC}/ellipse.cpp ${COMMONSRC}/fileinterface.cpp + ${COMMONSRC}/sprites.cpp ${COMMONSRC}/logo.cpp ${COMMONSRC}/sprites_xor.cpp ${COMMONSRC}/tilemap.cpp + ${COMMONSRC}/sndmanager.cpp ${COMMONSRC}/sfxmanager.cpp ${COMMONSRC}/tick.cpp ${COMMONSRC}/serialmanager.cpp + ${COMMONSRC}/turtle.cpp ${COMMONSRC}/locale.cpp ${COMMONSRC}/pininterface.cpp + # + # Hardware sources + # +- hardware/dvi_320x240x256.cpp hardware/usbdriver.cpp hardware/timer.cpp hardware/sound.cpp ++ hardware/dvi_320x240x256.cpp hardware/usbdriver.cpp hardware/timer.cpp hardware/sound.cpp + hardware/fileimplementation.cpp hardware/tick.cpp hardware/serial.cpp hardware/ports.cpp + # + # CPU type (pretty much permanently PIO now) + # +- system/processor_pio.cpp +- #system/processor_bitbang.cpp ++ system/processor_pio.cpp ++ #system/processor_bitbang.cpp + ) + + #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") |