This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Redboot compilation problems
- From: Paul Chavent <paul dot chavent at free dot fr>
- To: ecos-patches at sources dot redhat dot com
- Date: Fri, 11 Jan 2008 13:46:47 +0100
- Subject: Redboot compilation problems
Good morning.
When i compile redboot i get this error :
8<-------------------------------------
make -r -C redboot/current build
make[1]: Entering directory `/opt/gba/ecos/untitled_build/redboot/current'
arm-thumb-elf-gcc -c -I/opt/gba/ecos/untitled_install/include
-I/home/paul/Gba/sources/ecos/packages/redboot/current
-I/home/paul/Gba/sources/ecos/packages/redboot/current/src
-I/home/paul/Gba/sources/ecos/packages/redboot/current/tests -I.
-I/home/paul/Gba/sources/ecos/packages/redboot/current/src/
-finline-limit=7000 -mthumb-interwork -Wall -Wpointer-arith
-Wstrict-prototypes -Winline -Wundef -g -O2 -ffunction-sections
-fdata-sections -fno-exceptions -Wp,-MD,src/main.tmp -o
src/redboot_main.o
/home/paul/Gba/sources/ecos/packages/redboot/current/src/main.c
make[1]: Leaving directory `/opt/gba/ecos/untitled_build/redboot/current'
/home/paul/Gba/sources/ecos/packages/redboot/current/src/main.c: In
function 'cyg_start':
make: Leaving directory `/opt/gba/ecos/untitled_build'
/home/paul/Gba/sources/ecos/packages/redboot/current/src/main.c:397:
error: lvalue required as left operand of assignment
/home/paul/Gba/sources/ecos/packages/redboot/current/src/main.c: In
function 'do_go':
/home/paul/Gba/sources/ecos/packages/redboot/current/src/main.c:603:
error: lvalue required as left operand of assignment
make[1]: *** [src/main.o.d] Error 1
make: *** [build] Error 2
8<-------------------------------------
Gcc is
8<-------------------------------------
arm-thumb-elf-gcc -v
Using built-in specs.
Target: arm-thumb-elf
Configured with: /home/paul/Gba/sources/gcc-4.2.2/configure
--prefix=/opt/gba/xtools --target=arm-thumb-elf --with-cpu=arm7tdmi
--disable-shared --disable-threads --disable-nls --disable-__cxa_atexit
--enable-multilib --enable-languages=c,c++ -v
Thread model: single
gcc version 4.2.2
8<-------------------------------------
The atached patch solve this problem.
Thanks for your comments.
diff -abBru ecos.modif/packages/redboot/current/src/main.c ecos.orig/packages/redboot/current/src/main.c
--- ecos.modif/packages/redboot/current/src/main.c 2007-12-12 12:29:44.000000000 +0100
+++ ecos.orig/packages/redboot/current/src/main.c 2006-07-20 22:27:47.000000000 +0200
@@ -394,7 +394,7 @@
CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
// set up a temporary context that will take us to the trampoline
- HAL_THREAD_INIT_CONTEXT(workspace_end,
+ HAL_THREAD_INIT_CONTEXT((CYG_ADDRWORD)workspace_end,
breakpoint, trampoline,0);
// switch context to trampoline (get GDB stubs started)
@@ -600,7 +600,7 @@
HAL_ICACHE_INVALIDATE_ALL();
HAL_DCACHE_INVALIDATE_ALL();
// set up a temporary context that will take us to the trampoline
- HAL_THREAD_INIT_CONTEXT(workspace_end,
+ HAL_THREAD_INIT_CONTEXT((CYG_ADDRWORD)workspace_end,
entry, trampoline, 0);
// switch context to trampoline