2012-09-24 06:46 AM
Hi,
I'm migrating from 8-bit AVR to STM32. I have purchased already a STM3220G-EVAL board with STM32F207 CPU. The first task I want to accomplish is to get a ''Hello World'' application running on this board via RS232 port. I plan to use YAGARTO GCC Toolchain on Windows PC. To progrma the board I want to use DFU Util. Now I'm looking for really simple sample for Yagarto which will include all required files like C source, Makefile and if required others. I worked a lot with GSS and familiar with make. Can you please help me to find something simple? Thanks.2012-09-24 07:10 AM
I'd have to package up an example for the STM32F2 board mentioned. But I've used Yagarto on the STM32F4-Discovery.
https://docs.google.com/open?id=0B7OY5pub_GfIaUozb1VsY3Flb1E
2012-09-24 08:55 AM
STM3220G-EVAL Yagarto GNU/GCC USART Project
stm3220g_eval_usart_release_1.ziphttps://docs.google.com/open?id=0B7OY5pub_GfISXFiY2dlVUxXbnM
I don't have this board, so this was built blind, but does compile, and should work. It's based on other F2 and F4 projects, and pulls in some of the eval board source from the firmware library.2012-09-24 11:23 AM
Thanks a lot. Good point to start digging. Now if you don't mind I have a few questions:
1. I'm working with AVRGCC about 10 years. I've got used to have header files, linker scripts and startup stubs as a part of toolchain. In yagarto as far as I can see it is not where. Am I right that in that case I have to do it on my own or get it from other projects or open source peripheral libraries? If yew what would you recommend? 2. Actually I'm a one who likes to know everything and take control over every single bit. In AVR world I can say that I know all the peripheral by heart. Starting to study ARM core (Cortex M3) I have found out that it is not that simple. So is it possible at all to write own code without ready to use peripheral libraries in reasonable time. I can afford to spend a few weeks to go to details and play with a bits of configuration registers but not sure about time. 3. Is where a good debugger that you can suggest? And what additional HW should I purchase or assemble to work with it? I do not like heavy IDE's and prefer to work in my favorite SlickEdit with integrated make and error message parsing. But in case of debugging I would better have some GUI and not plain GDB. That's all for a while but more likely I would have more questions as I go on.2012-09-24 11:38 AM
If yew what would you recommend?
see belowActually I'm a one who likes to know everything and take control over every single bit. In AVR world I can say that I know all the peripheral by heart. Starting to study ARM core (Cortex M3) I have found out that it is not that simple. So is it possible at all to write own code without ready to use peripheral libraries in reasonable time. I work with the same attitude when working with 8/16 bitters, with the STM32 working ''without ready to use peripheral libraries'' would be folly, there is just too much to miss. Just look at a port initiaize which in an 8 bitter (at least those I know) is set (a) bit(s) in a SFR, here you have 4 or more SFRs to set Erik
2012-09-24 11:44 AM
1) I've opted to dump everything in one directory for simplicity's sake. Under normal IDE's I'd use libraries and directory trees. The goal here was to make sure everything needed was there, and didn't have a whole lot of path or library dependencies. Basically if you have Yagarto set up you can make this.
2) Yes you can do things at a register/bit level if you want, and I might do that if I were programming an 8051, but in terms of quickly getting something portable, and not getting lost in the minutia of a specific part I'd stick with the library. I find people coding for the STM32 at the register level spend man-days of wasted time debugging stupid nuance in bits, and sequencing. With the library you can mix-and-match, so using TIM1->CCR1 = 100; is sometimes the efficient way to change a setting, but still use TIM_Init(), TIM_OCInit(), etc to do the heavy lifting. 3) I primarily use Keil/Realview, but use plain text editors (TSE/WordStar) for most command line work. Keil can debug the output from GCC, and also arbitrary code in a device. People seem to use Eclipse a lot for GCC, but personally I don't care for it, or it's project/workspace model. I like Segger J-Link devices for their general usability and function, but also use U-Link devices quite a lot. The ST-LINK used by the Discovery series boards is workable, but not a robust/commercial solution. Consider also Rowley's IDE, I quite liked the 1.6/1.7 version, although I think they hiked the price since then.2012-09-24 11:53 AM
OK, Thanks.
So what library would you recommend? I also plan to use FreeRTOS, although not sure if it is important at stage of library selection.2012-09-24 11:54 AM
i hope stm32 make abook tutorial about using stm32 including basic inforamtion about stm32 mcu it's easy to make it and to find guid book to convert to stm32 mcu.
2012-09-24 12:11 PM
I'd use the standard STM32F2 firmware library, code will be directly portable to F4/F3 parts, and a reasonably simple port from F1 and L1, and perhaps F0 parts.
I ported FreeRTOS to my F2 platform, didn't take much effort. Ahmed: If you're familiar/comfortable with micro processors/controllers the STM32, and the Cortex-Mx family shouldn't be too much of a hurdle. Pick up all the ST documentation, then go to ARM's site and get some technical details on the core. I'd recommend Joseph Yiu's books as a basic starter guide to the platform. Dig through the ST firmware library examples, and cross reference those with the Data Sheet and Reference Manual coverage. The library is covered somewhat in the CHM help files, and the library/initialization concept is used widely across different architectures, so it's not an entirely alien concept/method.2012-09-24 12:22 PM
Hi,
I took a look already at the STM Standard Library. It looks not bad. But now I want to take a step back and make sure I'm OK with a compiler. I told I want to use yagarto GCC. Is it compatible with STM Library and freeRTOS? As I'm working on a number of commercial projects I have no problem to purchase a non open source Compiler. Well as a GCC freak it won't be that easy mentally but it you say commercial tools are much better I can do it. My partners are working with IAR and they quite satisfied. I would prefer to stay with GCC if there is nothing wrong with it.