SparkFun Forums 

Where electronics enthusiasts find answers.

Everything ARM and LPC
User avatar
By ColdStart
#138066
I was always doing PIC stuff, now decided to move to arm.

I will be working with stm32f103, but then mostly with stm32f405 MCUs.

I was wondering which combination of free toolchain would support both chips? i made a search and i mostly see support for stm32f103 series... just wondering would that also work for f405 series?

so, who knows of a good universal and free toolchain which would allow utilize all program memory of mentioned MCUs?
By motopic
#138069
The codesourcery free toolchain will work. BUT, there are the required startup and linker scripts that have to be made.

The STM32F4 demos that come with the Discovery board are all for $$$ compilers. I was going to start from the STM32M3 (aka stm32f10x) tools and try to get to F4, but have not gotten it going yet.

warning: stm32 is a completely different animal from pic, and free tools are the hardest way to get there. Rowley Crossworks is the cheapest way to start, $150 for a personal, non-commercial license. Pro licenses start usually around $2000 a seat.
By UhClem
#138086
I picked up a STM32F4-Discovery board last month to play with and I am using the GNU tools. This was the easiest path for me since I pretty much only run Linux. It has worked pretty well but I am avoiding the ST provided standard peripheral libraries like the plague. Which isn't a big deal as so far it has been easier to deal with the hardware directly. So far I have blinking LEDs, interrupt driven serial port, and I am now working on a driver for the SDIO port. Which is the reason behind this project.

I started here.
By motopic
#138112
Thanks UhClem for the reference.
I will have to see how their examples are setup.
I am curious how you are using the usb, ethernet and other advanced stuff without their libs?
I am using the mthomas code setups for M3, which I understand after using it a long time, but this means we have to make linker and startup codes for the new proc.
By UhClem
#138147
motopic wrote:I am curious how you are using the usb, ethernet and other advanced stuff without their libs?
I'm not using USB or Ethernet, just SDIO. The stm32f4xx.h include file has all the necessary register definitions.
User avatar
By ColdStart
#138372
ok thanks for the responses, now here is the thing:

1. i am not looking forward to use that discovery board, i will be using just that STM32F405 chip on a custom board, and on that tutorial i see that the software talks to STLINK usb chip located on discovery board which translates commands via JTAG to STM32.

2. as far as i know every STM32 chip comes with internal bootloader, and it is possible to program it via RS232, so now question is: is it possible to fully program STM32F405 chip using those tools WITHOUT any STLINK stuff?

actually i think it should...because all the GNU toolchain does is generating a HEX file isnt it? and then it turns out that i can put in that HEX file into STM32 even via the free FlashLoader program?

the only thing is, i wont be able to do in-circuit debugging.

am i right?
User avatar
By ColdStart
#138381
another questions are:

1. does it mean that this software will work with separate ST-LINK hardware debugger connected via JTAG cable to custom board with stm32f405?

2. and can it debug peripherals? or IO port states etc? SFRs?
By rmteo1
#138389
You can be up and running in less than 30 minutes by going with the Rowley Crossworks IDE/Compiler/Debugger - they offer a 30 day FREE evaluation with no limits.

You can debug (single step, breakpoints, examine/change/watch registers, etc.) and program your custom board with the separate $25 ST-Link. Or you can use the ST-Link on any of the Discovery boards. All you need is 4 connections (PWR, GND, SWDIO, SWCLK) for the SWD (not JTAG) interface on your board.
By rmteo1
#138397
ColdStart wrote:im not interested in time/code limited software at all.
Fair enough, if you do not place any value on your time.
motopic wrote:stm32 is a completely different animal from pic, and free tools are the hardest way to get there.
Very good advice.
User avatar
By ColdStart
#138412
rmteo1,

that was not advice that was just statement of fact, yes everyone knows that setting this thing up is hard, but that doesnt answer my questions. if you know how to solve things and wish to bring it on then go ahead, if no then saying its hard is pointless.

right now i am messing with Eclipse, i have already success of tying it to sourcery g++. So i solved that problem.

and from my investiogation today, it seems that those debuggers DO NOT support ST-LINK.

so, i'll be looking for a way to tie ST-LINK part from tutorial provided by a uhClem, to the development tools which i set up.

another problem is creating the right linker script for STM32F405/407 devices, looking at it now
By mindthomas
#138867
What about the free/lite version of Atollic TrueSTUDIO
It is without any time or code limitations and can be used with both the F1, F2, F3 and F4 series of the STM32 microprocessor family.

I have been using Ride7for quite some time, but in the beginning of the new year they released an update which requires you to buy their software and pay for updates on a yearly basis. So unfortunately this is not free anymore. But I still have their debugger hardware which is only supported by their IDE :(
By dschlic1
#139112
Most Linux tools use OpenOCD. OpenOCD does not support ST-Link or SWD. So if you use open source GNU tools, you will have to use JTAG. I am using the lite version of Atollic TrueSTUDIO for programming a STM32F103. Have not had any problems. It supports ST-Link.
User avatar
By ColdStart
#139455
hello dschlic1

i'm still figuring things out with free toolchain.

But i decided download Atollic and give it a try, well i set up a project for stm32f103re, i added simple program with just while loop.

i just tried to build it all and it gave me an error:L
target CPU does not support ARM mode

i checked its settings, all seems fine, any ideas why would it do that?

p.s. i also tried adding stm32f10x.h, startup_stm32f10x_hd.s, system_stm32f10x.h files to a project. but it didnt help. same error.

so what could be a reason?
User avatar
By ColdStart
#139456
one more thing.
in the project build options, settings. Assembler and C compiler Target, i see that Software Implementation is selected for Floating Point. And i cant change it. those menus are disabled. Maybe thats the problem? and why cant i change that?