2011-12-03 04:55 AM
Hi,
I'm using STM32f205RB with codesourcery g++ compiller. I need startup file written in c language which includes vector table and interrupt handlers. In example projects there are only startup.s files.2011-12-03 10:38 AM
''I need startup file written in c language which includes vector table and interrupt handlers''
Why?''In example projects there are only startup.s files''
So why not use them??
2011-12-03 01:25 PM
You'd think if it were remotely appropriate for it to be in C that it would already exist in that in form?
The linker works with object files, assemble the S file, and link it in. Learn to use the tools, and the requirements of the ARM Cortex-M3 in regard to it's vectors and there placement. Understand the startup requirements of G++, and if the C runtime startup requirements are the different, or the same.2011-12-04 11:43 PM
Thanks for replies,
I wrote it myself. The file's attached if needed. ________________ Attachments : startup.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtWm&d=%2Fa%2F0X0000000aRI%2F7cYyTErb.U8uoSDTsVQBLZ2FV8UB5SBEpMWqlGk36as&asPdf=false2011-12-05 03:26 PM
That's pretty interesting. I use the standard .s file like everyone else, but I think what you've done is interesting. One question: is it for the F1x or F2x processors? This discussion is about the 2xx however your attached file says:
// startup.c - Boot code for STM32F10x Arm Cortex-M3 microcontrollers // Copyright (c) 2007-2008 Bilkon Bilgisayar Kontrollu Cihazlar Ltd.Sti
Which processor did you use this file for? Thanks.2011-12-09 04:31 AM
Interrupt handler names give out it's stm32f2xx. Other than those, all arm-cortex-m3 have the same startup code anyways.
2011-12-10 11:43 AM
I have also been using C files instead of assembly, at least for the vector table, for STM32F1xx. It actually worked better using C in my case.
https://gitorious.org/dsonano/dso-firmware/blobs/master/DS0201_LIB/source/stm32f10x_vector.c It seems like ST used C in IAR examples, but assembly in GCC examples. The above file has some modifications so that it builds both with IAR and GCC.2011-12-11 10:30 PM
> From: Tormod
> It actually worked better using C in my case.
What do you mean by this?2011-12-14 08:13 AM
Hi Frank,
I copied that explanation header from my another file, so I made a mistake it must be like that;// startup.c - Boot code for STM32F2xx Arm Cortex-M3 microcontrollers// Copyright (c) 2011-2012 Bilkon Bilgisayar Kontrollu Cihazlar Ltd.Sti
2011-12-14 08:20 AM
Yes, largely the same except for interrupt handler orders.