Skip to content

Commit

Permalink
Fix Rp2040 cyw43 firmware build bug (#2854)
Browse files Browse the repository at this point in the history
Bad Rp2040 cyw43 firmware build bug, introduced in #2804.

Also ensure builds work with previous 10.3.1 toolchain.
  • Loading branch information
mikee47 committed Jul 5, 2024
1 parent a6fc94e commit 68ecf10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sming/Arch/Rp2040/Components/rp2040/firmware/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
set -e

write_chunk() {
sz=$(printf "%08x" $(wc -c "$1" | awk '{print $$1}'))
sz=$(printf "%08x" $(wc -c "$1" | awk '{print $1}'))
# Output 8-byte header containing chunk tag plus length in little-endian format
printf "CHNK\x${sz:6:2}\x${sz:4:2}\x${sz:2:2}\x${sz:0:2}" >> $2
# Append chunk data
Expand Down
5 changes: 4 additions & 1 deletion Sming/Arch/Rp2040/app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@

# linker flags used to generate the main object file
LDFLAGS += \
-Wl,--no-warn-rwx-segments \
-Wl,--build-id=none \
--specs=nosys.specs \
-mcpu=cortex-m0plus \
-mthumb

ifneq ($(COMPILER_VERSION_MAJOR),10)
LDFLAGS += -Wl,--no-warn-rwx-segments
endif

TARGET_DIS = $(TARGET_OUT:.out=.dis)
TARGET_SYM = $(TARGET_OUT:.out=.sym)

Expand Down

0 comments on commit 68ecf10

Please sign in to comment.