summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-10-06 00:19:29 +0200
committerChristian Pointner <equinox@spreadspace.org>2022-10-06 00:19:29 +0200
commitb49bae199727d313683cba5401a2ac1cf87a6a4a (patch)
treec3a375efe68afe2f2e5ccdbc5f3db99ff2e80db1
parentgcc 10 is not yet supported by chibios (diff)
further cleanup sdk builds
-rw-r--r--chibios-blink/Makefile2
-rw-r--r--debug.mk (renamed from rules.mk)0
-rw-r--r--sdk-blink/CMakeLists.txt33
-rw-r--r--sdk-blink/Makefile24
-rw-r--r--sdk.mk37
5 files changed, 67 insertions, 29 deletions
diff --git a/chibios-blink/Makefile b/chibios-blink/Makefile
index 9180851..53c5b2a 100644
--- a/chibios-blink/Makefile
+++ b/chibios-blink/Makefile
@@ -190,7 +190,7 @@ include $(RULESPATH)/rules.mk
# Custom rules
#
-include ../rules.mk
+include ../debug.mk
#
# Custom rules
diff --git a/rules.mk b/debug.mk
index 96745eb..96745eb 100644
--- a/rules.mk
+++ b/debug.mk
diff --git a/sdk-blink/CMakeLists.txt b/sdk-blink/CMakeLists.txt
index c365501..85c5ad4 100644
--- a/sdk-blink/CMakeLists.txt
+++ b/sdk-blink/CMakeLists.txt
@@ -1,25 +1,38 @@
+##
+## spreadspace rppico utils
+##
+##
+## Copyright (C) 2022 Christian Pointner <equinox@spreadspace.org>
+##
+## This file is part of spreadspace rppico utils.
+##
+## spreadspace rppico utils is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## any later version.
+##
+## spreadspace rppico utils is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with spreadspace rppico utils. If not, see <http://www.gnu.org/licenses/>.
+##
+
cmake_minimum_required(VERSION 3.12)
include(../sdk.cmake)
project(blink C CXX ASM)
-set(CMAKE_C_STANDARD 11)
-set(CMAKE_CXX_STANDARD 17)
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_compile_options(-Wall)
add_executable(blink
blink.c
)
-# pull in common dependencies
target_link_libraries(blink pico_stdlib)
-
-# create map/bin/hex file etc.
pico_add_extra_outputs(blink)
diff --git a/sdk-blink/Makefile b/sdk-blink/Makefile
index ca7776e..110de49 100644
--- a/sdk-blink/Makefile
+++ b/sdk-blink/Makefile
@@ -21,22 +21,10 @@
##
PROJECT := blink
-include ../defines.mk
-
-all: build
-.PHONY: build clean distclean
-
-build/Makefile:
- mkdir -p build
- cd build; cmake ..
-
-build: build/Makefile
- make -C build
+PICO_PLATFORM := rp2040
+PICO_BOARD := pico
+CMAKE_BUILD_TYPE := Release
-clean:
- make -C build clean
-
-distclean:
- rm -rf build
-
-include ../rules.mk
+include ../defines.mk
+include ../sdk.mk
+include ../debug.mk
diff --git a/sdk.mk b/sdk.mk
new file mode 100644
index 0000000..9d2bb98
--- /dev/null
+++ b/sdk.mk
@@ -0,0 +1,37 @@
+##
+## spreadspace rppico utils
+##
+##
+## Copyright (C) 2022 Christian Pointner <equinox@spreadspace.org>
+##
+## This file is part of spreadspace rppico utils.
+##
+## spreadspace rppico utils is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## any later version.
+##
+## spreadspace rppico utils is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with spreadspace rppico utils. If not, see <http://www.gnu.org/licenses/>.
+##
+
+all: build
+.PHONY: build clean distclean
+
+build/Makefile:
+ mkdir -p build
+ cd build; cmake -D PICO_PLATFORM=${PICO_PLATFORM} -D PICO_BOARD=${PICO_BOARD} -D PICO_COMPILER=pico_arm_gcc -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ..
+
+build: build/Makefile
+ make -C build
+
+clean:
+ make -C build clean
+
+distclean:
+ rm -rf build