summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorRiku Viitanen <riku.viitanen@protonmail.com>2023-09-11 01:01:27 +0300
committerRiku Viitanen <riku.viitanen@protonmail.com>2023-09-11 01:01:32 +0300
commit7dc8632514aa13ba0c704dbe6cf7aeb38071d808 (patch)
tree5f4175eee70856ce5c231d87c294e3c64ff0a719 /script
parent34d3629ebf68595710015b52fbcd16a66b91df8c (diff)
clean up pico-serprog for release
moved cmake files into a separate build directory. this can just be deleted for the source release. might as well use cmake for the actual build too. that makes repeated builds faster for some reason. Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
Diffstat (limited to 'script')
-rwxr-xr-xscript/build/release/src2
-rwxr-xr-xscript/build/serprog/rp204012
2 files changed, 8 insertions, 6 deletions
diff --git a/script/build/release/src b/script/build/release/src
index 8d36e5fb..27a93729 100755
--- a/script/build/release/src
+++ b/script/build/release/src
@@ -169,6 +169,8 @@ purge_files()
err "purge_files rm-rf2: can't purge .git files/directories"
rm -Rf cbutils || err "purge_files: can't remove ${srcdir}/cbutils/"
rm -Rf elf || err "purge_files: can't remove ${srcdir}/elf/"
+ rm -Rf util-fw/rp2040/pico-serprog/build
+ || err "purge_files: can't remove pico-serprog/build"
)
}
diff --git a/script/build/serprog/rp2040 b/script/build/serprog/rp2040
index e265cc7a..3b4fbf14 100755
--- a/script/build/serprog/rp2040
+++ b/script/build/serprog/rp2040
@@ -51,14 +51,14 @@ main()
buildrom()
{
board=${1}
- (cd ${src_dir}; cmake -DPICO_BOARD="${board}" \
- -DPICO_SDK_PATH="${sdk_dir}" "${src_dir}" || \
- err "can't cmake ${src_dir}")
- make -C ${src_dir} clean
- make -C ${src_dir}
- mv ${src_dir}/pico_serprog.uf2 \
+ cmake -DPICO_BOARD="${board}" -DPICO_SDK_PATH="${sdk_dir}" \
+ -B "${src_dir}/build" "${src_dir}" \
+ || err "can't cmake ${src_dir}"
+ cmake --build "${src_dir}/build"
+ mv ${src_dir}/build/pico_serprog.uf2 \
${serprog_release_dir}/serprog_${board}.uf2 \
|| err "${board} serprog build failed!"
+ printf "output to ${serprog_release_dir}/serprog_${board}.uf2\n"
}
main $@