SparkFun Forums 

Where electronics enthusiasts find answers.

Everything ARM and LPC
By GreatK101
#93605
I recently got an stm32f103 dev board and I've been dying to try it out. My previous experiments have mainly been with 8-bit micros, but I need to move up to something faster. But this whole toolchain idea confuses the heck out of me. I'd like to work completely free, i.e. away from any limiting licenses so I think I want to stick to GPL software. Any ideas where to start guys?

Sidenote: Are openOCD Binaries not provided due to its use of FTDI libraries? What is it used for? Once again defer to above question. If someone could outline this for me I'd be eternally grateful. :D

Side Note #2: Sry for the footnotes, but I'm willing to work in windows or linux.
By gdisirio
#93634
For a good GPL toolchain try here: http://www.yagarto.de

Giovanni
By motopic
#93642
Try not to get too frustrated. Cortex-M3 is the DEEP-END of the pool.

Many(I) use CodeSourcery toolchain with Programmers Notepad2. The key is examples. The hardest part is the linker scripts.

examples:
http://www.siwawi.arubi.uni-kl.de/avr_p ... ortex.html

I used this one , it had the clearest linking script setup:
http://www.siwawi.arubi.uni-kl.de/avr_p ... 32_memcard

Google is your friend, and the STM32 forums.
By GreatK101
#93677
Thanks guys. So Codesourcery is GPL? Also, the dev board I got came with a bootloader. I'm not as big a fan of them, what kind of hardware will I need to program the STM32? I hear things about JTAG and openOCD but once again, am a bit lost.
By gdisirio
#93690
This is the toolchain I use for STM32 (and other ARMCM3/ARM7/ARM9 microcontrollers as well).

- Eclipse Galileo + CDT + Zylin plugin for debugging.
- OpenOCD 3.1.
- Latest YAGARTO.
- Olimex ARM-USB-OCD JTAG probe.

It is open source and allows advanced development and debugging from within the Eclipse IDE.

If you need a STM32 demo complete of startup files, linker scripts, makefile etc then follow the link in my signature, download the zip file and look into ./demos/ARMCM3-STM32F103-GCC for a ready to go STM32 application (to compile it just "make" from a command line or import the demo into a "makefile C project" into Eclipse).

Giovanni
By motopic
#93706
GreatK101 wrote:Thanks guys. So Codesourcery is GPL? Also, the dev board I got came with a bootloader. I'm not as big a fan of them, what kind of hardware will I need to program the STM32? I hear things about JTAG and openOCD but once again, am a bit lost.
The -M3 comes with the bootloader in the core. Its real simple to use and does not get in the way. Use a stm flash tool to upload your hex or bin file.
That part is easy to integrate.

Codesourcery toolchain is gpl. Programmers Notepad 2 or crimson editor are free for win32. CodeBlocks, KDE and Eclipse of course for linux.

Get the Olimex OpenOCD device from Sparkfun if you want to JTAG your ARM.... :^)
By mac
#93764
On windows there is various toolchain precompiled, I will not comment on them.

On Linux, since I use gentoo I have access to the wonderfull crossdev tools, which allows to compile toolchain quite smoothly. Otherwise you need to learn how to compile your toolchain. Not difficult but tedious.

I use jtag interface from embedded project: http://www.embedded-projects.net/index.php?page_id=256. JTAG/OCD is used for debuging in-situ, meaning you have access to memory/registers etc...
It use GDB debugger, and the frontend you like (eclipse, DDD etc...).

It's another FTDI jtag interface. No issue but I had to do the configuration file by myself (and also use trunk openocd). I can post them if someone need it.

I strongly suggest to use a RTOS, especially for begining. I use ChibiOS, but there is other alternatives (freertos etc...). Chibios is quite simple and easy to modify (and support M3 out of the box). It can be also used on AVR too. It can really make your first step easier.