Using machine learning to estimate the state of charge of lithium ion batteries for electric vehicles
Code is for the STM32 F334 module.
Programming has only been tested in Mac OSX. It will mostly likely work on Linux with no problems (yay for Unix based OS) but sorry Windows people, you're on your own.
-
Generate the make file using the STM32 Cube generator for the STM32 F334 chip
-
Install gcc-arm-embedded library
brew install Caskroom/cask/gcc-arm-embedded
-
Edit the Makefile generated to ensure
BINPATH
points to the location ofgcc-arm-embedded
-
Compile the files with
make
- Install
st-link
brew install stlink
- Add a flash command to Makefile that programs STM32
flash: $(BUILD_DIR)/$(TARGET).bin
st-flash --reset write $< 0x8000000
- Program the STM32 with
make flash
If all goes well then everything is set up correctly!
- First clean up any old build files with
make clean
- Then run the build
make
- Then you can program the chip using
make flash
Then all should work, yay!