Compare commits
No commits in common. "680dde14b83b33c9bbd8b286939d83be0d12711b" and "87ea5f663fd4c7e9b70f964756552587ef931e1b" have entirely different histories.
680dde14b8
...
87ea5f663f
5 changed files with 7 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Generated Cmake Pico project file
|
# Generated Cmake Pico project file
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.28)
|
cmake_minimum_required(VERSION 3.26)
|
||||||
|
|
||||||
set(CMAKE_C_STANDARD 11)
|
set(CMAKE_C_STANDARD 11)
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
|
@ -14,8 +14,8 @@ set(PICO_BOARD pico CACHE STRING "Board type")
|
||||||
# Pull in Raspberry Pi Pico SDK (must be before project)
|
# Pull in Raspberry Pi Pico SDK (must be before project)
|
||||||
include(pico_sdk_import.cmake)
|
include(pico_sdk_import.cmake)
|
||||||
|
|
||||||
if (PICO_SDK_VERSION_STRING VERSION_LESS "2.0.0")
|
if (PICO_SDK_VERSION_STRING VERSION_LESS "1.5.0")
|
||||||
message(FATAL_ERROR "Raspberry Pi Pico SDK version 2.0.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}")
|
message(FATAL_ERROR "Raspberry Pi Pico SDK version 1.5.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
project(raspikeyer VERSION "0.0.1" LANGUAGES C CXX ASM)
|
project(raspikeyer VERSION "0.0.1" LANGUAGES C CXX ASM)
|
||||||
|
|
|
@ -18,20 +18,9 @@ if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_P
|
||||||
message("Using PICO_SDK_FETCH_FROM_GIT_PATH from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')")
|
message("Using PICO_SDK_FETCH_FROM_GIT_PATH from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_TAG} AND (NOT PICO_SDK_FETCH_FROM_GIT_TAG))
|
|
||||||
set(PICO_SDK_FETCH_FROM_GIT_TAG $ENV{PICO_SDK_FETCH_FROM_GIT_TAG})
|
|
||||||
message("Using PICO_SDK_FETCH_FROM_GIT_TAG from environment ('${PICO_SDK_FETCH_FROM_GIT_TAG}')")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (PICO_SDK_FETCH_FROM_GIT AND NOT PICO_SDK_FETCH_FROM_GIT_TAG)
|
|
||||||
set(PICO_SDK_FETCH_FROM_GIT_TAG "master")
|
|
||||||
message("Using master as default value for PICO_SDK_FETCH_FROM_GIT_TAG")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the Raspberry Pi Pico SDK")
|
set(PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the Raspberry Pi Pico SDK")
|
||||||
set(PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT}" CACHE BOOL "Set to ON to fetch copy of SDK from git if not otherwise locatable")
|
set(PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT}" CACHE BOOL "Set to ON to fetch copy of SDK from git if not otherwise locatable")
|
||||||
set(PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH}" CACHE FILEPATH "location to download SDK")
|
set(PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH}" CACHE FILEPATH "location to download SDK")
|
||||||
set(PICO_SDK_FETCH_FROM_GIT_TAG "${PICO_SDK_FETCH_FROM_GIT_TAG}" CACHE FILEPATH "release tag for SDK")
|
|
||||||
|
|
||||||
if (NOT PICO_SDK_PATH)
|
if (NOT PICO_SDK_PATH)
|
||||||
if (PICO_SDK_FETCH_FROM_GIT)
|
if (PICO_SDK_FETCH_FROM_GIT)
|
||||||
|
@ -45,14 +34,14 @@ if (NOT PICO_SDK_PATH)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
pico_sdk
|
pico_sdk
|
||||||
GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
|
GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
|
||||||
GIT_TAG ${PICO_SDK_FETCH_FROM_GIT_TAG}
|
GIT_TAG master
|
||||||
GIT_SUBMODULES_RECURSE FALSE
|
GIT_SUBMODULES_RECURSE FALSE
|
||||||
)
|
)
|
||||||
else ()
|
else ()
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
pico_sdk
|
pico_sdk
|
||||||
GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
|
GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
|
||||||
GIT_TAG ${PICO_SDK_FETCH_FROM_GIT_TAG}
|
GIT_TAG master
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
#include "bsp/board.h"
|
#include "bsp/board.h"
|
||||||
#include "hardware/adc.h"
|
#include "hardware/adc.h"
|
||||||
#include "pico/flash.h"
|
|
||||||
#include "pico/binary_info/code.h"
|
#include "pico/binary_info/code.h"
|
||||||
#include "pico/multicore.h"
|
#include "pico/multicore.h"
|
||||||
#include "pico/stdlib.h"
|
#include "pico/stdlib.h"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include "pico/stdlib.h"
|
#include "pico/stdlib.h"
|
||||||
#include "pico/flash.h"
|
|
||||||
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "hardware/flash.h"
|
#include "pico/flash.h"
|
||||||
|
|
||||||
const uint16_t MAGIC_NUMBER = 4;
|
const uint16_t MAGIC_NUMBER = 4;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue