Page 1 of 1
stm32_sine compiling with MacOS
Posted: Thu Jun 29, 2023 4:11 am
by mane2
I just installed arm libraries using
Code: Select all
brew install gcc-arm-none-eabi gcc-arm-embedded
and executed
, then
All worked out, it compiled successfully and I have new stm32_sine.bin file to flash.
Change I did was to remove the error complaining about not flashing when opmode is running, due my wiring.
Now I’m wondering, do I dear to flash that firmware. Is there some differences between OSes that could cause flashing to fail or some other errors? (Instructions on web talk about Ubuntu.)
Re: stm32_sine compiling with MacOS
Posted: Fri Jun 30, 2023 7:47 am
by mane2
What if flashing fails, can I upload another binary file, or is the stm32 only recoverable with st-link or some other way that requires pulling the motor and card out?
Re: stm32_sine compiling with MacOS
Posted: Fri Jun 30, 2023 7:52 am
by Pete9008
Personally I'd change your wiring rather than bypass the protections - they are there for a reason! Unless you know what you are doing and are very careful there is potential to damage the inverter!
Re: stm32_sine compiling with MacOS
Posted: Fri Jun 30, 2023 7:57 am
by mane2
Ok. I actually already added a switch, to not send run-signal to PIN23 when I start the inverter for tweaking. Now I'm mostly curious what would happen if I would flash it and it would fail. Is it recoverable without removing motor and card?
Re: stm32_sine compiling with MacOS
Posted: Fri Jun 30, 2023 8:05 am
by Pete9008
As long as you don't remove the bootloader it should be possible to recover but not guaranteed. People have bought out the stlink connections too in the past, just in case!
When writing to flash the code execution actually stops for a while so having the inverter in run mode while doing it is a bad idea!
Re: stm32_sine compiling with MacOS
Posted: Fri Jun 30, 2023 8:08 am
by mane2
Ok, good to hear.
In my case, the wifi-signal is so bad that I need to be inside the trunk to do anything. So even though opmode=running, inverter does nothing

Re: stm32_sine compiling with MacOS
Posted: Sat Aug 19, 2023 8:57 am
by mane2
Forgot to update this topic. I made a small change to firmware and used web interface to upload it to SDU. After that, no parameters etc shown. So something went wrong. Need to pull it apart and flash with ST-link it seems. I did buy that stlink though before doing this. And did that software update to another motor that is not attached to actual car. But word of caution, there seems to be something different with builds made with Linux and Mac, causing mac-builds to be incompatible.