summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authordweller <dweller@cabin.digital>2024-09-16 13:05:33 +0300
committerdweller <dweller@cabin.digital>2024-09-16 13:05:33 +0300
commit68a2a3a373f01ec128221f2c7dec998bdd832a85 (patch)
treef08d2dc8567b9ce18649c2e7ba6280aa5420bf0e /CMakeLists.txt
Initial commit
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..ec8beae
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,25 @@
+cmake_minimum_required(VERSION 3.13)
+include(/home/dwlr/projects/current/rp2040/pico-sdk/pico_sdk_init.cmake)
+
+pico_sdk_init()
+project(eeprom2blk)
+enable_language(C CXX ASM)
+
+add_executable(eeprom2blk main.c)
+
+set_source_files_properties(main.c PROPERTIES
+ COMPILE_FLAGS -Wall -Wextra -pedantic
+ C_STANDARD 90
+)
+
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/generated)
+pico_generate_pio_header(eeprom2blk ${CMAKE_CURRENT_LIST_DIR}/ws2812.pio OUTPUT_DIR ${CMAKE_CURRENT_LIST_DIR}/generated)
+
+target_link_libraries(eeprom2blk pico_stdlib hardware_pio hardware_dma)
+
+# change default stdout
+pico_enable_stdio_usb(eeprom2blk 1)
+pico_enable_stdio_uart(eeprom2blk 0)
+
+# create map/bin/hex/uf2 file in addition to ELF.
+pico_add_extra_outputs(eeprom2blk)