cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4-Discovery based debugger

zomirp2
Associate II
Posted on February 12, 2013 at 11:54

Hi,

There is a short hack on how to make a Cortex debugger from Discovery board at: 

http://searchingforbit.blogspot.com/2013/02/free-cortex-debugger.html

.

It is based on free design (not open) without size restriction. You can make your own based on the design or order made HW online.

#discovery #diy #debugger #stm32
9 REPLIES 9
Posted on February 12, 2013 at 16:29

The STM32F-Discovery series boards already export a usable SWD interface (limited to ST processors I presume), for free, if you discount the cost of the board.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zomirp2
Associate II
Posted on February 12, 2013 at 17:51

I know. iTAG however supports ''all'' Cortex(M?) devices. Did you check further links on the post? It also enables a range of functionality like RTOS plugins, extended connectivity etc. See the use case from older post: 

http://searchingforbit.blogspot.com/2012/04/lcd-type-on-cheap-stm32-camera-board.html

Posted on February 12, 2013 at 18:33

Did you check further links on the post?

I browsed a little, does it support ST-LINK (~$10-20) SWD, or a sub $20 JTAG out of China/Thailand ? I prefer ZERO effort over perceived ZERO cost.

That said I do have people interested in a workable, low cost, intergrated debug solution for GNU/GCC
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zomirp2
Associate II
Posted on February 13, 2013 at 10:49

What do you mean by ST-Link support? You don't need it nor any other debugger if we talk about IDE. I mean... I see the convenience when it is integrated on the eval board but other than that I prefer single environment (IDE, dirvers, build amanger etc.) for all my projects.

Regarding the cost - it costs as it does if you buy it online. But you can make it on your own for the price of PCB, CPU and connectors and that is in $20 range. I guess Asian manufacturers would make it even cheaper.

I have downloaded the winIDEA IDE. It fetures an integrated build environment. It is a little bit more raw from the one in Eclipse. It is more like in CodeBlocks but still without any knowledge about build flags. User must specify all flags like in make file. The file handling, include paths and defines are automatic though. There is also support for multiple configurations (e.g. Debug and Release) with separate files exclusion option and pre/post build operation option.

One more thing since I like automatic build managers instead of make file: I hate that in Eclipse CDT the object files are passed to linker in command line. This has a limit with command line length (it was like that last time I checked - or I don't know abut the alternative). In winIDEA you can make it put object files in linker file.

Posted on February 13, 2013 at 15:56

Well I mention the ST-Link for a couple of reasons. It is available as a totally standalone product, and is also implemented on the STM32F103 parts on the Discovery series board, and exports an SWD interface for Cortex-Mx parts. Wouldn't it make more sense to just blow some different code into that if the current load is somewhat limiting? Like Versaloon?

Command line limitation in DOS/Windows are usually addressed by using response files, ie @foo.lnk

It's been a while since I checked if exec() or spawn() type function had hard limits.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zomirp2
Associate II
Posted on February 13, 2013 at 17:38

OK, I see your point. It is like I said - convenient for the boards with integrated ST-LINK. Standalone ST-LINK has nothing to do with it. It is one or the other. You only mention SWD - I guess ST-LINK also supports JTAG?

The answer to question whether ST-LINK is supported is: probably not. ST-LINK is STM32F103 based and iTAG is STM32F405 based. I doubt the firmware has support for different peripherals. And there is only one FW. Probably for STM32F405. There is also used pins compatibility issue.

My original post was more like: Look you can make free Cortex debugger with Discovery board. NOT: Look you can debug Discovery board with 3rd party debugger.

Anyway... GCC - I'm using @file for options. Are you saying that GCC can automatically generate a file with all object file names during compile steps (and later to be used in link step)? If so, I'd like to know how.

Posted on February 13, 2013 at 18:47

Typically I'd use makefiles to echo and pipe lists of objects to a file, not sure if I could demonstrate quickly in GNU/MAKE, I'm more of an NMAKE user.

Another mechanism might be to decimate the object count by stuffing them into libraries, and linking the libraries. Done this with huge tree based builds (function per file) running into thousands of objects.

When I ported a 90's era Win 3.x Unix shell style 32-bit DOS-Extender app to Win 7, I had to build a shim/loader which parsed the argv[] list,  before calling main() to overcome the line length limit (2K prior to XP, 8K for XP and beyond). The original Unix shell this thing used originally probably wasn't limited in this fashion. I mention this because the IDE's probably don't use the command line at all, either having a secondary entry point, or DLL, to pass in a list of pre-parsed parameters or a block of memory.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 13, 2013 at 19:07

I'll have to take a look at winIDEA, may be it can use other JTAG pods, it's not clear from the web page, or release notes, and I'm loathed to spend 50 $/E for yet another JTAG pod that doesn't work with anything else because the IDE can't work with existing commercial grade off the shelf hardware, just to evaluate something.

Same for a 2000 $/E TRACE pod, much more likely to go with a $1300 Segger one that works with Keil and IAR, and isn't vendor locked.

As a user of winIDEA maybe you can express better than the web site the pods that it will work with?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zomirp2
Associate II
Posted on February 13, 2013 at 21:10

winIDEA basically supports proprietary HW. There were plugins in the past which enabled the use of other debuggers. Also other IDEs work(ed) with iSYSTEM boxes.

For evaluation (and usage) you don't have to spend any money provided that you own a Discovery board.

After your previous post I got excited and searched for a way to generate a list of object files... unsuccessfully. I knew you are going to bring up some make utility. I dislike them due to manual editing when shuffling project source files. I like the VS way.