diff --git a/Firmware/CHANGELOG.md b/Firmware/CHANGELOG.md index 1dacb0c1..9b9e3486 100644 --- a/Firmware/CHANGELOG.md +++ b/Firmware/CHANGELOG.md @@ -2,7 +2,12 @@ Please add a note of your changes below this heading if you make a Pull Request. ### Added + * `make write_otp` command to burn the board version onto the ODrive's one-time programmable memory. If you have an ODrive v3.4 or older, you should run this once for a better firmware update user experience in the future. Run the command without any options for more details. Once set, the board version is exposed through the `board_version_[...]` properties. + * bake Git-derived firmware version into firmware binary. The firmware version is exposed through the `fw_version_[...]` properties. + ### Changed + * The DFU script now verifies the flash after writing + ### Fixed # Releases diff --git a/Firmware/Makefile b/Firmware/Makefile index dcfd74ae..f4b505dc 100644 --- a/Firmware/Makefile +++ b/Firmware/Makefile @@ -28,7 +28,8 @@ bmp: all erase_config: openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg -c init -c reset\ halt -c flash\ erase_address\ 0x80C0000\ 0x40000 -c reset\ run -c exit -# OTP format: +# The one-time programmable memory stores the board version +# has the following format: # - OTP format version (0xFE: version 1) # - vendor ID (01: ODrive Robotics - do not use this on custom incompatible hardware!) # - product ID (01: ODrive) @@ -36,7 +37,8 @@ erase_config: # - hardware minor version # - hardware variant (00: 24V, 01: 48V) # Bits in the OTP can only ever be set to 0 but never back to 1. -# Therefore do not try to run this on the same board twice with different data. +# Therefore do not try to run this command on the same board +# twice with different data. # # This OpenOCD command is intended for a STM32F405 and does the following: # FLASH_KEYR = 0x45670123; // unlock FLASH_CR @@ -65,7 +67,8 @@ else @echo "The one-time programmable memory can only be" @echo "written ONCE on every board (what a surprise)." @echo "If you're on an ODrive v3.5 or later we already did this for you." - @echo "Otherwise, if you're mentally ready for this, do the following steps:" + @echo "Otherwise, if you're mentally ready for this irreversible action," + @echo "take the following steps:" @echo " 1. open the Makefile and look at the write_otp target" @echo " 2. understand the structure of the OTP" @echo " 3. edit the bytes that are written to match your board version"