Environment and Compiler for building STM32f2xx-based projects - General Discussion - Netduino Forums
   
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

Environment and Compiler for building STM32f2xx-based projects

stm32f2xx arm gcc eclipse make error 1

  • Please log in to reply
6 replies to this topic

#1 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 22 May 2013 - 06:09 PM

Hi

I'm building a simple C program based on the STM32F2xx peripheral library examples. The program is meant to flash the onboard LED on my Netduino board. 

 

I've set up a environment using:

Eclipse Juno C/C++

GNU ARM Eclipse plugin (CDT)

LaunchPad GNU Tools for ARM (has Cross GCC compiler)

 

I'm working in a 64-bit windows 7 system. 

 

I build the project in Eclipse and keep getting the error:

Make: *** [<project name>] Error 1

 

I can't afford to buy a commercial tool. Does anyone have any recommendations on alternatives I could try out?

 

I have checked out CooCox CoIDE, but it only supports projects for STM32F1/F4 MCUs. I've also tried building the project in the command-line (though I might have used faulty syntax, as I have absolutely no experience with it).

 

attached is my main program (was not allowed to upload .h and .c files)

Attached Files



#2 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 22 May 2013 - 08:38 PM

The CooCox IDe also seems to support STM32F0 (although not much help to you with your board).

 

Have you had a look at Hussam Al-Hertani's blog.  That talks about setting up Eclipse and GCC.  I'd have thought all you should need to do is to get the correct compiler flags for your chipset.

 

If you are looking for a solution for small programs (less than 8KB) then have a look at IAR's environment.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#3 Bi Qin

Bi Qin

    Member

  • Members
  • PipPip
  • 23 posts

Posted 23 May 2013 - 02:35 PM

obviously you made some mistake while setting up the eclipse.

there should not be any error about "Make" command,as you don't need to write makefile for such a building.

 

I think all you need can be found here:http://www.stf12.org...opers/ODeV.html



#4 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 24 May 2013 - 11:19 AM

 

[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]obviously you made some mistake while setting up the eclipse.[/color]

Thats what I thought to. Thank you for the link to ODeV.

I've installed the package and it manages to compile the template project, generating a .elf file. Does this file contain the whole pre-compiled project? 



#5 Bi Qin

Bi Qin

    Member

  • Members
  • PipPip
  • 23 posts

Posted 24 May 2013 - 02:45 PM

Thats what I thought to. Thank you for the link to ODeV.

I've installed the package and it manages to compile the template project, generating a .elf file. Does this file contain the whole pre-compiled project? 

Yes,you can use the elf file with GDB for debug.

Or you can use below command to generate .hex file for burning(using st-link utitily or something similar)

arm-none-eabi-objcopy.exe -O ihex Yourfilename.elf Yourfilename.hex


#6 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 26 May 2013 - 11:23 AM

[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]Yes,you can use the elf file with GDB for debug.[/color]

Or you can use below command to generate .hex file for burning(using st-link utitily or something similar)

arm-none-eabi-objcopy.exe -O ihex Yourfilename.elf Yourfilename.hex

Great that worked alright. Again thank you so much for the link to ODeV! Amazing resource :)



#7 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 30 May 2013 - 12:15 PM

So I ran into some trouble with ODeV when writing a program where I combine C and C++. 

 

I keep getting "expected '=', ',', ';', 'asm' or '__attribute__' before '*' token" when building. ODeV does offer a C++ extension (FreeRTOS_EC) and there is a downloadable project for a STM32F1xx device using this extension (Cortex_STM32F1xx_CPP_Template).

 

I added FreeRTOS_EC as a Linked Resource in my project, but it didn't really do any difference. When further inspecting and comparing  the preferences of the I noticed that both projects used the same Tool Chain with the same Used Tools. However only the F1xx project has the C++ Compiler (ARM Sourcery Windows GCC C++ Compiler) listed in the Discovery Options Tools list. 

For some reason my project does not understand that it needs this compiler to build the code. 

 

I tried applying all available discovery profiles, but none of them adds the C++ Compiler to the tools list

 

Does anyone have any suggestions on other things I could try? 







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.