FreeRTOS Demo in Eclipse Mars and GNU Tools ARM Embedded 5_2_2015q4 for CP-JR ARM7 LPC2368

christianhaller wrote on Wednesday, February 17, 2016:

Hello,
I opended the following project FreeRTOSV8.2.3.exe > FreeRTOS > Demo > ARM7_LPC2368_Eclipse
with current eclipse-cpp-mars-1-win32-x86_64
and GNU Tools ARM Embedded gcc-arm-none-eabi-5_2-2015q4-20151219-win32.exe
and GNU ARM Eclipse Build Tools gnuarmeclipse-build-tools-win64-2.6-201507152002-setup.exe
under Windows 7 x64

While installation I replaced all . by _ because I read that . in path could cause problems.

I get the following error:
Program “arm-elf-gcc” not found in PATH

Resolution from http://stackoverflow.com/questions/20412100/discovery-options-in-eclipse-c-c
Kepler hides “Discovery Options” by default. Go to Window->Preferences-> C/C++ > Property Pages Settings and check display discovery option page. Then, open your project preferences and change arm-elf-gcc to arm-none-eabi-gcc like the rest.

I tested this but I couldn’t find the option.

Resolution from https://wiki.ubuntuusers.de/Archiv/GNUARM-Toolchain/
Das PPA installiert arm-none-eabi-gcc, nicht arm-elf-gcc wie im Rest des Tutorials. Das Target arm-elf wird ab GCC 4.8 nicht mehr unterstützt. In der Bedienung unterscheiden sich arm-none-eabi-gcc und arm-elf-gcc nicht.

GCC after 4.8 no longer support arm-elf-gcc.

What can I do now?

This is my board: http://www.micro4you.com/files/lpc2368/ARM7_LPC2368.pdf
I plan to flash the generated .hex-file via UART-0 with Flash Magic.

Thank you.

edwards3 wrote on Wednesday, February 17, 2016:

Do you have the arm-none-eabi-gcc compiler installed on your host and in the system path? It is not part of the Eclipse install and installed separately.

christianhaller wrote on Wednesday, February 17, 2016:

Yes I wrote: GNU Tools ARM Embedded gcc-arm-none-eabi-5_2-2015q4-20151219-win32.exe

C:\Users\blueicehaller>arm-none-eabi-gcc
arm-none-eabi-gcc: fatal error: no input files
compilation terminated.

Can I get it to work if I create symlink named arm-elf-gcc to gcc-arm-none-eabi ?

edwards3 wrote on Wednesday, February 17, 2016:

That means the compiler is installed. What is the issue you have then? If it is calling arm-elf-gcc but the compiler is arm-none-eabi-gcc then you will need to update the project to use the right compiler.

christianhaller wrote on Wednesday, February 17, 2016:

I believe I found the location where I have to set this, see “Properties for RTOSDemo.png”
I also changed line 60

55 RTOS_SOURCE_DIR=../../../Source
56 DEMO_COMMON_DIR=../../Common/Minimal
57 DEMO_INCLUDE_DIR=../../Common/include
58 UIP_COMMON_DIR=../../Common/ethernet/uIP/uip-1.0/uip
59 
60 CC=arm-none-eabi-gcc      # previous value: arm-elf-gcc
61 OBJCOPY=arm-elf-objcopy
62 LDSCRIPT=lpc2368.ld

Should I change something other than “Compiler invocation command”?

Project > Build Project results in:

23:15:56 **** Incremental Build of configuration arm-none-eabi-gcc for project RTOSDemo ****
make all 
arm-none-eabi-gcc       -c -g -O0 -Tlpc2368.ld -I . -I ../../../Source/include -I ../../../Source/portable/GCC/ARM7_LPC23xx -I ../../Common/include -I ./webserver -I ../../Common/ethernet/uIP/uip-1.0/uip -D ROWLEY_LPC23xx -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer -mthumb-interwork -fno-dwarf2-cfi-asm -fno-strict-aliasing -mthumb main.c -o main.o
main.c:94:22: fatal error: FreeRTOS.h: No such file or directory
compilation terminated.
make: *** [main.o] Error 1
Makefile:137: recipe for target 'main.o' failed

23:15:56 Build Finished (took 405ms)

main.c:94:22: fatal error: FreeRTOS.h: No such file or directory

93 /* Scheduler includes. */
94 #include "FreeRTOS.h"
95 #include "task.h"
96 #include "queue.h"
97 #include "semphr.h"

What I found is “FreeRTOSConfig.h” - is this the missing file?

Makefile:137: recipe for target 'main.o' failed
125 all: RTOSDemo.bin
126 
127 RTOSDemo.bin : RTOSDemo.hex
128 	$(OBJCOPY) RTOSDemo.elf -O binary RTOSDemo.bin
129 	 
130 RTOSDemo.hex : RTOSDemo.elf
131 	$(OBJCOPY) RTOSDemo.elf -O ihex RTOSDemo.hex
132 
133 RTOSDemo.elf : $(THUMB_OBJS) $(ARM_OBJS) boot.s Makefile
134 	$(CC) $(CFLAGS) $(ARM_OBJS) $(THUMB_OBJS) $(LIBS) boot.s $(LINKER_FLAGS) 
135 
136 $(THUMB_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h
137 	$(CC) -c $(CFLAGS) -mthumb $< -o $@
138 
139 $(ARM_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h
140 	$(CC) -c $(CFLAGS) $< -o $@

Also I found the following: http://gnutoolchains.com/arm-elf/
Should I test this or another older arm-elf-gcc?

christianhaller wrote on Sunday, February 21, 2016:

Please help. I can’t compile.

woops_ wrote on Sunday, February 21, 2016:

The web link to the compiler now goes here http://www.gnuarm.com/