Skip to content

Commit e69c406

Browse files
committed
add a post-build command to patch board config into .bin/.uf2
this starts the replacement of BoardConfig.h + migration code with shipped protobuf configs. this should help cleanup some code, and one day will hopefully replace the need for per-board builds entirely, greatly speeding up the GitHub build/creation of board binaries
1 parent 9e9838e commit e69c406

File tree

33 files changed

+123
-0
lines changed

33 files changed

+123
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ add_compile_options(-Wall
116116
include(compile_proto.cmake)
117117
compile_proto()
118118

119+
include(patch_board_config.cmake)
120+
patch_board_config()
121+
119122
#pull in tinyUSB
120123
set(PICO_TINYUSB_PATH "${CMAKE_CURRENT_LIST_DIR}/lib/tinyusb")
121124

compile_proto.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ function (compile_proto)
1313
DEPENDS ${CMAKE_SOURCE_DIR}/lib/nanopb/extra/requirements.txt
1414
COMMAND ${Python3_EXECUTABLE} -m venv ${VENV}
1515
COMMAND ${VENV_BIN_DIR}/pip --disable-pip-version-check install -r ${CMAKE_SOURCE_DIR}/lib/nanopb/extra/requirements.txt
16+
COMMAND ${VENV_BIN_DIR}/pip --disable-pip-version-check install gp2040ce-binary-tools
1617
COMMAND ${VENV_BIN_DIR}/pip freeze > ${VENV_FILE}
1718
OUTPUT ${VENV_FILE}
1819
COMMENT "Setting up Python Virtual Environment"

configs/BentoBox/board-config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"boardVersion": "v0.7.8"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"boardVersion": "v0.7.8"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"boardVersion": "v0.7.8"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"boardVersion": "v0.7.8"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"boardVersion": "v0.7.8"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"boardVersion": "v0.7.8"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"boardVersion": "v0.7.8"
3+
}

configs/Granola/board-config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"boardVersion": "v0.7.8"
3+
}

0 commit comments

Comments
 (0)