Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Linking MCU startup file / DFU flashing issue

startup_stm32f2xx.s startup gcc dfu stm32f2xx system configuration

  • Please log in to reply
2 replies to this topic

#1 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 10 May 2013 - 03:01 PM

I'm having trouble getting my MCU to understand the pre-compiled code I flash onto it. Im using the STM32F2xx standard peripheral libraries which comes with some example projects as well as a template for creating your own projects. I'm using a MINGW GCC compiler. Running in the 'cmd' screen (windows 7). I manage to compile my test-project, though I had to move certain library files around to make it work. 
 
I suspect that there is a issue with the 'startup_stm32f2xx.s' file which is supposed to configure clock settings for the microcontroller. 
From main.c of standard peripheral template:
 

 

int main(void) {
/*!< At this stage the microcontroller clock setting is already configured, 
this is done through SystemInit() function which is called from startup
file (startup_stm32f2xx.s) before to branch to application main.
To reconfigure the default setting of SystemInit() function, refer to
system_stm32f2xx.c file */
...
 
How would I go about linking the start-up file to my project? I have one which is supposed to work with gcc. It says "gcc_ride7" in the file directory, but I can't seem to find a line of code linking it to the project. 
 
There might also be a issue with the way I compile my code. I compile writing "gcc main.c" which produces a .exe executable file. DFUSE allowes me to convert this into a .dfu file. When I attempt to flash this onto the board, after erasing the board, the loading-bar finishes in half a second. When I reconnect the board, leaving bootloader-mode, the uploaded code has no effect on the board.
I highly doubt my code is faulty as it is strictly based on one of the example projects designed for the STM32F2xx MCU.  
 
Does anyone have suggestions on things I could try out? 


#2 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 10 May 2013 - 04:54 PM

i _guess_ you wanna use arm gcc compiler, mingw gcc from what i know if for windows apps.

 

iam using coocox as ide, and the newest arm gcc from launchpad.



#3 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 11 May 2013 - 12:01 AM

Quote
Quote
[color=rgb(40,40,40);][font="helvetica;"]iam using coocox as ide, and the newest arm gcc from launchpad.[/color][/font]

Nice, free stuff! :) I'll give them a try. Coocox has compitability with STM32F1xx and F4xx chips. Should probably be a close enough fit for my F2xx device.

Edit:
I was able to import and replace library and core files to the project. However when a new project is created one has to chose a chip. Does this, on the functionality of the IDE, go beyond the libraries the IDE provides/suggests?

Edit2:
I might have found working setup using GCC Tools ARM Embedded, Eclipse, GCC Make and CROSS ARM GNU Plugin. Links:
http://sourceforge.n.../gnuarmeclipse/ CROSS ARM GNU Plugin

http://gnuwin32.sour...ckages/make.htm GCC Make (place "make.exe", "libiconv2.dll", "libintl3.dll" in compiler path.
https://launchpad.net/gcc-arm-embedded GCC ARM compiler





Also tagged with one or more of these keywords: startup_stm32f2xx.s, startup, gcc, dfu, stm32f2xx, system configuration

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.