Page 2 of 2

Re: Eclipse - Chibios setup problem

Posted: Fri Jun 22, 2012 5:40 pm
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.

Re: Eclipse - Chibios setup problem

Posted: Fri Jun 22, 2012 7:35 pm
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

Re: Eclipse - Chibios setup problem

Posted: Fri Jun 22, 2012 9:11 pm
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 ;)

Re: Eclipse - Chibios setup problem

Posted: Sun Jun 24, 2012 5:55 am
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

Re: Eclipse - Chibios setup problem

Posted: Wed Jul 11, 2012 10:04 am
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

Re: Eclipse - Chibios setup problem

Posted: Tue Jul 24, 2012 8:38 pm
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 :)