summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHombreLaser <buran@silosneeded.com>2024-06-09 18:15:54 -0600
committerHombreLaser <buran@silosneeded.com>2024-06-09 18:15:54 -0600
commitb6d596f22988f4e946c3941ae897caf28bbc121d (patch)
tree2933ac9c46b04e124036aa6a50e578d527fdca24
parent9c2645b0a3887358a8fc442ca7cd2d6a1f3d7f79 (diff)
Add project skeleton
-rw-r--r--CMakeLists.txt26
-rw-r--r--src/pico-calc.cpp6
2 files changed, 32 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..0734ba4
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,26 @@
+cmake_minimum_required(VERSION 3.12)
+include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
+set(CMAKE_CXX_FLAGS_DEBUG "-pipe -g -O0 -Wfatal-errors -Wpedantic -Wall -Wextra -Wconversion -Wshadow=local -Wdouble-promotion -Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral -Wformat-security -Wformat-truncation=2 -Wnull-dereference -Wimplicit-fallthrough=3 -Wshift-overflow=2 -Wswitch-default -Wunused-parameter -Wunused-const-variable=2 -Wstrict-overflow=4 -Wstringop-overflow=3 -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wmissing-noreturn -Wsuggest-attribute=malloc -Wsuggest-attribute=format -Wmissing-format-attribute -Wsuggest-attribute=cold -Walloc-zero -Walloca -Wattribute-alias=2 -Wduplicated-branches -Wcast-qual")
+set(CMAKE_C_FLAGS_DEBUG "-pipe -g -O0 -Wfatal-errors -Wpedantic -Wall -Wextra -Wconversion -Wshadow=local -Wdouble-promotion -Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral -Wformat-security -Wformat-truncation=2 -Wnull-dereference -Wimplicit-fallthrough=3 -Wshift-overflow=2 -Wswitch-default -Wunused-parameter -Wunused-const-variable=2 -Wstrict-overflow=4 -Wstringop-overflow=3 -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wmissing-noreturn -Wsuggest-attribute=malloc -Wsuggest-attribute=format -Wmissing-format-attribute -Wsuggest-attribute=cold -Walloc-zero -Walloca -Wattribute-alias=2 -Wduplicated-branches -Wcast-qual")
+
+project(pico-calc C CXX ASM)
+
+set(CMAKE_CXX_FLAGS_RELEASE "-pipe -Os -fno-builtin")
+set(CMAKE_C_FLAGS_RELEASE "-pipe -Os -fno-builtin")
+
+pico_sdk_init()
+
+# Dependencies
+add_library(lcd-i2c ./libs/Pico-I2C-LCD/LCD_I2C.cpp ./libs/Pico-I2C-LCD/LCD_I2C.hpp)
+add_library(keypad ./libs/pico-keypad/src/keypad.cpp ./libs/pico-keypad/src/keypad.hpp)
+
+add_executable(pico-calc ./src/pico-calc.cpp)
+
+target_include_directories(pico-calc PUBLIC ./libs)
+
+# Dependencies compilation
+target_link_libraries(keypad pico_stdlib hardware_gpio)
+target_link_libraries(lcd-i2c pico_stdlib hardware_i2c)
+
+# Link libraries
+target_link_libraries(pico-calc keypad lcd-i2c)
diff --git a/src/pico-calc.cpp b/src/pico-calc.cpp
new file mode 100644
index 0000000..14ab8b3
--- /dev/null
+++ b/src/pico-calc.cpp
@@ -0,0 +1,6 @@
+#include "pico-keypad/src/keypad.hpp"
+#include "Pico-I2C-LCD/LCD_I2C.hpp"
+
+int main() {
+ return 0;
+}