2023-11-20 05:09 PM
Due to Company policy, one must use Windows. (board is seen by Windows)
Due to ARM, development is Linux based.
Therefore: WSL / WSL2
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
Workaround
2023-11-21 10:39 AM
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
2023-11-21 05:12 PM
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
2023-11-29 08:09 AM
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).