Skip to content

Commit 2025447

Browse files
Update for SDK 2.1.1-develop, GCC 14.3, Newlib 4.5 (#68)
* Update for SDK 2.1.1-develop * Update GH CI to use Makefile tags for sources * MacOS again deprecated, move xcode version up * Mac X86 update for Makefile versions * Window CI use Makefile revs * Apply OpenOCD patches in CI * List applied patches in CI * GCC14.3 and Newlib 4.5 * Newlib 4.5 needs new compile option
1 parent 71f729a commit 2025447

File tree

5 files changed

+99
-15
lines changed

5 files changed

+99
-15
lines changed

.github/workflows/build-macos-arm.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,29 @@ jobs:
1212

1313
- uses: maxim-lobanov/setup-xcode@v1
1414
with:
15-
xcode-version: '14.3.1'
15+
xcode-version: '15.1.0'
1616

1717
- name: Build Picotool
1818
run: |
1919
uname -a
2020
brew update
2121
brew install bash libtool automake libusb hidapi cmake
2222
23+
sdktag=$(grep PICOSDK_BRANCH Makefile | head -1 | awk '{print $3}')
24+
picotooltag=$(grep PICOTOOL_BRANCH Makefile | head -1 | awk '{print $3}')
25+
echo SDK=$sdktag PICOTOOL=$picotooltag
26+
2327
# Get the SDK ready
2428
git clone https://github.com/raspberrypi/pico-sdk.git
2529
cd pico-sdk
26-
git checkout 2.0.0
30+
git checkout $sdktag
2731
git submodule update --init
2832
cd ..
2933
3034
# Check out this branch
3135
git clone https://github.com/raspberrypi/picotool.git
3236
cd picotool
33-
git checkout 2.0.0
37+
git checkout $picotooltag
3438
export gitrev=$(git rev-parse --short HEAD)
3539
export pioarch=darwin_arm64
3640
export piotup=aarch64-apple-darwin20.4
@@ -69,12 +73,21 @@ jobs:
6973
uname -a
7074
brew update
7175
brew install bash libtool automake libusb hidapi
76+
openocdtag=$(grep OPENOCD_BRANCH Makefile | head -1 | awk '{print $3}')
77+
echo OPENOCD=$openocdtag
7278
git clone https://github.com/raspberrypi/openocd.git
7379
pushd openocd
74-
git checkout sdk-2.0.0
80+
git checkout $openocdtag
7581
export gitrev=$(git rev-parse --short HEAD)
7682
export pioarch=darwin_arm64
7783
export piotup=aarch64-apple-darwin20.4
84+
85+
# Apply patches
86+
for p in ../patches/openocd-*.patch; do
87+
echo PATCH: Applying $p
88+
patch -s -p1 < $p
89+
done
90+
7891
# Remove TEXI warning
7992
grep -v raggedright doc/openocd.texi > p2
8093
mv p2 doc/openocd.texi

.github/workflows/build-macos.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,21 @@ jobs:
2020
brew update
2121
brew install bash libtool automake libusb hidapi cmake
2222
23+
sdktag=$(grep PICOSDK_BRANCH Makefile | head -1 | awk '{print $3}')
24+
picotooltag=$(grep PICOTOOL_BRANCH Makefile | head -1 | awk '{print $3}')
25+
echo SDK=$sdktag PICOTOOL=$picotooltag
26+
2327
# Get the SDK ready
2428
git clone https://github.com/raspberrypi/pico-sdk.git
2529
cd pico-sdk
26-
git checkout 2.0.0
30+
git checkout $sdktag
2731
git submodule update --init
2832
cd ..
2933
3034
# Check out this branch
3135
git clone https://github.com/raspberrypi/picotool.git
3236
cd picotool
33-
git checkout 2.0.0
37+
git checkout $picotooltag
3438
export gitrev=$(git rev-parse --short HEAD)
3539
export pioarch=darwin_x86_64
3640
export piotup=x86_64-apple-darwin20.4
@@ -70,12 +74,19 @@ jobs:
7074
uname -a
7175
brew update
7276
brew install bash libtool automake libusb hidapi
77+
openocdtag=$(grep OPENOCD_BRANCH Makefile | head -1 | awk '{print $3}')
78+
echo OPENOCD=$openocdtag
7379
git clone https://github.com/raspberrypi/openocd.git
7480
pushd openocd
75-
git checkout sdk-2.0.0
81+
git checkout $openocdtag
7682
export gitrev=$(git rev-parse --short HEAD)
7783
export pioarch=darwin_x86_64
7884
export piotup=x86_64-apple-darwin20.4
85+
# Apply patches
86+
for p in ../patches/openocd-*.patch; do
87+
echo PATCH: Applying $p
88+
patch -s -p1 < $p
89+
done
7990
# Remove TEXI warning
8091
grep -v raggedright doc/openocd.texi > p2
8192
mv p2 doc/openocd.texi

.github/workflows/build-windows.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@ jobs:
1414
- { sys: mingw64, env: x86_64 }
1515
- { sys: mingw32, env: i686 }
1616
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
submodules: false
1720
- uses: msys2/setup-msys2@v2
1821
with:
1922
msystem: ${{matrix.sys}}
2023
install: development mingw-w64-${{matrix.env}}-make mingw-w64-${{matrix.env}}-pkg-config mingw-w64-${{matrix.env}}-autotools texinfo mingw-w64-${{matrix.env}}-hidapi git mingw-w64-${{matrix.env}}-toolchain patch mingw-w64-${{matrix.env}}-cmake pkg-config zip
2124
- name: Build Picotool ${{matrix.env}}
2225
run: |
26+
sdktag=$(grep PICOSDK_BRANCH Makefile | head -1 | awk '{print $3}')
27+
picotooltag=$(grep PICOTOOL_BRANCH Makefile | head -1 | awk '{print $3}')
28+
echo SDK=$sdktag PICOTOOL=$picotooltag
29+
2330
# find D:/a/_temp/msys64/ -name libwinpthread* -print # D:/a/_temp/msys64/mingw32/bin/libwinpthread-1.dll D:/a/_temp/msys64/mingw32/lib/libwinpthread.a D:/a/_temp/msys64/mingw32/lib/libwinpthread.dll.a
2431
# find D:/a/_temp/msys64/ -name libhidapi* -print # D:/a/_temp/msys64/mingw32/lib/libhidapi.a D:/a/_temp/msys64/mingw32/lib/libhidapi.dll.a D:/a/_temp/msys64/mingw32/bin/libhidapi-0.dll
2532
pushd .
@@ -37,14 +44,14 @@ jobs:
3744
# Get the SDK ready
3845
git clone https://github.com/raspberrypi/pico-sdk.git
3946
cd pico-sdk
40-
git checkout 2.0.0
47+
git checkout $sdktag
4148
git submodule update --init
4249
cd ..
4350
4451
# Check out this branch
4552
git clone https://github.com/raspberrypi/picotool.git
4653
cd picotool
47-
git checkout 2.0.0
54+
git checkout $picotooltag
4855
export gitrev=$(git rev-parse --short HEAD)
4956
5057
# Make static-only binary
@@ -81,6 +88,8 @@ jobs:
8188

8289
- name: Build OpenOCD ${{matrix.env}}
8390
run: |
91+
openocdtag=$(grep OPENOCD_BRANCH Makefile | head -1 | awk '{print $3}')
92+
echo OPENOCD=$openocdtag
8493
# Set up LibUSB
8594
export LIBUSB_ROOT=$PWD/libusb
8695
export LIBUSB1_CFLAGS=-I$PWD/libusb/include
@@ -89,8 +98,16 @@ jobs:
8998
9099
git clone https://github.com/raspberrypi/openocd.git
91100
pushd openocd
92-
git checkout sdk-2.0.0
101+
git checkout $openocdtag
93102
export gitrev=$(git rev-parse --short HEAD)
103+
104+
# Apply patches
105+
for p in ../patches/openocd-*.patch; do
106+
echo PATCH: Applying $p
107+
patch -s -p1 < $p
108+
done
109+
110+
# Build!
94111
bash bootstrap
95112
./configure --prefix=/tmp/openocd --enable-picoprobe --enable-cmsis-dap-v2 --enable-cmsis-dap \
96113
--disable-dummy --disable-rshim --disable-ftdi --disable-stlink --disable-ti-icdi \

Makefile

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ PLATFORMIO := ~/.platformio/penv/bin/platformio
3636

3737
NEWLIB_DIR := newlib
3838
NEWLIB_REPO := git://sourceware.org/git/newlib-cygwin.git
39-
NEWLIB_BRANCH := newlib-4.3.0
39+
NEWLIB_BRANCH := newlib-4.5.0
4040

4141
# Depending on the GCC version get proper branch and support libs
4242
GNUHTTP := https://gcc.gnu.org/pub/gcc/infrastructure
@@ -149,6 +149,15 @@ else ifeq ($(GCC), 14.2)
149149
BINUTILS_BRANCH := binutils-2_43_1
150150
BINUTILS_REPO := https://sourceware.org/git/binutils-gdb.git
151151
BINUTILS_DIR := binutils-gdb-gnu
152+
else ifeq ($(GCC), 14.3)
153+
ISL := 0.18
154+
GCC_BRANCH := releases/gcc-14.3.0
155+
GCC_PKGREL := 140200
156+
GCC_REPO := https://gcc.gnu.org/git/gcc.git
157+
GCC_DIR := gcc-gnu
158+
BINUTILS_BRANCH := binutils-2_43_1
159+
BINUTILS_REPO := https://sourceware.org/git/binutils-gdb.git
160+
BINUTILS_DIR := binutils-gdb-gnu
152161
else
153162
$(error Need to specify a supported GCC version "GCC={9.3, 10.2, 10.3, 12.1}")
154163
endif
@@ -290,9 +299,11 @@ BLOBS = $(PWD)/blobs
290299
GMP_VER := 6.2.1
291300

292301
# RPI stuff
293-
PICOSDK_BRANCH := 2.0.0
302+
PICOSDK_BRANCH := develop # 2.1.1
294303
OPENOCD_BRANCH := sdk-2.0.0
295-
PICOTOOL_BRANCH := 2.0.0
304+
PICOTOOL_BRANCH := develop # 2.1.1
305+
MKLITTLEFS_BRANCH := 4.0.2
306+
LIBEXPAT_BRANCH := R_2_4_4
296307

297308
# GCC et. al configure options
298309
#configure = --prefix=$(call install,$(1))
@@ -327,6 +338,7 @@ CONFIGURENEWLIBCOM = --with-newlib
327338
CONFIGURENEWLIBCOM += --disable-newlib-io-c99-formats
328339
CONFIGURENEWLIBCOM += --disable-newlib-supplied-syscalls
329340
CONFIGURENEWLIBCOM += --enable-newlib-nano-formatted-io
341+
CONFIGURENEWLIBCOM += --disable-newlib-wide-orient
330342
CONFIGURENEWLIBCOM += --enable-newlib-reent-small
331343
CONFIGURENEWLIBCOM += --disable-target-optspace
332344
CONFIGURENEWLIBCOM += --disable-option-checking
@@ -519,10 +531,11 @@ clean: .cleaninst.LINUX.clean .cleaninst.LINUX32.clean .cleaninst.WIN32.clean .c
519531
(cd $(REPODIR)/$(GCC_DIR) && git reset --hard && git checkout $(GCC_BRANCH)) > $(call log,$@) 2>&1
520532
(cd $(REPODIR)/$(BINUTILS_DIR) && git reset --hard && git checkout $(BINUTILS_BRANCH)) >> $(call log,$@) 2>&1
521533
(cd $(REPODIR)/$(NEWLIB_DIR) && git reset --hard && git checkout $(NEWLIB_BRANCH)) >> $(call log,$@) 2>&1
534+
(cd $(REPODIR)/pico-sdk && git reset --hard && git checkout $(PICOSDK_BRANCH)) && git submodule update --init --recursive >> $(call log,$@) 2>&1
522535
(cd $(REPODIR)/openocd && git reset --hard && git checkout $(OPENOCD_BRANCH) && git submodule update --init --recursive) >> $(call log,$@) 2>&1
523536
(cd $(REPODIR)/picotool && git reset --hard && git checkout $(PICOTOOL_BRANCH) && git submodule update --init --recursive) >> $(call log,$@) 2>&1
524-
(cd $(REPODIR)/libexpat && git reset --hard && git checkout R_2_4_4 && git submodule update --init --recursive) >> $(call log,$@) 2>&1
525-
(cd $(REPODIR)/pico-sdk && git reset --hard && git checkout $(PICOSDK_BRANCH)) >> $(call log,$@) 2>&1
537+
(cd $(REPODIR)/libexpat && git reset --hard && git checkout $(LIBEXPAT_BRANCH) && git submodule update --init --recursive) >> $(call log,$@) 2>&1
538+
(cd $(REPODIR)/mklittlefs && git reset --hard && git checkout $(MKLITTLEFS_BRANCH) && git submodule update --init --recursive) >> $(call log,$@) 2>&1
526539
touch $@
527540

528541
# Apply our patches

patches/openocd-vectreset.patch

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 32f3168585c291273ab3cb27bb4805e95d8ea042 Mon Sep 17 00:00:00 2001
2+
From: "Earle F. Philhower, III" <earlephilhower@yahoo.com>
3+
Date: Thu, 6 Mar 2025 14:50:37 -0800
4+
Subject: [PATCH] Remove "VECTRESET is not supported" on RP2350
5+
6+
The "cortex_m reset_config sysresetreq" setting in the
7+
RP2350.tcl script doesn't seem to set the value for core1,
8+
leading to warning messages during successful runs:
9+
````
10+
Warn : [rp2350.dap.core1] VECTRESET is not supported on this Cortex-M core, using SYSRESETREQ instead.
11+
Warn : [rp2350.dap.core1] Set 'cortex_m reset_config sysresetreq'.
12+
````
13+
14+
Explicitly add the setting to the RP2350 config file to silence
15+
the warnings.
16+
17+
Fixes #120
18+
---
19+
tcl/target/rp2350.cfg | 1 +
20+
1 file changed, 1 insertion(+)
21+
22+
diff --git a/tcl/target/rp2350.cfg b/tcl/target/rp2350.cfg
23+
index 104e8ecc4..f5285d855 100644
24+
--- a/tcl/target/rp2350.cfg
25+
+++ b/tcl/target/rp2350.cfg
26+
@@ -77,3 +77,4 @@ if { $_BOTH_CORES } {
27+
28+
# srst does not exist; use SYSRESETREQ to perform a soft reset
29+
cortex_m reset_config sysresetreq
30+
+rp2350.dap.core1 cortex_m reset_config sysresetreq

0 commit comments

Comments
 (0)