Programming STM32 Nucleo from Linux - Page 1
Forum section: electronics / general

author: 1994timmeh
author_rank: Contributor
timestamp: February 16, 2015, 08:38:26 am
content: Hi,Ive been working at this goal for a while now so i thought id open it up and see if anyone has a solution to my problem.I bought a STM Nucleo F401RE and yes it has MBED, but for University and offline stuff its pretty darn useless. I have programmed a Netduino from linux but can't seem to find how to get this board to work.Any ideas?Cheers

author: ealex
author_rank: Frequent Contributor
timestamp: February 16, 2015, 10:30:24 am
content: My environment for working with microcontrollers in linux:eclipse + CDTCodeSourcery arm toolchain + PATH modified to point to the tool-chain's binopenocd - latest version when i remember to updatei have a nucleo f401 board and it works properly - writing the flash and debugging via openocd, etcwhat did you tried - and what / how did it fail ?

author: gmb42
author_rank: Frequent Contributor
timestamp: February 16, 2015, 10:52:26 am
content: I take it you have looked at theOffline wiki pageas it shows how you can easily export an mbed project to makefiles and then simply run make. This should be enough to get you started.You'll also have to install an ARM toolchain, e.gGCC ARM EmbeddedorCode SourceryandOpenOCD.

author: dannyf
author_rank: Super Contributor
timestamp: February 16, 2015, 11:39:34 am
content: QuoteHow so?I have one programmed from keil/iar no problem. That's as offline as offline can go.

author: 1994timmeh
author_rank: Contributor
timestamp: February 16, 2015, 12:01:20 pm
content: I have been trying to go from scratch but Ecipse does seem like a nice way to go!Anyway my problem seems to be flashing to the board. Im doing this through st-utils and arm-none-eabi-gdb but when i go load i get "Load Failed".Any ideas?

author: 1994timmeh
author_rank: Contributor
timestamp: February 16, 2015, 12:04:05 pm
content: Quote from: dannyf on February 16, 2015, 11:39:34 amEssentially the university want us to do this stuff from as close to scratch as we can. And the IDEs cost hundreds upon thousands of dollars!

author: dannyf
author_rank: Super Contributor
timestamp: February 16, 2015, 12:14:40 pm
content: QuoteThen go from scratch.But it has nothing to do with your inability to program it offline.QuotePlenty of free IDEs too.

author: 1994timmeh
author_rank: Contributor
timestamp: February 16, 2015, 12:17:00 pm
content: Quote from: dannyf on February 16, 2015, 12:14:40 pmExactly! This is what i came onto here to find out about! Ive been banging my head against the wall trying to work it out, though someone would have done the same before and could shed some light.

author: ealex
author_rank: Frequent Contributor
timestamp: February 16, 2015, 01:13:18 pm
content: i've never used st-utils, openocd works without any problem.is you board detected ?run "lsusb" with the board attached - what do you see ?i have to run openocd with root access ( sudo openocd .... ) on my system - otherwise normal used account can not access the usb.do you have any output from st-utils ? will it work if you try to just load a binary from command line - not via gdbhow do you connect gdb to st-utils ?

author: farsi
author_rank: Regular Contributor
timestamp: February 21, 2015, 10:53:49 am
content: the MUCCC presented a gnu c toolchain for arm with stlink flasher last week:https://github.com/muccc/arm-workshopmaybe it helps