2008-06-24 04:14 AM
Flash Loader Demonstrator v1.1 Alpha Posted for testing
2011-05-17 03:30 AM
Dear STOne-32,
I have tried new v1.1 fld on my board (EM7240), but there are same flash erase fails problems. In attachment new data serial capture file with this fld sw. Rx serial comparison data are differents respect old v1.0 fld sw version. Test v1.1 fld on our eval kit, it is all ok.Flash erase works fine. Now i think that bootloader inside to revision chip on my prototype board is different to eval kit revision chip bootloader. Ten sample boards with same prototype board revision chip, have same flash erase fails problems. Another solution could be replace the chips on my ten board with lastest revision chip or new fld version. The chip on eval kit is marked: STM32F103VBT6 B 2205V VC MLT 22 736 The chip on my board is marked: STM32F103VBT6 Z 220AV 93 MLT 22 746 Best Regards Stefano from Italy2011-05-17 03:30 AM
Dear all, Stefano,
Following your requests posts here, I have a confirmation from my colleagues at ST that the next official version will include a command line version and here a attached for your testing in advance, could you please use it instead of the GUI and tell me if it resolves your issues. Cheers, STOne-32. STMicroelectronics Flash Loader command line v1.0 Usage : STMFlashLoader.exe [options] [Agrument] -? help -c connect --pn port number (e.g 1, 2 ..., default 1) --br baud reate (e.g 115200, 128000 ..., default 115200) --db data bits (in {5,6,7,8} ..., default 8) --pr parity (in {NONE,ODD,EVEN} ..., default EVEN) --sb stop bits (in {1,1.5,2} ..., default 1) --to time out (ms) (e.g 1000, 2000, 3000 ..., default 5) --lcs last COM settings -i device name -e erase --all all sectors --sec sector codes (e.g 1,2,3,...) -u upload --fn file name (full path name) -d download --a address (ignored if the target file is not a binary file) --fn file name (full path name) --v verify after download --o optimize -v verify --fn file name (full path name) -p protect/unprotect --erp enable read protection --drp disable read protection --ewp enable write protection for sector codes (e.g 1,2,3,...) --dwp disable write protection -r run at address -force disable protections if needed -------- Here an example on my board and running on my Virtual Com Port (Port5) : C:\Bootloader>STMFlashLoader_CMD_LINE.exe -c --pn 5 --br 57600 --db 8 --pr EVEN --sb 1 --to 5000 -i STM32F10xxBxx -e --all -d --fn demo.s19 --v Connecting [OK] Configuring [OK] erasing all pages [OK] downloading page 0 @0x 8000000 size 1.00(Kb) [OK] downloading page 1 @0x 8000400 size 1.00(Kb) [OK] downloading page 2 @0x 8000800 size 1.00(Kb) [OK] downloading page 3 @0x 8000C00 size 1.00(Kb) [OK] downloading page 4 @0x 8001000 size 1.00(Kb) [OK] downloading page 5 @0x 8001400 size 1.00(Kb) [OK] downloading page 6 @0x 8001800 size 1.00(Kb) [OK] downloading page 7 @0x 8001C00 size 1.00(Kb) [OK] downloading page 8 @0x 8002000 size 1.00(Kb) [OK] downloading page 9 @0x 8002400 size 0.90(Kb) [OK] verifying page 0 @0x 8000000 size 1.00(Kb) [OK] verifying page 1 @0x 8000400 size 1.00(Kb) [OK] verifying page 2 @0x 8000800 size 1.00(Kb) [OK] verifying page 3 @0x 8000C00 size 1.00(Kb) [OK] verifying page 4 @0x 8001000 size 1.00(Kb) [OK] verifying page 5 @0x 8001400 size 1.00(Kb) [OK] verifying page 6 @0x 8001800 size 1.00(Kb) [OK] verifying page 7 @0x 8001C00 size 1.00(Kb) [OK] verifying page 8 @0x 8002000 size 1.00(Kb) [OK] verifying page 9 @0x 8002400 size 0.90(Kb) [OK] C:\Bootloader> [ This message was edited by: STOne-32 on 30-04-2008 21:01 ]2011-05-17 03:30 AM
Hi ST1,
Thank you. This is exactey what we are searching for.. and we can have automatic scripts for mass programming whithout manual clicks. I have few comments : 1) I tried 128000 bauds and it is not working on my board,However 57600 is always working smoothly. May be you can change it to default. 2) Why we have to configure the parity bits.. Looking to AN2606 it is always fixed. 3) I believe, that the File configuration is missing like using ''-i'' for hex intel format or ''-m'' for motorola format in addition to binary files. 4)Is it possible to program Options bytes too like the User bytes ? using a file as well. Hope my suggestions will be taken into account. if it makes sense for most of users ? Magigimix. ;)2011-05-17 03:30 AM
Dear STOne-32,
Thank you very much for your collaboration. Now using STM32 flash loader command line sw version, is all OK. My prototype board works fine!! Good work! Best Regards. Stefano2011-05-17 03:30 AM
STOne-32,
I've been using the STM32 Command Line Loader, and it seems all is OK. My board has been having no problems with all the normal functions, erase/prog/verify ect! Thankyou very much for your help, hope to see a new GUI soon! Kind Regards Tom2011-05-17 03:30 AM
ST,
The command line loader always completes with an exit code of 0 (success) even when an error has occurred. The command line loader should set the exit code when there was a problem. This is standard procedure for command line application as it allows the batch file (or script) that is using the exe to know if the operation was successful or not. This is quite easy to do and is vital in a production programming environment. The following is an extract from a batch file I use. ------------------------------------------------------- STMFlashLoader.exe -c --pn %COMPORT% -i STM32F10xxBxx -e --all -d --a 8000000 --v --fn %1 if errorlevel 1 goto error_end color 2F echo **** Finished Successfully **** goto the_end :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :error_end echo errorlevel = [%errorlevel%] echo !!! ERROR !!! color CF :the_end echo any key to end pause > nul ------------------------------------------------------- I hope you can change this soon as mass programming without this feature is difficult. Regards Trevor2011-05-17 03:30 AM
Now that the source code for the command line flash loader is available I can fix this myself. Thank you ST for taking the practical decision to release the source.
The fix is so simple. In the main function return 0 for success and return 1 for everything else. If anyone wants an exe with this fix applied let me know and I'll post it here. Trevor2011-05-17 03:30 AM
Two problems remain.
1) The convention is to return 0 for success and non-zero for failure. This is so that the non-zero number can relate to a specific error but returning 1 for all errors is OK here. The code is returning 1 for success and 0 for failure and so should be the other way round. 2) I'm pretty sure there is a bug at line 997 (STMFlashLoader.cpp) where an error message can be printed if the argument type is invalid but the code will then return success where it should return error. Regards Trevor2011-05-17 03:30 AM
Hi Trevor,
It should be fixed in the Published version on web :) Please re-check it again. you are welcome. STOne-32.