Skip to content

Commit

Permalink
PR Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
eamars committed Feb 4, 2024
1 parent 89f2c10 commit 7d74cc0
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 20 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Auto Release Build

run-name: Build based on ${{ github.ref }} by @${{ github.actor }}


on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
PICO_BOARD: pico_w

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all branches and tags
submodules: recursive # Automatically pull all submodules

- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential libstdc++-arm-none-eabi-newlib python3
- name: Build Release Package
# Build your program with the given configuration

# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DPICO_BOARD=${{env.PICO_BOARD}}
cmake --build ${{github.workspace}}/build --config Release
- name: Archive Release Artifacts
uses: actions/upload-artifact@v3
with:
name: uf2-release
path: |
src/generated/version.c
build/*.uf2
- name: Build Debug Package
# Build your program with the given configuration

# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug -DPICO_BOARD=${{env.PICO_BOARD}}
cmake --build ${{github.workspace}}/build --config Debug
- name: Archive Debug Artifact
uses: actions/upload-artifact@v3
with:
name: uf2-debug
path: |
src/generated/version.c
build/*.bin
build/*.dis
build/*.elf
build/*.map
build/*.hex
build/*.uf2
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@
[submodule "library/Trinamic-library"]
path = library/Trinamic-library
url = https://github.com/terjeio/Trinamic-library.git
[submodule "pico-sdk"]
path = pico-sdk
url = https://github.com/raspberrypi/pico-sdk.git
3 changes: 0 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
"interface/cmsis-dap.cfg",
"target/rp2040.cfg"
],
"searchDir": [
"C:/VSARM/sdk/pico/openocd/tcl"
],
"svdFile": "${env:PICO_SDK_PATH}/src/rp2040/hardware_regs/rp2040.svd",
"runToEntryPoint": "main",
"openOCDLaunchCommands": [
Expand Down
9 changes: 3 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"visibility": "hidden"
},
"build": {
"visibility": "visible"
"visibility": "hidden"
},
"buildTarget": {
"visibility": "hidden"
Expand All @@ -21,16 +21,13 @@
"cmake.configureSettings": {
"CMAKE_MODULE_PATH": "${env:PICO_INSTALL_PATH}/pico-sdk-tools"
},
"cmake.generator": "MinGW Makefiles",
"cmake.generator": "Ninja",
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"files.associations": {
"neopixel_led.h": "c",
"app.h": "c",
"queue.h": "c",
"limits": "c",
"*.tcc": "c"
},
"cortex-debug.openocdPath": "C:/VSARM/sdk/pico/openocd/src/openocd.exe",
"cortex-debug.gdbPath": "arm-none-eabi-gdb",
"C_Cpp.errorSquiggles": "enabled"
}
}
8 changes: 1 addition & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
cmake_minimum_required(VERSION 3.25)

# Include build functions from external Pico SDK
#include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)

# Set project data
set(PROJECT_NAME "OpenTricklerController")
set(TARGET_NAME "app")

# Set PICO_BOARD variable
#set(PICO_BOARD "pico_w")

message("CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}")

# Set env variable 'PICO_SDK_PATH' to the local Pico SDK
Expand Down Expand Up @@ -126,4 +120,4 @@ target_link_options("${TARGET_NAME}" PUBLIC -Wl,--gc-sections -Wl,--print-memory
# set( CMAKE_VERBOSE_MAKEFILE on )

# Generate extra outputs
pico_add_extra_outputs("${TARGET_NAME}")
pico_add_extra_outputs("${TARGET_NAME}")
Empty file added build/.placeholder
Empty file.
2 changes: 1 addition & 1 deletion library/pico-sdk
Submodule pico-sdk updated 150 files

0 comments on commit 7d74cc0

Please sign in to comment.