it looks like he's working with a Maple board, using Arduino IDE or something like that? And you suppose the tools might be similar enough to ST-Link stuff that there's a procedure that might work? I don't need a DFU, that appears to be a USB bootloader thing. Thanks, that was quite an effort! I don't see where he's doing anything that applies here though. ass ) extension (substation subs) Did that in 10 minutes do not expect perfection The hack presented may worth the time wasted learning it Paul Save the script as the same name of the video with (. How to build simple BATchfiles for programming an STM32F4 (connect under reset, 4MHz clock): rem name the burntool set burntool="C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" rem complete memory dump 1MB rem V2: stlutil\ST-LINK_CLI.exe -c JTAG UR -Dump 0x08000000 0x100000 dump.hex %burntool% -c port=SWD freq=4000 INDEX=0 mode=UR -r 0x08000000 0x100000 firmware\firmware_dump.hex rem do a mass erase and burn the firmware.hex, end with hard reset rem V2: stlutil\ST-LINK_CLI.exe -c JTAG UR -ME -P firmware\firmware.hex -V -HardRst %burntool% -c port=SWD freq=4000 INDEX=0 mode=UR -e all -w firmware\firmware.hex -v -hardRst rem do a selective erase of sectors 0.7 and burn the firmware.hex, end with hard reset rem V2: stlutil\ST-LINK_CLI.exe -c JTAG UR -SE 0 7 -P firmware\CubeMain.hex -V -HardRst %burntool% -c port=SWD freq=4000 INDEX=0 mode=UR -e 0 7 -w firmware\CubeMain.Code:  Title: MapleMiniHack ScriptType: v4.00+ WrapStyle: 0 ScaledBorderAndShadow: yes YCbCr Matrix: TV.601 PlayResX: 1280 PlayResY: 720 Format: Name, Fontname, Fontsize, Primar圜olour, Secondar圜olour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding Style: Default,Arial,20,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,2,2,10,10,10,1 Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:07:07.38,0:07:10.02,Default,0,0,0,After finishing this procedure we must press RESET and the COM port should appear as usual. The STM32_Programmer_CLI.exe won't even run without the QT5-DLLs and heaps of other stuff. Just install en.stm32cubeprg-win32_v2-7-0.zip, which includes all drivers and libraries. There is not much chance for a small, compact programming package. Behold the subtle changes in the commands since ST-Link CLI v3.6.0.0. Here are some differences between the V2 ST-LINK_CLI.exe and the new STM32_Programmer_CLI.exe. Their favorite hobby is rewriting interfaces for tools and libraries. You can get the same speedup with st-link v2 by simply writing a better flash loader. However none of this has anything to do with the st-link v3. Interrupts can preempt program execution so it is considered a different "thread". My bootloader uses a FIFO, and performs erase-program of pages on the main thread* while accepting of new data happens in an interrupt handler, so the two can happen almost simultaneously. The slowest part of flashing is erasing, so it's important that you can erase and accept new data at the same time. The inefficiency comes from the order that things are done, which is first ALL pages are erased and then all pages are programmed, as well as the fact that the mini-program ("flash loader") is written in assembly and extremely primitive so can not accept data while flashing is happening (there is just a single buffer that is written to and read from). The way st-link flashing works is first a mini-program is loaded into RAM and ran on the MCU, and this program performs the flashing while st-link transfers data one page at a time. I have a custom bootloader for the F303 that takes 4 seconds to flash the same binary that takes st-link 12 seconds. The st-link does flashing in an inefficient way and it's not hard to beat it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |