Set the project as the active project in Eclipse. The steps in this section only need to be done once. Eclipse will automatically find the Boot and Prog projects and select them:Ĭlick the Finish button to complete the project import operation.īefore the bootloader can be used, it needs to be built and programmed into the STM32F103RB's internal flash memory. \Target\Demo\ARMCM3_STM32F1_Olimexino_STM32_TrueStudio\. On the next screen you select the following directory as the root directory. Then select General → Existing Projects into Workspace. To import the demo programs into the workspace, select File → Import from the program menu. It is easiest to create a new one in the following directory. After starting TrueStudio, you are prompted to open a workspace. The first step in getting the the bootloader up-and-running, is the creation of the Eclipse workspace in TrueStudio.
ATOLLIC TRUESTUDIO PROGRAMMING UPDATE
This user program is configured such that it can be programmed, into the internal flash memory of the microcontroller, during a firmware update with the bootloader. One for the bootloader itself and one for the demo user program.
Well, once we figure out the finer details of the previous section, it’s straightforward to build this into a tool, script, or even a Makefile.Two demo projects are included in the OpenBLT bootloader package. dfu file along with a significantly simpler command line. This is nicer because a) you don’t get the deprecation warnings, b) you can distribute the. dfu extension if you like as it’s now a legit. Use the dfu-prefix and dfu-suffix tools (including with dfu-util) to append dfu prefixes and suffixes to your. Same as steps 1-2 in the previous section.ģ. Please let me know if this does or doesn’t work in the comments below, it would be fantastic if you could include example command lines.ġ-2. I’m 99% sure the following will work, I just haven’t got around to trying it out yet. You might need to prepend “sudo” if you have permissions or “DFU device not found” errors. This will give errors about this approach being deprecated, but don’t worry, it will work for now. With that out of the way $ dfu-util -a 0 -dfuse-address=0x 08000000 -D yourproject.bin Program the MCU! I’m going to assume the MCU is prepped and ready to accept a DFU transfer (typically, this involves pulling the BOOT0 pin high and resetting the MCU). bin file doesn’t contain the offset - which is why we had to pull this information out in step 1.ģ.
bin file now contains the raw firmware, exactly as it needs to be written to the MCU.
Extract the binary content of the HEX file: $ objcopy -Iihex -Obinary yourproject.hex yourproject.bin FYI, this corresponds to the base address of FLASH as described in the MCU’s datasheet.Ģ. hex file using objdump: $ objdump -h yourproject.hexĠ. Find the base address for the DFU transfer.
ATOLLIC TRUESTUDIO PROGRAMMING MANUAL
The (relatively straightfoward) manual wayġ. dfu file in order to program your microcontroller using dfu-util? And can’t (or don’t want to) use the Windows-only DfuSe software? I hope this guide helps you out! So you have an Intel HEX (.hex) file from your microcontroller firmware (from Atollic TrueSTUDIO for a STM32 micro, for example), but you need a.