Page 1 of 2
GCC errors while compiling demos
Posted: Sat May 04, 2013 1:58 am
by fjrg76
Hi
While trying to compile the ChibioOS demos I got the same error among them. First I tried inside Eclipse, and then in a console (Win 7), and the error is the same:
Code: Select all
C:\Development\ChibiOS_2.4.3\demos\ARMCM3-STM32F100-DISCOVERY>make
[b]El sistema no puede encontrar la ruta especificada[/b]. (Translation: System can't find the path.)
Compiler Options
arm-none-eabi-gcc -c -mcpu=cortex-m3 -O0 -ggdb -fomit-frame-poi
ections -fdata-sections -fno-common -Wall -Wextra -Wstrict-pro
=build/lst/ -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_I
MP -MF .dep/build.d -I. -I../../os/ports/common/ARMCMx/CMSIS/in
ports/common/ARMCMx -I../../os/ports/GCC/ARMCMx -I../../os/port
2F1xx -I../../os/kernel/include -I../../test -I../../os/hal/inc
al/platforms/STM32F1xx -I../../os/hal/platforms/STM32 -I../../o
TM32/GPIOv1 -I../../os/hal/platforms/STM32/USBv1 -I../../os/hal
RTCv1 -I../../boards/ST_STM32VL_DISCOVERY -I../../os/various ma
ECHO está desactivado. (Translation: ECHO is disabled.)
mkdir -p build/obj
[b]La sintaxis del comando no es correcta.[/b] (Translation: Command syntaxis is not correct.)
make: *** [build] Error 1
C:\Development\ChibiOS_2.4.3\demos\ARMCM3-STM32F100-DISCOVERY>
Some facts:
This is my first time with this OS
OS guest: Win7
Toolchain: Code Sourcery -> gcc version 4.7.2 (Sourcery CodeBench Lite 2012.09-63)
What am I missing? Shure it's a silly mistake.
Thank you!!
Re: GCC errors while compiling demos
Posted: Sat May 04, 2013 5:03 am
by Abhishek
Check if your PATH variable has been set correctly. type PATH on the command prompt and you should see somewhere:
C:\Program Files (x86)\... Sourcery G++ Lite\bin or something of that sort.
If not, you will have to manually add it to your PATH using PATH <path-to-code-sourcery>;%PATH% .
Secondly, to build with CodeSourcery, the command to be used is 'cs-make' and not 'make'. The make might be due to another compiler you have installed on the system.
Try out the changes and let us know.
Regards
Abhishek
Re: GCC errors while compiling demos
Posted: Sun May 05, 2013 2:44 am
by fjrg76
Hi
My path looks like:
C:\ARMGNU\bin;C:\Ruby200\bin;c:\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Archivos de programa\Flash Magic;C:\gtk2.24;C:\Archivos de programa\Calibre2\
As seen, the very first entry is the Code Sourcery tool chain.
An interestig fact is that I downloaded the ChibiStudio and it compiled the demos off-the-shelf. Then I moved a project out the main tree, I updated the Makefile accordingly, and it compiled again.
ChibiStudio includes its own toolchain (Yagarto), so as Abhishek said, it might a toolchain's path. I also tried with "cs-make" and I still had the same problem.
Code: Select all
C:\ChibiStudio\ARMCM3-STM32L152-DISCOVERY>[b]cs-make --version[/b]
[i]GNU Make (Sourcery CodeBench Lite 2012.09-63) 3.81[/i]
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-pc-mingw32
C:\ChibiStudio\ARMCM3-STM32L152-DISCOVERY>
Last interesting fact so far is that although I can compile with "make" or "cs-make", neither of them can execute a "make clean". A quick and dirt workaround is to "touch" the Makefile.
By the way, how can I now the binary size in bytes? Playing around with FreeRTOS the binary size was 52KB, even without any thread coded !! Maybe the real size is not as bigger as that, so I'm pretty shure there might a way to know it.
Thank you!!
Re: GCC errors while compiling demos
Posted: Sun May 05, 2013 6:58 am
by Giovanni
Hi,
Just look at the size of the compiled size ch.bin, the size of that file is the whole size in Flash. Alternatively you can look into the ch.map file which will give all details about memory usage.
I still think your problem is caused by the make program, ChibiStudio works because it *enforces* the use of its internal make.
Giovanni
Re: GCC errors while compiling demos
Posted: Wed May 08, 2013 12:53 am
by fjrg76
Hi
I'm still not able to do a "make clean", however I can compile and upload my code, which is most important.
Yes, I figure out that the .bin file is closed to the soruce size. Now you confirm my suspects.
Thank you for your time and effort !!
Re: GCC errors while compiling demos
Posted: Wed May 08, 2013 6:34 am
by fjrg76
Hi
While still trying to make the "make" command to work I realized that this is not a PATH problem 'cause even with the whole path written the problem is still there:
Code: Select all
C:\ChibiOS_2.4.3\demos\ARMCM3-GENERIC-KERNEL>c:\ChibiStudio\tools\yagarto-tools\bin\make
El sistema no puede hallar la ruta especificada.
Compiler Options
arm-none-eabi-gcc -c -mcpu=cortex-m3 -O2 -ggdb -fomit-frame-pointer -ffunction-s
ections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms
=build/lst/ -DSTM32F10X_MD -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTE
RWORKING -MD -MP -MF .dep/build.d -I. -I../../os/ports/common/ARMCMx/CMSIS/inclu
de -I../../os/ports/common/ARMCMx -I../../os/ports/GCC/ARMCMx -I../../os/ports/G
CC/ARMCMx/STM32F1xx -I../../os/kernel/include -I../../os/various main.c -o main.o
ECHO está desactivado.
mkdir -p build/obj
La sintaxis del comando no es correcta.
make: *** [build] Error 1
C:\ChibiOS_2.4.3\demos\ARMCM3-GENERIC-KERNEL>
However, as I said before, inside the "ChibiosStudio" workspace the "make" command works as expected. Any idea?
Or even better, may you lead me to the instructables for porting the projects in the ChibiOS tree to the ChibiosStudio one?
Thank you!!
Re: GCC errors while compiling demos
Posted: Wed May 08, 2013 8:21 am
by Giovanni
Because ChibiStudio *enforces* its internal make.exe.
Remove the defective make or reorder your PATH variable.
Giovanni
Re: GCC errors while compiling demos
Posted: Fri May 10, 2013 2:44 am
by fjrg76
Hi
I deleted a CodeBlocks installation that in turns installed MinGW, and I still am not able to compile outside ChibiStudio workspace. Nevertheless, it's time to move on, I think I can live with this situation.
Thank you!!
Re: GCC errors while compiling demos
Posted: Fri May 10, 2013 9:03 am
by marcinj7
Hi
The problem is with the last command mkdir -p build/obj.
Check if mkdir create this folder, if not windows 7 don't allow mkdir to create it.
Re: GCC errors while compiling demos
Posted: Sat May 11, 2013 6:47 am
by fjrg76
marcinj7 wrote:Hi
The problem is with the last command mkdir -p build/obj.
Check if mkdir create this folder, if not windows 7 don't allow mkdir to create it.
Sadly it doesn't compile the projects in XP as well (from the command line; inside ChibiStudio-Eclipse it does). But I really don't need to compile from the command line, so it's ok doing it from inside Eclipse.
Thank you!!