2012-07-16 08:01 PM
Hi,
I originally was planning on using the Discovery demo board, but have since changed to placing the MCU directly on my PCB. Now what is the easiest way to program the thing? The Discovery uses a STM32F103C8T6, perhaps I can use the schematic to place one of those on my PCB and load the ST-LINK code on it? Or perhaps I should use a Discovery board as a programmer, do i need to load Versaloon on it? (http://snowcap.fi/blog/2011/11/21/the-cheapest-sw-dongle-stm32-f1-discovery/). Of course there's also ST's ST-LINK. Ideally I'd like to use Eclipse or something similar as the IDE. Will this work is ST's ST-LINK programmer? Another thing is I need the board to be isolated from the PC, so I was thinking of creating an isolated USB cable using an ADuM4160, but perhaps isolating the JTAG is easier? I found this link regarding programming STM32 with Eclipse (http://www.stf12.org/developers/ODeV.html#widget3). Seems a lot of software and plugins are involved, but is this a good solution? So my question is, what is the best way to program the STM32F4 in terms of ease/cost/debugging/IDE etc? I have some spare room on my PCB if required. Thanks!2012-07-17 12:36 AM
Just download the users guide documentation of a V2 discovery board, such as the F0, L1 or F4 discovery. They cover in detail how to use the STLink part of the board as debug interface for external controllers. Is is more or less a matter of changing some jumpers and solder bridges. The F0 Discovery being the cheapest, it would be virtually no loss to transform it into a STLink and scrap the F0 part.
I would avoid the hassle of adding another controller to my board just as debug interface. Just reserve the SWD pins in your PCB, so you can use an external STLink, or any other debug adapter that supports SWD.Another thing is I need the board to be isolated from the PC,...Can't help you with that, though...
2012-07-17 01:10 AM
Hi fm, thanks for your reply.
What is the purpose of the Versaloon firmware as shown in the article to use a F1 discovery board? Is it required? Or does it just give you more debug capabilities or something? The ODeV method of using Eclipse also used Versaloon. What IDE/compiler do most people here use?2012-07-17 01:49 AM
The versaloon software is certainly not required.
It is an alternative debug adapter implementation, (if I don't mess up things here), that implements the OCD firmware on STLink hardware. There are websites describing how to get this firmware on the STLink. I did not do it - the plain STlink served me well up to now. With the Versaloon software, you have the STLink harware posing as OCD debug adapter, otherwise as STLink. Thus it is especially useful if you use a toolchain that refuses to know the STLink, or if you insist on Open Source. I'm using CrossWorks most of the time, which natively supports STLink, and rarely used installations of Keil uVision4, LPCXpresso, summon-ARM-toolchain, CodeSourcery Lite and AtmelStudio 6. That wide range of tools stems from a requirement to support controllers from different vendors. A common supported debug interface is the greatest problem in such a collection, so I took some money in my hands to get a CrossWorks licence, which supports all of them, including the debug adapters I have.2012-07-21 05:04 PM
If you don't care about debug, you can use dfu-util to load binaries over the built in usb on the f4. Just pull boot0 to 3.3v, and ground (I think that's the right direction, don't take my word for it) reset. That'll put you in boot loader mode. A bit of googling should get you there.