cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 DISCOVERY with linux

dorrachendoul
Associate II
Posted on April 05, 2013 at 17:26

Hello,

Am trying tocompile STM32 examples in linux but i want to know if i have to install some drivers so that the linux can recognize it.

Best Regards,

Dorra

6 REPLIES 6
Posted on April 05, 2013 at 21:45

Am trying to compile STM32 examples in linux but i want to know if i have to install some drivers so that the linux can recognize it.

 

Suggest a Google search, if that doesn't provide any hits then assume you're on your own.

I've built STM32 examples using a GNU/GCC (ARM cross-compiler) command and make, but not under Linux in this case.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
frankmeyer9
Associate II
Posted on April 06, 2013 at 14:28

You can try the driver you find there:

https://github.com/texane/stlink

Last time I tried it more than a year ago, it used som additional stuff from Atollic (startup code, gdb server).

michaelmccartyeng
Associate II
Posted on April 14, 2013 at 00:04

This guy created his own libraries or something. He can use eclipse and c++ and linux with his stm. He provides it all free with instructions on his site. 

I've implemented most of my code with stdlib but would really rather be using c++. If you dont mind using another lib check out his site 

http://embeddedprogrammer.blogspot.com/

crt2
Associate II
Posted on April 15, 2013 at 10:59

gcc works like charm. Or to be more exact arm-none-eabi-gcc which can be found in CodeSourcery is the way to go.

You only need CodeSourcery+openocd+TextEditor to compile, run&debug in Ubuntu. I suggest you also download directly from websites, as official repros might be quite a bit outdated.

johnsonpe
Associate
Posted on April 15, 2013 at 16:15

Hi Michael.

If you like C++ you should see this guys site and his library its brilliant.

http://andybrown.me.uk/wk/

Regards Peter.

jejeva
Associate II
Posted on April 18, 2013 at 23:15

i'm doing basic things by using :

arm-none-eabi from :    

https://launchpad.net/gcc-arm-embedded

(depack and add the /bin path to $PATH)

and, as a template for empty projects : 

git clone git://github.com/jeremyherbert/stm32-templates.git

which conveniently reunites all the st incs & src from the FW file in the same place.

(just remove the -Os from the makefile, this is causing some weird problems)

 

to load the bin, use the texane tool (

https://github.com/texane/stlink

) or directly from gdb

in one term : openocd --file /usr/local/share/openocd/scripts/board/stm32f4discovery.cfg

in another run :

$arm-none-eabi-gdb main.elf

...

(gdb)target extended-remote :3333

...

(gdb)monitor reset init

...

(gdb)load

(...uploads the bin...)

(gdb)run

yes

et voila :)