Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: New STM32 Discovery board can now be programmed on Linux
bandit
Administrator
Posts: 321
Permalink
Post New STM32 Discovery board can now be programmed on Linux
on: June 4, 2012, 14:28
Quote

From: "Hack a Day" <donotreply@wordpress.com>
Date: Mon, 4 June, 2012 1:02 pm

Post : New STM32 Discovery board can now be programmed on Linux
URL :

http://hackaday.com/2012/06/04/new-stm32-discovery-board-can-now-be-programmed-on-linux/

Posted : June 4, 2012 at 12:01 pm
Author : Mike Szczys
Tags : CodeSourcery G++ Lite, discovery board, linux, stlink, stm32,
stm32f0
Categories : Microcontrollers

http://hackadaycom.files.wordpress.com/2012/06/stm32f0-discover-linux-support.jpg

Last Wednesday I posted a video review of the new STM32F0-Discovery board (http://hackaday.com/2012/05/30/video-review-stm32f0-discovery-board/) which is built around an ARM Cortex-M0 chip. I speculated that it should work with the open source project aimed at programming these discovery boards. I tested it out and a connection could be made, but no code could be flashed. So I spent a few hours over the weekend and added support.

My updates are already in the stlink repository (https://github.com/texane/stlink) . After cloning the code, you can use three commands to compile the software (./autogen.sh, ./configure, make).

That's assuming you have all of the necessary dependencies (I had to
install libusb-1.0-0-dev) and that you add the udev rule suggested in the documentation (also found in the repository). The program st-util connects to the board and provides a listening port for an ARM debugger (I'm using arm-none-eabi-gdb from CodeSourcery G++ Lite).

When I first started testing, the chip id was reporting as 0. It turns out the register address polled for this information was wrong. After finding that in the almost-900 page reference manual I went through the painstaking process of finding the hex values necessary to properly memory map the device. From there I also updated the blink example to generate an ELF file compatible with the Cortex-M0 chip. So out of the gate you should be able to use an ARM cross compiling toolchain to compile the example, connect to the board with this utility, then use the debugger from the toolchain to connect and flash that example to RAM.

There's lots more to be done. To fully utilize the chip it is necessary to use a startup file and linker script when compiling. I've done nothing in this area, but I hope to work on some tutorials as I get further along. Of course if you have your own successes developing for this board using a Linux machine we want to hear about it (http://hackaday.com/contact-hack-a-day/) !

adric
Administrator
Posts: 178
Permalink
Post Re: New STM32 Discovery board can now be programmed on Linux
on: June 4, 2012, 15:41
Quote

Yay, I understand small dev groups not having folks who have the time to make drivers for small subset operating systems. but ive never understood companies that don't embrace letting folks develop 3rd party tools/compatibility.

-Quelab, Come make something!

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.018 seconds.

 

Comments are closed.