cancel
Showing results for 
Search instead for 
Did you mean: 

ST32F101RB hello world software

ericlarson9
Associate II
Posted on June 09, 2009 at 07:11

ST32F101RB hello world software

11 REPLIES 11
ericlarson9
Associate II
Posted on May 17, 2011 at 13:13

Does anyone have or know of where I can download a simple starting point for the ST32F101RB? thanks.

pranamesh
Associate II
Posted on May 17, 2011 at 13:13

I started from here, and would recommend it being simple and useful. ofcourse this is for the devkit from olimex, but you can make out even if you are using any other kit

http://www.olimex.com/dev/soft/arm/STR/STM32-BLINK-LED-GCC-ECLIPSE-projects.rar

mtm_spm
Associate
Posted on May 17, 2011 at 13:13

STM32F_usb_cfg.h: No such file or directory

As mater of fact, I still have yet to find a single example of STM32 project that works with GNU tools while using Standard Peripheral Library.

st3
Associate II
Posted on May 17, 2011 at 13:13

Quote:

I still have yet to find a single example of STM32 project that works with GNU tools while using Standard Peripheral Library.

Have you looked at the samples included with the FWLib?

If you have a devkit (or ''dev board'' or whatever), it should come with examples.

mtm_spm
Associate
Posted on May 17, 2011 at 13:13

Quote:

Have you looked at the samples included with the FWLib?

If you have a devkit (or ''dev board'' or whatever), it should come with examples.

Unfortunate yes. It came with 3 different IDE's (2 of them crippleware) and each IDE came with his own version of library, rather ancient (even 0.3). Every IDE compiles his own examples and nothing else. One project configure DMA_ChannelX while the other project require DMA1_ChannelX.

The board also came on CD with a folder with 2.0.1 Lib but the project examples based on it, do not compile at all. Files not found, symbols undefined etc.

As a result I installed,

http://www.emedt.com/armdt/

but it doesn't compile anything, actually the builder crash before it gets a chance to execute the makefile :(

From command line, I can get the CodeSourcery compilers to work OK but the linker refuses to initialize the vector from the declared entry symbol in linker script. As a result the program does not run on the card unless I use inline asm __asm__(''.word 0x20001000''); __asm__(''.word main'');

at the beginning of the c file. How will that work into a multiple files project 🙂

This is so frustrating ! I still have to get any decent program running on STM32 board after 3 days. Compare that with Arduino which just work in 3 minutes, from which 2:45 was soldering required to get the board powered.

pranamesh
Associate II
Posted on May 17, 2011 at 13:13

hi mtm_spm, EricL,

assuming you are on windows (altough linux would not be much diffrent), please use the step by step instructions available on

www.danielecaltabiano.com/wwm/ST-ARM_toolchain/files/ST-ARM_toolchain_1.2.pdf

The file (searched from google) is also available in many other forms on the internet. Due regards to the original author of the instructions!

This will help you get over the initial setup issues and you should be able to compile the olimex sample (link given in my earlier post, same thread) or build the cortex m3 library

the Eclipse IDE is one of the best

st3
Associate II
Posted on May 17, 2011 at 13:13

Quote:

the (sic) Eclipse IDE is one of the best

Note that Eclipse is not an IDE itself - it is a framework from which many companies have built many different IDEs.

pranamesh
Associate II
Posted on May 17, 2011 at 13:13

but ofcourse!!!

I use it for python, java, C/C++ (now in embedded) and modified it for our own application platform's IDE. Even was thinking of using it for my stock trading activties (using the appropriate plugin)

so for others, my modified statement is

.......use an appropriate version (they do differ for the purpose) Eclipse with an approptiate version of CTD for creating your own ARM IDE.......which is why people are scared to use it in first place :-]

lets keep things simple!

alex8
Associate II
Posted on May 17, 2011 at 13:13

A few months ago I had the same basic question. I actually had something working but my compile options were making the code horrible...

A couple people pointed me in the right direction.

here's the

http://www.st.com/mcu/forums-cat-8235-23.html

One of the big troubles of getting going with a new uC (at least for me) seems to be linker command files. These are buried in checkboxes and options by the IDE packagers, so you never really see it.

In the thread above, disirio responded to me giving me a link to his ChibiOS project, at

http://chibios.sourceforge.net

in which there was a pretty readable linker command file.. that got me over the hump.

I'm working on putting together a ''simplest possible example.'' It'll take a day or two, I'll post it when I've got it.

Hang in there. When you get code buildable from your own makefile, you'll have a huge feeling of freedom and power.

Alex