folg / stm32flash

Automatically exported from code.google.com/p/stm32flash
0 stars 0 forks source link

[patch]MinGW compile #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

and thanks for stm32flash. A small patch is needed for compiling stm32flash 
with MinGW (Windows 7)

The resulting .exe is able to read and write a controller:) :)
There are a few minor glitches though:

a) specifying a non-existant (or in-use) com port does not give an error (see 
"ad a)" below).
b) trying to read from a device if it is not in bootloader mode sometimes 
causes an assert (see "ad b)" below).
c) the control sequences for the progress indicator don't match (seems CR is 
not seen).

Greetings,
Frieder

---8<----------------------------------------------
ad a)
c:\tmp\stm32flash>stm32flash.exe -r testfile COM22:
stm32flash - http://stm32flash.googlecode.com/

COM22:: No error

ad b)
c:\tmp\stm32flash>stm32flash.exe -r testfile COM4:
stm32flash - http://stm32flash.googlecode.com/

Serial Config: 57600 8E1
read_byte: No error
Assertion failed: 0, file stm32.c, line 92

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

ad c)
Option RAM   : 15b
System RAM   : 4KiB

←[s←[uRead address 0x08000100 (0.20%) ←[uRead address 0x08000200 (0.39%) 
←[uRead address 0x08000300 (0.59%) ←[uRead address 0x08000400 (0.78%) 
←[uRead address 0x08000500 (0.98%) ←[uRead address 0x0800
0600 (1.17%) ←[uRead address 0x08000700 (1.37%)

Original issue reported on code.google.com by Frieder....@web.de on 4 Nov 2011 at 4:30

Attachments:

GoogleCodeExporter commented 9 years ago
Can you not specify an include path instead in the compiler options as is done 
for POSIX systems? eg: -I../

Original comment by ge...@spacevs.com on 10 Nov 2011 at 10:45

GoogleCodeExporter commented 9 years ago
Hi there!Please tell me how to use the stm32Flash codes in devcpp!
Please assist!

Original comment by migabo.e...@gmail.com on 20 Sep 2012 at 12:05

GoogleCodeExporter commented 9 years ago
In absence of the maintainer, I have set up a git repository where I will try 
to incorporate all outstanding patches: 
https://gitorious.org/stm32flash/stm32flash#more

I made a patch reorganizing all Makefiles and taking care of this issue, in the 
issue16 branch. Comments are welcome.

Original comment by lists.to...@gmail.com on 17 Nov 2012 at 8:40

GoogleCodeExporter commented 9 years ago
I have merged the Makefile changes and the other outstanding patches to my 
"merging" branch, where I have also added a fix for the progress indicator (c) 
on Windows. Also the assertion (b) has been replaced by an error message. It 
builds and runs fine on MinGW/Windows 7 (tested read from flash).

For a non-existing COM port (a) stm32flash will now at least report that it 
failed to open the device. This can be improved to retrieve more details from 
the operating system. It should be possible to use GetLastError() and compare 
with ERROR_FILE_NOT_FOUND, or get any error string with FormatMessage().

Original comment by lists.to...@gmail.com on 24 Nov 2012 at 8:22

GoogleCodeExporter commented 9 years ago
This has now been fixed in the official repository and is included in version 
0.3beta2.

Original comment by lists.to...@gmail.com on 9 Dec 2013 at 11:11