Nios2 problems when building tests
Roger Dahlqvist
ruppe at kth.se
Fri Mar 20 18:02:21 UTC 2009
Hello,
I'm currently trying to buils rtems for Nios2. I'm using the CVS head as of
March 16, and Newlib-1.16.0. As a starting point I wish to use the
nios2_iss bsp.
Both Newlib and RTEMS seem to build without any problems, however when the
tests are built for the bsp, I get some errors.
As I see it, some libraries are for some reason not included then linking.
I've also noticed that librtemsbsp.a is empty, and that doesn't seem right.
My guess is that there is something I've missed in my wrapper script for
the Altera tools and/or there might be something wrong with the bsp
configuration,
Has anyone successfully built the tests for the nios2_iss bsp? ("hello" for
example).
Any help or pointers are very much appreciated.
Thanks
/Roger
* My current gcc wrapper for nios2-rtems-gcc, used for building newlib and
rtems
**********************************************************************************************
#!/bin/sh
/opt/altera8.1/nios2eds/bin/nios2-gnutools/H-i686-pc-linux-gnu/bin/nios2-elf-gcc
-nostdinc -isystem
"/home/roger/Skrivbord/workdir/install/nios2-rtems/include" -isystem
"/opt/altera8.1/nios2eds/bin/nios2-gnutools/H-i686-pc-linux-gnu/lib/gcc/nios2-elf/3.4.6/include"
-B "/home/roger/Skrivbord/workdir/install/nios2-rtems/lib/" -msys-lib=c
-msys-crt0="/home/roger/Skrivbord/workdir/install/nios2-rtems/lib/crt0.o"
-DSYSTEM_BUS_WIDTH=32 -D__rtems__ -D__USE_INIT_FINI__ "$@"
* This is part of the error message
**********************************************************************************************
nios2-rtems-gcc -B../../../../../lib/ -B../../../../../nios2_iss/lib/
-specs bsp_specs -qrtems -mno-hw-mul -mno-hw-div -O0 -g -mno-hw-mul
-mno-hw-div -o hello.exe init.o
../../../../../nios2_iss/lib/no-barrier.rel
../../../../../nios2_iss/lib/no-dpmem.rel
../../../../../nios2_iss/lib/no-event.rel
../../../../../nios2_iss/lib/no-msg.rel
../../../../../nios2_iss/lib/no-mp.rel
../../../../../nios2_iss/lib/no-part.rel
../../../../../nios2_iss/lib/no-region.rel
../../../../../nios2_iss/lib/no-signal.rel
../../../../../nios2_iss/lib/no-timer.rel
../../../../../nios2_iss/lib/no-rtmon.rel
../../../../../nios2_iss/lib/no-ext.rel
../../../../../nios2_iss/lib/start.o(.text+0xac): In function
`dcache_init_loop':
: undefined reference to `boot_card'
../../../../../nios2_iss/lib/start.o(.text+0xb4): In function `brto_ev':
: undefined reference to `_exception_vector'
../../../../../nios2_iss/lib/start.o(.text+0xb8): In function `brto_ev':
: undefined reference to `_exception_vector'
../../../../../nios2_iss/lib/start.o(.irq+0x0): undefined reference to
`_exception_vector'
../../../../../nios2_iss/lib/start.o(.irq+0x4): undefined reference to
`_exception_vector'
init.o(.data+0x1c): In function `Init':
/home/roger/Skrivbord/workdir/rtems-090316/c/src/../../testsuites/samples/hello/init.c:32:
undefined reference to `console_initialize'
init.o(.data+0x20):/home/roger/Skrivbord/workdir/rtems-090316/c/src/../../testsuites/samples/hello/init.c:33:
undefined reference to `console_open'
init.o(.data+0x24):/home/roger/Skrivbord/workdir/rtems-090316/c/src/../../testsuites/samples/hello/init.c:33:
undefined reference to `console_close'
init.o(.data+0x28):/home/roger/Skrivbord/workdir/rtems-090316/c/src/../../testsuites/samples/hello/init.c:33:
undefined reference to `console_read'
init.o(.data+0x2c):/home/roger/Skrivbord/workdir/rtems-090316/c/src/../../testsuites/samples/hello/init.c:34:
undefined reference to `console_write'
init.o(.data+0x30):/home/roger/Skrivbord/workdir/rtems-090316/c/src/../../testsuites/samples/hello/init.c:34:
undefined reference to `console_control'
init.o(.data+0x34):/home/roger/Skrivbord/workdir/rtems-090316/c/src/../../testsuites/samples/hello/init.c:34:
undefined reference to `newlib_create_hook'
init.o(.data+0x40): undefined reference to `newlib_delete_hook'
init.o(.data+0xcc): undefined reference to `_CPU_Thread_Idle_body'
init.o(.sdata+0x0): In function `Init':
/home/roger/Skrivbord/workdir/rtems-090316/c/src/../../testsuites/samples/hello/init.c:31:
undefined reference to `rtems_libio_init'
init.o(.sdata+0x4):/home/roger/Skrivbord/workdir/rtems-090316/c/src/../../testsuites/samples/hello/init.c:31:
undefined reference to `open_dev_console'
init.o(.sdata+0x8):/home/roger/Skrivbord/workdir/rtems-090316/c/src/../../testsuites/samples/hello/init.c:31:
undefined reference to `rtems_filesystem_initialize'
init.o(.sdata+0x40): undefined reference to
`_RTEMS_tasks_Initialize_user_tasks_body'
init.o(.rodata+0x0): In function `Init':
/home/roger/Skrivbord/workdir/rtems-090316/c/src/../../testsuites/samples/hello/init.c:31:
undefined reference to `devFS_ops'
/home/roger/Skrivbord/workdir/install/nios2-rtems/lib/mno-hw-mul/libc.a(lib_a-exit.o)(.text+0x28):
In function `exit':
/home/roger/Skrivbord/workdir/newlib-1.16.0/newlib/libc/stdlib/exit.c:65:
undefined reference to `_exit'
/home/roger/Skrivbord/workdir/install/nios2-rtems/lib/mno-hw-mul/libc.a(lib_a-wsetup.o)(.text+0x60):
In function `__swsetup_r':
/home/roger/Skrivbord/workdir/newlib-1.16.0/newlib/libc/stdio/wsetup.c:52:
undefined reference to `_free_r'
/home/roger/Skrivbord/workdir/install/nios2-rtems/lib/mno-hw-mul/libc.a(lib_a-__call_atexit.o)(.text+0x17c):
In function `__call_exitprocs':
/home/roger/Skrivbord/workdir/newlib-1.16.0/newlib/libc/stdlib/__call_atexit.c:89:
undefined reference to `free'
/home/roger/Skrivbord/workdir/install/nios2-rtems/lib/mno-hw-mul/libc.a(lib_a-findfp.o)(.text+0x8c):
In function `__sfmoreglue':
/home/roger/Skrivbord/workdir/newlib-1.16.0/newlib/libc/stdio/findfp.c:86:
undefined reference to `_malloc_r'
/home/roger/Skrivbord/workdir/install/nios2-rtems/lib/mno-hw-mul/libc.a(lib_a-fvwrite.o)(.text+0x188):
In function `__sfvwrite_r':
/home/roger/Skrivbord/workdir/newlib-1.16.0/newlib/libc/stdio/fvwrite.c:147:
undefined reference to `_malloc_r'
/home/roger/Skrivbord/workdir/install/nios2-rtems/lib/mno-hw-mul/libc.a(lib_a-fvwrite.o)(.text+0x3e0):/home/roger/Skrivbord/workdir/newlib-1.16.0/ne
More information about the users
mailing list