cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer (Win64) has problem to read .HEX file with multiple dot

Alamy
Associate II

Due to Company policy, one must use Windows. (board is seen by Windows)

Due to ARM, development is Linux based.

Therefore: WSL / WSL2

  • Please don't tell me to run Linux tools inside WSL2, many Linux GUI tools crash
  • Please don't tell me to export Win USB devices into WSL2, the driver doesn't support all protocols yet.

 

The developing environment are in WSL2. I have output files

\\wsl.localhost\Ubuntu\home\user\stm32h757i\build\
|-- cm4/      # cm4 files
`-- cm7/      # cm7 files

stm32h757i_eval.cm4.bin / stm32h757i_eval.cm7.bin <-- No problem to program those files

stm32h757i_eval.cm4.hex / stm32h757i_eval.cm7.hex <-- BAD00001 not aligned error

stm32h757i_eval_cm4.hex / stm32h757i_eval_cm7.hex <-- No problem to program those files.

Note

  • The contain in the .HEX file has no problem
  • It seems the STM32CubeProgrammer has problem to handle multiple dot '.' .hex file
  • Symbolic won't work (STM32CubeProgrammer won't recognize it)

Workaround

  • Copy stm32h757i_eval.cm4.hex to stm32h757i_eval_cm4.hex get it to work.

 

3 REPLIES 3
Alamy
Associate II

CLI (STM32_Programmer_CLI.exe) the same

flash.sh

export PROGRAMMER_CLI="/mnt/c/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI.exe"

PROGRAMMER_PARMS="-c port=SWD sn=002E00273132510838363431 freq=8000 mode=NORMAL reset=SWrst speed=Reliable"

"${PROGRAMMER_CLI}" ${PROGRAMMER_PARMS} -w "${FILE} -hardRst"

 

$ bash flash.sh prj.stm32h757i_eval.hex

-------------------------------------------------------------------
STM32CubeProgrammer v2.14.0
-------------------------------------------------------------------

ST-LINK SN : 002E00273132510838363431
ST-LINK FW : V3J12M3
Board : STLINK-V3MINIE
Voltage : 3.27V
SWD freq : 8000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x450
Revision ID : Rev V
Device name : STM32H7xx
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M7/M4
BL Version : 0x90

 

Memory Programming ...
Opening and parsing file: prj.stm32h757i_eval.hex
File : prj.stm32h757i_eval.hex
Size : 900.54 KB
Address : 0x00000000


Erasing memory corresponding to segment 0:
Download in Progress:
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

Error: failed to download Segment[0]
Error: failed to download the File

 

 

Would obviously be better fixed.

Perhaps the script could copy to a temp file, or you could write a small app to merge the .hex files, or use SRECORD

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

The problem is the filename.

I do have determined what kind of filename that STM32CubeProgrammer could accept and applied the workaround already.

FYI: I also found that it could only accept file in the current folder (without path).