Skip to content

Commit

Permalink
Initial version of PicoBoot
Browse files Browse the repository at this point in the history
  • Loading branch information
webhdx committed Jun 20, 2022
0 parents commit 2ccf2e0
Show file tree
Hide file tree
Showing 6 changed files with 797 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.idea
.vscode
_deps
.DS_Store

# Build environment
build/
elf2uf2/
CMakeFiles/
CMakeCache.txt
cmake_install.cmake
generated/
ipl.h
Makefile
pico_sdk_import.cmake
pico-sdk/
picoboot.bin
picoboot.dis
picoboot.elf.map
picoboot.hex
picoboot.uf2
pioasm/
37 changes: 37 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
cmake_minimum_required(VERSION 3.13)

set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)

# Initialise pico_sdk from installed location
# (note this can come from environment, CMake cache etc)
set(PICO_SDK_PATH "/Volumes/Storage/Projects/Embedded/Raspberry Pi Pico/pico-sdk")

# Pull in Raspberry Pi Pico SDK (must be before project)
include(pico_sdk_import.cmake)

project(picoboot C CXX ASM)

# Initialise the Raspberry Pi Pico SDK
pico_sdk_init()

add_executable(picoboot picoboot.c)

pico_generate_pio_header(picoboot
${CMAKE_CURRENT_LIST_DIR}/picoboot.pio
)

pico_set_program_name(picoboot "picoboot")
pico_set_program_version(picoboot "0.1")
pico_set_binary_type(picoboot copy_to_ram)

pico_enable_stdio_uart(picoboot 0)
pico_enable_stdio_usb(picoboot 1)

target_link_libraries(picoboot
pico_stdlib
hardware_pio
hardware_dma
)

pico_add_extra_outputs(picoboot)
Loading

0 comments on commit 2ccf2e0

Please sign in to comment.