Skip to content

Commit d72d1f7

Browse files
committed
add uf2 flash op
Signed-off-by: IotaHydrae <writeforever@foxmail.com>
1 parent 54de08c commit d72d1f7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

software/epink-lvgl/scripts/build.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ echo "working dir is ${WORKDIR}"
77
BUILDDIR=${WORKDIR}/dir_build
88

99
BIN="xenia_clock.elf"
10+
UF2="xenia_clock.uf2"
1011

1112
function do_banner() {
1213
cat << "EOF" >> /dev/tty
@@ -74,7 +75,12 @@ function do_install() {
7475

7576
function do_flash() {
7677
echo_debug "do flashning ..."
77-
${WORKDIR}/../tools/dapp ./${BIN}
78+
time ${WORKDIR}/../tools/dapp ${WORKDIR}/${BIN}
79+
}
80+
81+
function do_flash_uf2() {
82+
echo_debug "do uf2 flashning ..."
83+
sudo cp ${BUILDDIR}/${UF2} /media/$USER/RPI-RP2/
7884
}
7985

8086
function do_clean() {
@@ -100,6 +106,13 @@ case $1 in
100106
exit 0
101107
;;
102108

109+
"-u")
110+
echo_debug "will do a uf2 flash job"
111+
do_banner
112+
do_flash_uf2
113+
exit 0
114+
;;
115+
103116
"-c")
104117
echo_debug "do a clean job"
105118
do_banner

0 commit comments

Comments
 (0)