Page 1 of 1

Demo - Projects couldn't be created within Win7 Environment

Posted: Tue Dec 06, 2011 11:01 pm
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

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

Posted: Tue Dec 06, 2011 11:16 pm
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

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

Posted: Wed Dec 07, 2011 7:28 pm
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 5611 times


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


after doing so - the makefile is woking fine :D

Thank you

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

Posted: Wed Dec 07, 2011 7:45 pm
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

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

Posted: Sat Dec 10, 2011 12:20 pm
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.