Eclipse - Chibios setup problem

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Larry
Posts: 6
Joined: Thu Jun 07, 2012 4:22 pm

Re: Eclipse - Chibios setup problem

Post by Larry »

After making the change you suggested in Discovery Options (set to automate discovery of paths and symbols & Discovery profile to GCC per project scanner info profile) the default compiler invocation command is just "gcc" and compiler invocation arguments is "-E -P -v -dD "${plugin_state_location}/${specs_file}"". With this setting, everything built without error, but with a couple of warnings:

Description: Error launching external scanner info generator (gcc -E -P -v -dD C:/program-files-arm/ChibiOS_2.4.1/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c -mcpu=cortex-m4 -O2 -mno-thumb-interwork)
Resource: ARMCM4-STM32F407-DISCOVERY
Location: [Discovery Options] page in project properties
Type: C/C++ Problem

and

Description: Program 'gcc' is not found in $PATH
Resource: ARMCM4-STM32F407-DISCOVERY
Location: [Discovery Options] page in project properties
Type: C/C++ Problem


The yagarto installation automatically sets the path to: C:\program-files-arm\yagarto\bin and not having something named "gcc.exe" along that path appears to be the problem.

Candidate gcc executables seem to be:

C:\program-files-arm\yagarto\arm-none-eabi\bin\gcc
or
C:\program-files-arm\yagarto\bin\arm-none-eabi-gcc
or
C:\program-files-arm\yagarto\bin\arm-none-eabi-gcc-4.6.2

Not sure if there is any difference between them, but I changed the compiler invocation command to "arm-non-eabi-gcc.exe" and things built without the above mentioned warnings (the only remaining warning which doesn't seem important is "no return statement in function returning non-void [-Wreturn-type] main.c /ARMCM4-STM32F407-DISCOVERY line 189 C/C++ Problem").

Does this seem correct?

Other than stumbling around CDT, are there any good tutorials which help you understand CDT at a beginners level? Many thanks for your patient help.
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Eclipse - Chibios setup problem

Post by Giovanni »

Any gcc.exe will do, it is used to generate symbols not code.

About the tutorial, I don't know, I learned the hard way :) by experimenting. The CDT help in Eclipse is sometime helpful but "generic", embedded development is not specifically addressed.

I will enhance the guides based on you experience, the "use" part is weak.

Giovanni
pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: Eclipse - Chibios setup problem

Post by pito »

I've tried to install Eclipse Indigo + Yagarto latest + CDT dbg + Atollic STLink dbg latests and run it with stm32vl, f4 and mp3 demos. Based on the user guide and hints from this thread it builds with single warning only. To run the debugger - that is an another story and it seems to me the guide shall be refreshed and focused on both the openocd (0.6.0 for win bin is available with stlink1 and 2) and on the atollic stlink gdb. The stlink with Atollic gdb server requires to use a different usbdriver for stm32vl (v1, not included in the atollic distro) and for stm32f4disco (v2). It seems the openocd binaries for Win:
http://www.freddiechopin.info/en/downlo ... penocd-dev
support both stlink 1 and 2. It would be great to get help from somebody who is familiar with openocd for the above setup, though ;)
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Eclipse - Chibios setup problem

Post by Giovanni »

Probably you missed this post: viewtopic.php?f=3&t=333&start=30#p4400

I haven't tried it yet but he is using it already. I can't use it in the guide until OpenOCD 0.6 is officially released, it is a development version right now.

Giovanni
rubenswerk
Posts: 104
Joined: Wed Feb 22, 2012 11:39 am

Re: Eclipse - Chibios setup problem

Post by rubenswerk »

Hello,

I just wanted to say a big "Thank You" to Giovanni for the great articles about Eclipse setup.
Eclipse was completely new to me, and what I heared from other people, it's quite complex to get it running. That's the reason why I hadn't tried it yet.

Following Giovanni's detailed articles, it took me 2 hours in total to import and compile a ChibiOS project and set up the debugger. Single stepping & breakpoints is a really powerful tool, which will help me a lot. I should have tried this earlier.

Keep up the good work!
Regards, RuWe
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: Eclipse - Chibios setup problem

Post by mobyfab »

FYI, cygwin's make is broken since 3.81.

You need v3.80, or a patched version.

here is the one i'm using:
http://www.sendspace.com/file/tg3sm9

no more errors :)
Post Reply