Demo - Projects couldn't be created within Win7 Environment

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

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
THaala
Posts: 12
Joined: Tue Dec 06, 2011 10:27 pm

Demo - Projects couldn't be created within Win7 Environment

Post by THaala »

Dear Users,

i'm a newbie and try to get started with ChibiOS on my two boards Olimex-STM32F103P and STM32F4x7Discovery.
I have setup newest Eclipse Environment under Windows7 with Codesourcery Lite++ Toolchain.

I tried to build the demo projects ARMCM4-STM32F407-DISCOVERY and ARMCM3-STM32F103-G++
but none of them could be complied. :(
I have exactly done the way described here:
http://www.chibios.org/dokuwiki/doku.ph ... s:eclipse2

After some investigation i found that the first errors starting in rule files rule.mk in folder
..\..\os\ports\GCC\ARMCMx\STM32F4xx the rules cannot work within windows:


$(OBJDIR):
mkdir $(OBJDIR)
(when OBJDIR is "build/obj")
$(LSTDIR):
mkdir $(LSTDIR)
(when LSTDIR is "build/lst")

DOSbox>mkdir build/obj
syntax error

the clean rule seems also work only with an linux or cygwin environment:

    clean:
    @echo Cleaning
    -rm -fR .dep $(BUILDDIR)
    @echo Done


after i created this Folders manually i was able to compile the whole project but only within a shell. The same try within Eclipse tells always:


    **** Build of configuration Debug for project ARMCM4-STM32F407-DISCOVERY ****

    cs-make all
    'Building file: ../main.c'
    'Invoking: ARM Sourcery Windows GCC C Compiler'
    arm-none-eabi-gcc -O0 -Wall -Wa,-adhlns="main.o.lst" -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o"main.o" "../main.c"
    ../main.c:21:16: fatal error: ch.h: No such file or directory
    compilation terminated.
    cs-make: *** [main.o] Error 1

am i the only guy who si trying to test it with a windows Environment - or maybe i did a great misstake ?
Maybe i forgot to install some additional software ?

with kind regards,
THaala
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Demo - Projects couldn't be created within Win7 Environm

Post by Giovanni »

Hi,

The Makefiles are meant to be cross-platform so Windows command are not used.

You need Unix-like commands in order to use them, either Cygwin or YAGARTO tools are OK. You don't need to use Makefiles from a Cygwin shell, just to have the commands installed and reachable from you PATH environment variable.

Giovanni
THaala
Posts: 12
Joined: Tue Dec 06, 2011 10:27 pm

Re: Demo - Projects couldn't be created within Win7 Environm

Post by THaala »

Hello Giovanni,

many thanks for you fast and competent advice.
After i added The Yagarto-Tools-Bin in front of my path the minor problems with "rm-command" and "mkdir-command" disapeared.

The second but major problem be resistent.
i found out that the Howto doesnt match with my installation.
i must use the following way to add the project to my Workspace:

choosing1.png
choosing1.png (23.38 KiB) Viewed 5608 times


choosing2.png
choosing2.png (35.28 KiB) Viewed 5608 times


after doing so - the makefile is woking fine :D

Thank you
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Demo - Projects couldn't be created within Win7 Environm

Post by Giovanni »

I never used that method, in the first picture, if you select "C project" then you should be able to continue as described in the guide.

Giovanni
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: Demo - Projects couldn't be created within Win7 Environm

Post by mobyfab »

This is how I did with win7 x64

installed code sourcery, cygwin with make, then I installed the "fixed" make.exe binary and its dll since the one provided doesn't work well

You just need to put the cygwin and gcc path in eclipse to make it work.

yagarto tools don't work well, same with cs-make.

I have atached the fixed make and it dll. Just unzip it in the cygwin\bin folder.
Attachments
make-cygwin-fixed.zip
(191.13 KiB) Downloaded 565 times
Post Reply