osx-cross / homebrew-arm

Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4/M7, Cortex-R4/R5/R7).
BSD 2-Clause "Simplified" License
152 stars 21 forks source link

Adding xPack arm-gcc toolchain for Python 3 support in GDB #45

Open salkinium opened 1 year ago

salkinium commented 1 year ago

The official arm-none-eabi-gdb-py only supports Python 2.7 and only up to GCC10. GCC11 and GCC12 has completely removed Python 2.7 support (since it's EOL) but didn't add Python 3 support, which sucks a little much.

So… I've looked around, and the xPack GNU Arm Embedded GCC seems to be the best alternative: it uses the official source tarball and adds Python 3 support, and builds both x64 and ARM64.

Would you be interested in adding and maintaining a arm-gcc-xpack formula for this?

You can try our simple formula here:

brew install modm-ext/modm/arm-gcc-xpack@12
salkinium commented 1 year ago

Hm, the package seems to install an out-of-date SSL certificate into the Python3.11 installation, very weird:

 $ python3 -c 'import ssl; print(ssl.get_default_verify_paths().openssl_cafile)'
/Users/ilg/actions-runners/xpack-dev-tools/_work/arm-none-eabi-gcc-xpack/arm-none-eabi-gcc-xpack/build/darwin-arm64/aarch64-apple-darwin20.6.0/install/openssl/cert.pem

 $ brew uninstall arm-gcc-xpack@12
Uninstalling /opt/homebrew/Cellar/arm-gcc-xpack@12/12.2.Rel1... (6,499 files, 815.6MB)

 $ python3 -c 'import ssl; print(ssl.get_default_verify_paths().openssl_cafile)'
/opt/homebrew/etc/openssl@1.1/cert.pem
ladislas commented 1 year ago

I've been looking into xpack myself but never got the time to try it.

I'm happy to review a PR! :)