Table of contents
- Flashing the firmware with STM32CubeProgrammer
- Install STM32CubeProgrammer on MacOS (by Andrew Davie)
For flashing of the firmware there is no ST-Link or other hardware necessary, only a micro USB cable and the STM32CubeProgrammer is required. Downloading the STM32CubeProgrammer is free of charge (which is quit clear, because you have bought 1 of their chips), but you may have to register at the STM website.
For connecting with the STM32CubePorgrammer the boot0 jumper has to be removed (and boot1 has to be short!), sometimes the reset button beside the USB connector has to be pressed for 5 seconds, to establish the connection.
After connecting the STM32F407VGT6 breakout board, you can flash with the STM32CubeProgrammer like this:
- Switch to the "Erasing & Programming" tab
- Scan the USB Ports for your device
- Connect your Device
- Select the downloaded PlusCart.elf file
- Push the "Start Programming" button
- After the "File download complete" message press the "Disconnect" button ( see 3. )
- Disconnect the USB cable and short boot0 again
- Install homebrew - this is a package management tool for MacOS
- Via homebrew, Install jenv - this allows you to manage multiple java versions on MacOS.
From the terminal (% prompt from now on - type what's after the %)...
% brew install jenv
- Install Oracle Java8
You will need to regiser with Oracle to be able to download
jdk-8u261-macosx-x64.dmg Once you install the DMG file via double-click, you need to "register" the Java version with jenv...
% jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_261.jdk/Contents/Home
Of course change that java version name if it's different from what's shown above.
Now, to see the versions of Java available through jenv...
% jenv versions * system oracle64-18.104.22.1681
The "*" indicates which version is currently active.
To switch globally to the oracle version (which you need to do)...
% jenv global oracle64-1.8.0261
... or whatever it's called in the versions list above
Check to see which version jenv has set for global use...
% jenv versions system * oracle64-22.214.171.1241 (set by /Users/boo/.jenv/version)
OK, so it's now using oracle java we downloaded. To test...
% java -version java version "1.8.0_261" Java(TM) SE Runtime Environment (build 1.8.0_261-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)
OK, once that's done, you can proceed with installation of the STM32CubeProgrammer
This is the correct way to do that....
Change to the directory wherever you extracted the zip file...
% cd ~/Downloads/en.stm32cubeprog_v2-5-0
Then issue the following command to start the installation...
% sudo java -jar SetupSTM32CubeProgrammer-2.5.0.exe
Of course, be sensible about version numbers - use the correct name for the file you downloaded.
This will now (after a short delay) start running the STM GUI installer
And it should all be hunky dory from then on.