Eclipse Neon and Intel Port
Hi,
I am trying to install the Eclipse platform to compile freertos for an Intel Galileo 2Gen. I just downloaded the port and the Eclipse Neon for C. I have imported the project and added the include folders from the compiler as no libraries where being loaded:
C:MinGWlibgccmingw324.6.1includec++
C:MinGWlibgccmingw324.6.1includec++mingw32
C:MinGWlibgccmingw324.6.1includec++backward
C:MinGWlibgccmingw324.6.1include
C:MinGWinclude
C:MinGWlibgccmingw324.6.1include-fixed
I also included the include folders of the port.
xxxFreeRTOSSourceinclude
xxxFreeRTOSDemoCommoninclude
I have no include errors but I still find that code is reporting this error on the main_blinky.c file:
Symbol ‘portMAXDELAY’ could not be resolved mainblinky.c /RTOSDemo/Blinky_Demo line 229 Semantic Error
What I am missing?
Thanks
Eclipse Neon and Intel Port
You need to have the chosen port layer in the include path too. In this
case:
FreeRTOS/Source/portable/GCC/IA32_flat
[you are better off using an elf compiler rather than the coff MingW]
Eclipse Neon and Intel Port
I am not sure how to check which compiler I am using. I have installed elf and it is in the path, as described in the Build instructions.
I have added:
C:jordiIDI2016Odsi 1developmentFreeRTOSSourceportableGCCIA32_flat
And the error disapeared but now I am seeing this one:
.space specifies non-absolute value startup.S /RTOSDemo/Support_Files line 126 C/C++ Problem
I also tried adding this folders:
C:jordisoftghost-i686-elf-toolslibgcci686-elf4.8.2include
C:jordisoftghost-i686-elf-toolslibgcci686-elf4.8.2include-fixed
And I got these errors on building the project:
~~~
no such instruction: ‘portfreertosinterruptentry’ RegTest.S /RTOSDemo/FullDemo line 319 C/C++ Problem
no such instruction: ‘portfreertosinterruptexit’ RegTest.S /RTOSDemo/FullDemo line 321 C/C++ Problem
~~~
Which should I have included?
Thanks
Eclipse Neon and Intel Port
You should not need to add the compiler’s include paths manually.
What happens if you try building the project exactly as it is in the
download, without any edits?
Eclipse Neon and Intel Port
Just with the FreeRtos includes i get this:
.space specifies non-absolute value startup.S /RTOSDemo/Support_Files line 126 C/C++ Problem
Eclipse Neon and Intel Port
Well the line in question is:
gdt: .space GDT_BYTESwhere GDT_BYTES is:
#define GDT_ENTRIES 8 #define GDT_ENTRY_SIZE 8 #define GDT_BYTES (GDT_ENTRIES * GDT_ENTRY_SIZE)so at a guess you could try modifying the line to hard code the GDT_BYTES value as such:
gdt: .space 64
Eclipse Neon and Intel Port
That worked. Now the error is gone, but I see new ones:
~~~
Description Resource Path Location Type
no such instruction:
portfreertos_interrupt_entry' RegTest.S /RTOSDemo/Full_Demo line 319 C/C++ Problem
no such instruction:
portfreertosinterruptexit’ RegTest.S /RTOSDemo/Full_Demo line 321 C/C++ Problem
~~~
Eclipse Neon and Intel Port
It would seem that your compiler is not pre-processing the source files
properly – that would explain the previous error too. As the file has
an upper case .S extension then, as long as you assembly the assembly
file with GCC rather than GAS, the pre-processor should replace the
macro it is complaining about with inline asm code.
Eclipse Neon and Intel Port
How can I check which compiler I am using? May this mean that I have MinGW running?
Eclipse Neon and Intel Port
The first thing to do is look at the output generated by the compiler as
the project builds – you should be able to see the command line. If it
is just “gcc” then you are most likely using MingW. You can of course
rename the MingW installation directory to see if you then get an error
that the project cannot find the compiler.
Eclipse Neon and Intel Port
I was calling the wrong compiler. I just corrected it but I am still getting the same error. This is the console output:
~~~
12:13:06 **** Incremental Build of configuration Debug for project RTOSDemo ****
Info: Internal Builder is used for build
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo\FullDemo” “-IC:\PATH\eclispeneonc\RTOSDemo\SupportFiles” “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSLabs160112\FreeRTOS\Source\include” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSv9.0.0\FreeRTOS\Demo\Common\include” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -O0 -g3 -Wall -c -fmessage-length=0 -o “BlinkyDemo\mainblinky.o” “..\BlinkyDemo\mainblinky.c”
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo\FullDemo” “-IC:\PATH\eclispeneonc\RTOSDemo\SupportFiles” “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSLabs160112\FreeRTOS\Source\include” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSv9.0.0\FreeRTOS\Demo\Common\include” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -O0 -g3 -Wall -c -fmessage-length=0 -o “SupportFiles\HPET.o” “..\SupportFiles\HPET.c”
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo\FullDemo” “-IC:\PATH\eclispeneonc\RTOSDemo\SupportFiles” “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSLabs160112\FreeRTOS\Source\include” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSv9.0.0\FreeRTOS\Demo\Common\include” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -O0 -g3 -Wall -c -fmessage-length=0 -o “SupportFiles\freestandingfunctions.o” “..\SupportFiles\freestandingfunctions.c”
..SupportFilesfreestandingfunctions.c:77:2: warning: #warning The functions in this file are very basic, and not optimised. [-Wcpp]
#warning The functions in this file are very basic, and not optimised.
^
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo\FullDemo” “-IC:\PATH\eclispeneonc\RTOSDemo\SupportFiles” “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSLabs160112\FreeRTOS\Source\include” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSv9.0.0\FreeRTOS\Demo\Common\include” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -O0 -g3 -Wall -c -fmessage-length=0 -o “FullDemo\mainfull.o” “..\FullDemo\mainfull.c”
i686-elf-as “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -o “SupportFiles\startup.o” “..\SupportFiles\startup.S”
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo\FullDemo” “-IC:\PATH\eclispeneonc\RTOSDemo\SupportFiles” “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSLabs160112\FreeRTOS\Source\include” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSv9.0.0\FreeRTOS\Demo\Common\include” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -O0 -g3 -Wall -c -fmessage-length=0 -o “SupportFiles\printf-stdarg.o” “..\SupportFiles\printf-stdarg.c”
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo\FullDemo” “-IC:\PATH\eclispeneonc\RTOSDemo\SupportFiles” “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSLabs160112\FreeRTOS\Source\include” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSv9.0.0\FreeRTOS\Demo\Common\include” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -O0 -g3 -Wall -c -fmessage-length=0 -o “SupportFiles\galileo-support.o” “..\SupportFiles\galileo-support.c”
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo\FullDemo” “-IC:\PATH\eclispeneonc\RTOSDemo\SupportFiles” “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSLabs160112\FreeRTOS\Source\include” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSv9.0.0\FreeRTOS\Demo\Common\include” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -O0 -g3 -Wall -c -fmessage-length=0 -o “FullDemo\IntQueueTimer.o” “..\FullDemo\IntQueueTimer.c”
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo\FullDemo” “-IC:\PATH\eclispeneonc\RTOSDemo\SupportFiles” “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSLabs160112\FreeRTOS\Source\include” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSv9.0.0\FreeRTOS\Demo\Common\include” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -O0 -g3 -Wall -c -fmessage-length=0 -o main.o “..\main.c”
..main.c: In function ‘prvDisplayAssertion’:
..main.c:254:2: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
printf( “ASSERT: File = %s, Line = %unr”, pcFile, ulLine );
^
i686-elf-as “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -o “FullDemo\RegTest.o” “..\FullDemo\RegTest.S”
..FullDemoRegTest.S: Assembler messages:
..FullDemoRegTest.S:319: Error: no such instruction:
portfreertos_interrupt_entry'
..Full_DemoRegTest.S:321: Error: no such instruction:
portfreertosinterruptexit’
~~~
Eclipse Neon and Intel Port
I can see from your output that you are assembling using i686-elf-as,
you need to use i686-elf-gcc as per the .c files.
Eclipse Neon and Intel Port
When changing from as to gcc I get this:
~~~
12:34:13 **** Incremental Build of configuration Debug for project RTOSDemo ****
Info: Internal Builder is used for build
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -o “SupportFiles\startup.o” “..\Support_Files\startup.S”
path/ghost-i686-elf-tools/bin/../lib/gcc/i686-elf/4.8.2/../../../../i686-elf/bin/ld.exe: cannot find crt0.o: No such file or directory
path/ghost-i686-elf-tools/bin/../lib/gcc/i686-elf/4.8.2/../../../../i686-elf/bin/ld.exe: cannot find -lc
collect2.exe: error: ld returned 1 exit status
~~~
Eclipse Neon and Intel Port
So now it looks like it has compiled and assembled the .c and .S files,
but is failing to link.
Again I would ask, what output do you get if you build the project
without any modifications – as it looks like you may have command line
problems.
Eclipse Neon and Intel Port
The only modifications to the project is adding the following folders to Preferences-C/C++ General/Paths and Symbols/Includes/GNU
C:jordiIDI2016Odsi 1developmentintelFreeRTOSLabs160112FreeRTOSSourceinclude
C:jordiIDI2016Odsi 1developmentintelFreeRTOSv9.0.0FreeRTOSDemoCommoninclude
C:jordiIDI2016Odsi 1developmentFreeRTOSSourceportableGCCIA32_flat
And to Assembly:
C:jordiIDI2016Odsi 1developmentFreeRTOSSourceportableGCCIA32_flat
This is what I see in the console:
~~~
13:04:39 **** Incremental Build of configuration Debug for project RTOSDemo ****
Info: Internal Builder is used for build
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo\FullDemo” “-IC:\PATH\eclispeneonc\RTOSDemo\SupportFiles” “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSLabs160112\FreeRTOS\Source\include” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSv9.0.0\FreeRTOS\Demo\Common\include” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -O0 -g3 -Wall -c -fmessage-length=0 -o “SupportFiles\galileo-support.o” “..\SupportFiles\galileo-support.c”
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo\FullDemo” “-IC:\PATH\eclispeneonc\RTOSDemo\SupportFiles” “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSLabs160112\FreeRTOS\Source\include” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSv9.0.0\FreeRTOS\Demo\Common\include” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -O0 -g3 -Wall -c -fmessage-length=0 -o “SupportFiles\HPET.o” “..\SupportFiles\HPET.c”
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo\FullDemo” “-IC:\PATH\eclispeneonc\RTOSDemo\SupportFiles” “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSLabs160112\FreeRTOS\Source\include” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSv9.0.0\FreeRTOS\Demo\Common\include” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -O0 -g3 -Wall -c -fmessage-length=0 -o main.o “..\main.c”
..main.c: In function ‘prvDisplayAssertion’:
..main.c:254:2: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
printf( “ASSERT: File = %s, Line = %unr”, pcFile, ulLine );
^
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -o “FullDemo\RegTest.o” “..\FullDemo\RegTest.S”
PATH/ghost-i686-elf-tools/bin/../lib/gcc/i686-elf/4.8.2/../../../../i686-elf/bin/ld.exe: cannot find crt0.o: No such file or directory
PATH/ghost-i686-elf-tools/bin/../lib/gcc/i686-elf/4.8.2/../../../../i686-elf/bin/ld.exe: cannot find -lc
collect2.exe: error: ld returned 1 exit status
~~~
Eclipse Neon and Intel Port
I think the linker should have a ‘no start files’ option and/or ‘no
standard library’ option on the command line, but from the output – the
fact its trying to find crt0.o and the c library – it would appear that
is not the case.
Eclipse Neon and Intel Port
Do not use standard start files
No startup or defaul libs
Where not marked. Now they are but I get the same result
~~~
Info: Internal Builder is used for build
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo\FullDemo” “-IC:\PATH\eclispeneonc\RTOSDemo\SupportFiles” “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSLabs160112\FreeRTOS\Source\include” “-IC:\PATH\2016Odsi\01development\intel\FreeRTOSv9.0.0\FreeRTOS\Demo\Common\include” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -O0 -g3 -Wall -c -fmessage-length=0 -o “SupportFiles\GPIOI2C.o” “..\SupportFiles\GPIOI2C.c”
i686-elf-gcc “-IC:\PATH\eclispeneonc\RTOSDemo” “-IC:\PATH\2016Odsi\01development\FreeRTOS\Source\portable\GCC\IA32flat” -o “FullDemo\RegTest.o” “..\FullDemo\RegTest.S”
c:/PATH/ghost-i686-elf-tools/bin/../lib/gcc/i686-elf/4.8.2/../../../../i686-elf/bin/ld.exe: cannot find crt0.o: No such file or directory
c:/PATH/ghost-i686-elf-tools/bin/../lib/gcc/i686-elf/4.8.2/../../../../i686-elf/bin/ld.exe: cannot find -lc
collect2.exe: error: ld returned 1 exit status
~~~
Eclipse Neon and Intel Port
Done it.
Looks like I needed to add the “-nostartfiles -nostdlib” not only to the compile configuration but to the assembler. No It builds without errors.
Thanks
Eclipse Neon and Intel Port
Done it.
Looks like I needed to add the “-nostartfiles -nostdlib” not only to the compile configuration but to the assembler. No It builds without errors.
Thanks