I followed the installation instructions for Arduino STM32, https://github.com/rogerclarkmelbourne/Arduino_STM32. Using Win 7 and Arduino IDE 1.6.4. Selected stm32f407 board. Code compiles fine, but I get error when trying to flash:
Sketch uses 5,308 bytes (4%) of program storage space. Maximum is 108,000 bytes.
Global variables use 2,104 bytes of dynamic memory.
2015-05-22T23:25:51 WARN src/stlink-usb.c: Couldn’t find any ST-Link/V2 devices
I have st-link installed. Used it with Coide. Not sure what the problem and/or what files to make changes to in order to get it to work. Can you provide any pointers?
Thanks
It sounds like the Slink upload exe is not finding your STLink
Can you check in the device manager and confirm its showing up
The next thing to check is whether your STLink firmware is up to date.
Do you have STM’s “STM32 ST-LINK Utility” ?
I think you can download it here
http://www.st.com/web/en/catalog/tools/PF258168#
Can you check it connects.
You can try updating your firmware if prompted by the STM32 STlink utility (windows gui)
If that still fails, I suspect that the open source stlink uploader we are using, is not compatible with your board
But there is a work around
Look in /tools/win at stlink_upload.bat
at the bottom of the file
rem: ------------- use STLINK CLI
rem:stlink\ST-LINK_CLI.exe -c SWD -P %str% 0x8000000 -Rst -Run
rem: Using the open source texane-stlink instead of the proprietary STM stlink exe
texane-stlink\st-flash.exe write %str% 0x8000000
Thanks for the reply. I will do these tests tomorrow let u know.
I just tried a Nucleo F3 board I have, and Texane-Stlink definately has issues connecting to it. But ST’s own exe was fine.
I was hoping to use Texane / stlink in preference to STM’s on exe, as Texane is open source and it would mean we are running the same upload tools on all platforms.
However it looks like Texane / Stlink doesnt work with some STLink versions
So I should probably revert the PC version back to ST’s exe, and Mac and Linux users will be left out, or have to reflash their devices somehow.
Yes, “STMicroElectronics STLink dongle” is showing up in Device Manager. Yes, I did have the “STM32 ST-LINK Utility”, but it was version 3.5, your link had 3.6 so I updated. Used STM32 ST-LINK Utility to flashed stm32f429 with new firmware. Still same error in Arduino IDE. So, I made the stlink_upload.bat edit you specified, works great!
I happen to have a STM32F407 & Nucleo-F411RE. I tried uploading code for these also, before and after the stlink_upload.bat edit. They were giving me the same type of error msg before the edit “2015-05-22T23:25:51 WARN src/stlink-usb.c: Couldn’t find any ST-Link/V2 devices”. After making the edit they work fine. I cannot speak for the other people that did not have an issue with the STM32F407, perhaps they were using a different operating system(other than Win 7), but based on my experience, you need to make the edit you specified.
Thanks for the help!
-prothan
I will change the bat file to use STMs own exe, as it works with more board than TexaneStlink
Cheers
Roger
I will change the bat file to use STMs own exe, as it works with more board than TexaneStlink
Cheers
Roger
I’m sure it could be done, but like you said before, STlink is a proprietary protocol and goodness knows whats changed in the different versions
Far better we just ask people to reflash to BMP
I also have 2 32F401 Nucleo boards (although I accidentally flashed one with the F103 code I was testing)
I am not sure it would be a good idea to force the BMP onto these boards that already have the ST-link. Better the approach used with AVR where the AVR-Dude program was engineered to work with the manufactures hardware. With Atmel, it turned out while the protocol was proprietary, it was for the most part documented.
I think in another year, if not sooner windows will be dead for embedded IDE. Given the number of *nix systems most of the coding will be through scripting compilers like processing, java, and swift. Just my opinion having been at the center of the storm for some 35 years. The more hardware abstraction the better. The value in the systems is the library and how easy it is to connect between HID and sensors.
My guess is that when people, like myself come to sites like this, we are looking for the basic setup and configuration. Beyond that is anybody’s guess.
BMP was the last resort really, the other option would be to flash a bootleg version of STLink.bin (on a Russian forum) that works with Teaxane – STLink.
But as Texane STLink works for you, there is no need.
Re: F4
I think the one with the display is possibly the F429 version, it has a slighly higher clock rate (180 instead of 168Mhz) but I’m not sure if there are many other differences
@mubase and I both have F407’s and the basic functional seems fine.
But the code base for the F4 older than the F103 i.e its never been updated to Arduino 1.0 API level
Interesting that It was the Maker Faire last week that inspired be to pick up on this again. Now I am starting to understand Arduino vs. Arduino and the 1.6.4 vs 1.7.x confusion. I thought the 1.7.x was the next beta? Now I understand why one camp was at the Maker Faire, and the other is lecturing this week at the Computer History Museum.
Since I mostly program AVR with ASM or gcc, I am not sure what advantages the 1.0 API offer?
I did get the impression aside from classicCoke vs nuCoke, that the F429 is a fairly popular board, that there were a few postings relating to getting some functionality on this. With everything moving so fast It is hard to know what parts are stable and what need working on. So if there is any testing or verification to do on this hardware, I may give it a go.
It’s just a rebranded and slightly modified version of what could be called the Real Arduino IDE
Ray uses 1.7 but I don’t know anyone else who does.
The mainstream one IDE Is currently at 1.6.4 and can be downloaded from Arduino.cc
Re API 1.0
Off the top of my head, the main change was the addition of the Stream class for printing, but there are also new commands like serial.peek
The addition of the Stream class required the Print class hierarchy to be changed.
There is also SPI transactions which are not in Arduino 0022, but I can’t recall if they were added in 1.0 or perhaps 1.5 and personally I don’t see the point in them.
In the F4 version of the code, it makes use of the USB OTG port,minutes as that is shared with hardware serial it means the first available Serial port if hardware serial 2.
In the longer term, I think it would be better to have OTG off by default and use HW serial 1 as the first serial channel and for it t be mapped for “Serial” when coding in the IDE.
This is what we do for the F103 on most boards (Nucleo excluded).
On maple mini etc, Serial is mapped to the on board USB Serial. On generic boards where people are using external USB to serial converters, normally on HW serial 1, this is mapped to Serial in the IDE.
Originally the Maple IDE used SerialUSB.print etc, but this is very non standard and requires all examples to be modified, so it make sense to change this to Serial.print (in the core)
Anyway, I hunk you will probably find using your F4 discovery board may be easier than the F103 Nucleo, but in the longer term the F4 port is lacking a lot of the libs e.g. SPI that people take for granted.



