You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a hobbyist and learned about Hubris on Twitter. I wanted to give a brief report about my experience getting the demo app to run on an STM32F439ZI board on an M1 Mac running macOS 12.0.1.
Despite no official macOS support, the installation instructions in the readme worked fairly well for me (kudos!). (Worth noting that I had already installed Rust and all required tools because I have dabbled with embedded Rust and used other arm-none-eabi-gcc-based toolchains before.)
I used this arm-none-eabi-gcc variant because that's the one I have installed:
brew tap ArmMbed/homebrew-formulae
brew install arm-none-eabi-gcc
If you're on an M1/Apple Silicon Mac, it's worth noting that arm-none-eabi-gcc is not yet available natively AFAIK, but you can install the Intel/x86 version and run it through Rosetta. From an arm64 terminal, run this command to open an x86 shell in Rosetta:
arch -arch x86_64 zsh
In this shell, you can then install Homebrew for x86 (will install in a different directory than arm64-Homebrew) and then proceed to install arm-none-eabi-gcc. See e.g. this article for more on keeping two arm64 and x86 versions of Homebrew side by side.
When it came to building the demo app, I at first missed the note in the readme to clone all submodules. This cost me 30 minutes. Totally my fault, but maybe you can make this clearer by making this step a bullet point in the Prereqs or Build section instead of tacking it on at the bottom of the Build section. I read the readme from the top and didn't even consider reading further when the cargo xtask dist app/demo-stm32f4-discovery/app.toml command failed because of a missing file.
Building succeeds, but I'm seeing one warning when building hiffy. Is this a problem with my setup or to be expected?
warning: task-hiffy v0.1.0 (/Users/elo/hubris/task/hiffy) ignoring invalid dependency `drv-stm32fx-rcc` which is missing a lib target
Here's the full output of the build command
$ cargo xtask dist app/demo-stm32f4-discovery/app.toml
Finished dev [optimized + debuginfo] target(s) in 0.08s
Running `target/debug/xtask dist app/demo-stm32f4-discovery/app.toml`
flash = 8000000..8040000
ram = 20000000..2001c000
Used:
flash: 0x2e100
ram: 0x8000
building path app/demo-stm32f4-discovery/../../task/jefe
Finished release [optimized + debuginfo] target(s) in 0.07s
/Users/elo/hubris/target/thumbv7em-none-eabihf/release/task-jefe -> target/demo-stm32f4-discovery/dist/jefe
building path app/demo-stm32f4-discovery/../../drv/stm32fx-rcc
Finished release [optimized + debuginfo] target(s) in 0.06s
/Users/elo/hubris/target/thumbv7em-none-eabihf/release/drv-stm32fx-rcc -> target/demo-stm32f4-discovery/dist/rcc_driver
building path app/demo-stm32f4-discovery/../../drv/stm32fx-usart
Finished release [optimized + debuginfo] target(s) in 0.06s
/Users/elo/hubris/target/thumbv7em-none-eabihf/release/drv-stm32fx-usart -> target/demo-stm32f4-discovery/dist/usart_driver
building path app/demo-stm32f4-discovery/../../drv/user-leds
Finished release [optimized + debuginfo] target(s) in 0.07s
/Users/elo/hubris/target/thumbv7em-none-eabihf/release/drv-user-leds -> target/demo-stm32f4-discovery/dist/user_leds
building path app/demo-stm32f4-discovery/../../task/ping
Finished release [optimized + debuginfo] target(s) in 0.06s
/Users/elo/hubris/target/thumbv7em-none-eabihf/release/task-ping -> target/demo-stm32f4-discovery/dist/ping
building path app/demo-stm32f4-discovery/../../task/pong
Finished release [optimized + debuginfo] target(s) in 0.06s
/Users/elo/hubris/target/thumbv7em-none-eabihf/release/task-pong -> target/demo-stm32f4-discovery/dist/pong
building path app/demo-stm32f4-discovery/../../task/hiffy
warning: task-hiffy v0.1.0 (/Users/elo/hubris/task/hiffy) ignoring invalid dependency `drv-stm32fx-rcc` which is missing a lib target
Finished release [optimized + debuginfo] target(s) in 0.07s
/Users/elo/hubris/target/thumbv7em-none-eabihf/release/task-hiffy -> target/demo-stm32f4-discovery/dist/hiffy
building path app/demo-stm32f4-discovery/../../task/idle
Finished release [optimized + debuginfo] target(s) in 0.06s
/Users/elo/hubris/target/thumbv7em-none-eabihf/release/task-idle -> target/demo-stm32f4-discovery/dist/idle
building path app/demo-stm32f4-discovery/.
Finished release [optimized + debuginfo] target(s) in 0.07s
/Users/elo/hubris/target/thumbv7em-none-eabihf/release/demo-stm32f4-discovery -> target/demo-stm32f4-discovery/dist/kernel
Next step, running the demo app on the board. This command from the Run section in the readme didn't work for me:
Because it didn't find openocd.gdb (I ran this from the repository root because that's what the path to app.toml indicates). I had to specify the path to openocd.gdb:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm a hobbyist and learned about Hubris on Twitter. I wanted to give a brief report about my experience getting the demo app to run on an STM32F439ZI board on an M1 Mac running macOS 12.0.1.
Despite no official macOS support, the installation instructions in the readme worked fairly well for me (kudos!). (Worth noting that I had already installed Rust and all required tools because I have dabbled with embedded Rust and used other arm-none-eabi-gcc-based toolchains before.)
I used this arm-none-eabi-gcc variant because that's the one I have installed:
If you're on an M1/Apple Silicon Mac, it's worth noting that arm-none-eabi-gcc is not yet available natively AFAIK, but you can install the Intel/x86 version and run it through Rosetta. From an arm64 terminal, run this command to open an x86 shell in Rosetta:
In this shell, you can then install Homebrew for x86 (will install in a different directory than arm64-Homebrew) and then proceed to install arm-none-eabi-gcc. See e.g. this article for more on keeping two arm64 and x86 versions of Homebrew side by side.
When it came to building the demo app, I at first missed the note in the readme to clone all submodules. This cost me 30 minutes. Totally my fault, but maybe you can make this clearer by making this step a bullet point in the Prereqs or Build section instead of tacking it on at the bottom of the Build section. I read the readme from the top and didn't even consider reading further when the
cargo xtask dist app/demo-stm32f4-discovery/app.toml
command failed because of a missing file.Building succeeds, but I'm seeing one warning when building hiffy. Is this a problem with my setup or to be expected?
warning: task-hiffy v0.1.0 (/Users/elo/hubris/task/hiffy) ignoring invalid dependency `drv-stm32fx-rcc` which is missing a lib target
Here's the full output of the build command
Next step, running the demo app on the board. This command from the Run section in the readme didn't work for me:
Because it didn't find
openocd.gdb
(I ran this from the repository root because that's what the path toapp.toml
indicates). I had to specify the path toopenocd.gdb
:Beta Was this translation helpful? Give feedback.
All reactions