On 08/20/2013 05:05,
hac...@yahoo.com wrote:
> On Monday, August 19, 2013 3:31:22 PM UTC-4, Torfinn Ingolfsen wrote:
>> On 08/19/2013 03:41 PM,
hac...@yahoo.com wrote:
>
>> Does all STM32 boards have the ST-Link? I thought that ST-Link was a
>>
>> separate chip?
>
Ah, ok.
I'm trying to use stm32flash[1] on FreeBSD to load / boot the stm32
board via USART boot. FWIW, stm32flash works nicely on Linux.
It compiles (use gmake instead of make) with a few warnings, and the
resulting binary actually runs:
tingo@kg-core1$ ./stm32flash
stm32flash -
http://stm32flash.googlecode.com/
ERROR: Device not specified
Usage: ./stm32flash [-bvngfhc] [-[rw] filename] /dev/ttyS0
-b rate Baud rate (default 57600)
-r filename Read flash to file
-w filename Write flash to file
-u Disable the flash write-protection
-e n Only erase n pages before writing the flash
-v Verify writes
-n count Retry failed writes up to count times (default 10)
-g address Start execution at specified address (0 = flash start)
-f Force binary parser
-h Show this help
-c Resume the connection (don't send initial INIT)
*Baud rate must be kept the same as the first init*
This is useful if the reset fails
(output snipped in the interest of brevity)
But if I try to use it to read the board (which is attached as cuaU0 /
ttyU0):
tingo@kg-core1$ ll /dev/cuaU* /dev/ttyU*
crw-rw---- 1 uucp dialer - 0, 159 Aug 18 17:26 /dev/cuaU0
crw-rw---- 1 uucp dialer - 0, 160 Aug 18 17:26 /dev/cuaU0.init
crw-rw---- 1 uucp dialer - 0, 161 Aug 18 17:26 /dev/cuaU0.lock
crw------- 1 root wheel - 0, 156 Aug 18 17:26 /dev/ttyU0
crw------- 1 root wheel - 0, 157 Aug 18 17:26 /dev/ttyU0.init
crw------- 1 root wheel - 0, 158 Aug 18 17:26 /dev/ttyU0.lock
tingo@kg-core1$ su
Password:
root@kg-core1# ./stm32flash /dev/ttyU0
stm32flash -
http://stm32flash.googlecode.com/
/dev/ttyU0: No such file or directory
root@kg-core1# ./stm32flash /dev/cuaU0
stm32flash -
http://stm32flash.googlecode.com/
/dev/cuaU0: No such file or directory
I haven't figured out what the problem is. :-/
References:
1)
http://code.google.com/p/stm32flash/
--
Torfinn Ingolfsen,
Norway