cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 C/C++ build environment using CodeSourcery Sourcery G++

lanchon
Associate III
Posted on November 25, 2009 at 04:13

STM32 C/C++ build environment using CodeSourcery Sourcery G++

#fyi
26 REPLIES 26
lanchon
Associate III
Posted on May 17, 2011 at 12:25

hi Miles,

I normally don't get my hands dirty with these things, I write mostly portable code and leave the details of toolchains to others. I had zero experience with GCC and with setting up a compiler so this was kind of a drag. Also, I never use debuggers (I instrument code instead) so I can't help you in the least bit with GDB.

There's Anglia IDEaliST that I think can do debugging via OpenOCD, you could try that IDE. In my release I included a file called jtag/target.ini that was taken from IDEaliST 1.61. Apparently it's some kind of configuration file for GDB, but I wouldn't know. I included it in hopes that someone might find it useful...

miles
Associate II
Posted on May 17, 2011 at 12:25

> Also, I never use debuggers (I instrument code instead) so I

> can't help you in the least bit with GDB.

I had assumed gdb worked and that I did something wrong to break it. I'll keep working on gdb, and post back if I have success.

Thanks,

Miles

gmonti64
Associate
Posted on May 17, 2011 at 12:25

Hi,

I'm looking for a FAT implementation running on STM32, and reading this post, I would to signal a similar demo (Eclipse + GDB on STM32) at the following link

http://sites.google.com/a/stf12.net/developer-sw-fw/eclipse-demo

sjo
Associate II
Posted on May 17, 2011 at 12:25

Quote:

GDB (the one included in the codesourcery toolchain) could connect with a ''target remote localhost:3333'', which would stop the app from running. Entering 'continue' would make it continue, but gdb became unresponsive, and did not return a '(gdb)' prompt after the continue command.

gdb will go modal after a continue is executed, a ctrl-c will halt the target again.

could you provide more info, openocd, gdb version etc - and any logs.

Cheers

sjo

pandoraems
Associate II
Posted on May 17, 2011 at 12:25

Can someone with working GDB please post their setup?

I.e:

- gdb version (anglia? codesourcery? ...)

- gdb initialization file

- any other tricks you've done to make it work?

Thanks

gmonti64
Associate
Posted on May 17, 2011 at 12:25

Your GDB problem isn't clear for me.

I'm able to start a debug session and use standard features - Step Into, Step Over, Suspend and Resume.

This is a good starting point for my project (FAT implementation on STM32).

What about to contact the developer's demo?

you can find the reference on the site.

[ This message was edited by: gmonti64 on 02-07-2008 23:27 ]

sjo
Associate II
Posted on May 17, 2011 at 12:25

I do not have a problem, i was trying to help with yours??

Cheers

sjo

andreas2
Associate II
Posted on May 17, 2011 at 12:25

I've got debugging up and running on both linux and winxp.

I've tried both CodeSourcery's gdb (the current, and the previous), as well as a recent gdb i compiled myself.

I use OpenOCD (versions r653 to current, yagarto has a precompiled windows binary) with an Amontec JTAGkey (ft2232-based) interface. I can post the config file on request, have to clean it up a bit.

Startup commands consist of something like:

target remote :3333

load

monitor reset

thb main

c

I also wrote a gdb stub for debugging the target over a serial line. Quite usable, but it's work in progress.

Debugging works great in both cases, both command line and from within eclipse.

pandoraems
Associate II
Posted on May 17, 2011 at 12:25

thanks for the response Andreas

Yes, please clean the file up and post it here. I am sure you'll help a few like myself here by doing this.

Cheers

andreas2
Associate II
Posted on May 17, 2011 at 12:25

Ok, here it is... I use it mostly with r6xx something, I noticed recent versions have a cleaner variant in the src/target/target dir.

EDIT: Hum, I wonder where it went. I'll paste it inline:

stm32_ft2cfg

------

daemon configuration

telnet_port 4444

gdb_port 3333

gdb_detach reset

gdb_memory_map enable

gdb_flash_program enable

daemon_startup reset

interface

interface ft2232

ft2232_device_desc ''Amontec JTAGkey''

ft2232_device_desc ''Amontec JTAGkey A''

ft2232_layout jtagkey

ft2232_vid_pid 0x0403 0xcff8

jtag_speed 10

reset_config trst_and_srst

jtag scan chain

format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)

jtag_device 4 0x1 0xf 0xe

jtag_device 5 0x1 0x1 0x1e

target configuration

target

target cortex_m3 little reset_halt 0

run_and_halt_time 0 30

working_area 0 0x20000000 0x5000 nobackup

flash configuration

flash bank stm32x

0 0

flash bank stm32x 0x08000000 0x20000 0 0 0

------

[ This message was edited by: andreas1 on 08-09-2008 01:11 ]