Hello,

I am currently working on an emmc driver for the Raspberry Pi, and I am trying to mount the SD card using libblock on RTEMS GIT HEAD.

To mount the SD card I am doing:

1. rtems_io_register_driver (by calling my driver with CONFIGURE_APPLICATION_EXTRA_DRIVERS on hello sample)

2. rtems_filesystem_make_dev_t to get the device file

3.  rtems_disk_io_initialize

4. rtems_disk_create_phys

Up until this point everything seems good.

Next I try to read the SD card partition table with rtems_bdpart_register_from_disk, and for that I add an include for rtems/bdpart.h

When I hit compile, the result seems to point at a linker problem (conflict with dummy.o):

(..)
Making all in hello
gmake[6]: Entering directory `/home/bison/RTEMS/arm/raspberry_pi/b-rtems4.11/arm-rtems4.11/c/raspberrypi/testsuites/samples/hello' arm-rtems4.11-gcc -B../../../../../raspberrypi/lib/ -specs bsp_specs -qrtems -DHAVE_CONFIG_H -I. -I/home/bison/RTEMS/code/c/src/../../testsuites/samples/hello -I.. -mcpu=arm1176jzf-s -O2 -g -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT init.o -MD -MP -MF .deps/init.Tpo -c -o init.o /home/bison/RTEMS/code/c/src/../../testsuites/samples/hello/init.c
mv -f .deps/init.Tpo .deps/init.Po
arm-rtems4.11-gcc -B../../../../../raspberrypi/lib/ -specs bsp_specs -qrtems -mcpu=arm1176jzf-s -O2 -g -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -mcpu=arm1176jzf-s -o hello.exe init.o ../../../../../raspberrypi/lib/librtemscpu.a(dummy.o): In function `_Thread_Idle_body': /home/bison/RTEMS/arm/raspberry_pi/b-rtems4.11/arm-rtems4.11/c/raspberrypi/cpukit/libmisc/../../cpukit/../../../raspberrypi/lib/include/rtems/confdefs.h:849: multiple definition of `_Thread_Idle_body' init.o:/home/bison/RTEMS/arm/raspberry_pi/b-rtems4.11/arm-rtems4.11/c/raspberrypi/testsuites/samples/hello/../../../../../raspberrypi/lib/include/rtems/confdefs.h:849: first defined here ../../../../../raspberrypi/lib/librtemscpu.a(dummy.o): In function `_Thread_Get_executing': /home/bison/RTEMS/arm/raspberry_pi/b-rtems4.11/arm-rtems4.11/c/raspberrypi/cpukit/libmisc/../../cpukit/../../../raspberrypi/lib/include/rtems/score/thread.h:632: multiple definition of `__getreent' init.o:/home/bison/RTEMS/arm/raspberry_pi/b-rtems4.11/arm-rtems4.11/c/raspberrypi/testsuites/samples/hello/../../../../../raspberrypi/lib/include/rtems/score/thread.h:632: first defined here ../../../../../raspberrypi/lib/librtemscpu.a(dummy.o): In function `_Thread_Idle_body': /home/bison/RTEMS/arm/raspberry_pi/b-rtems4.11/arm-rtems4.11/c/raspberrypi/cpukit/libmisc/../../cpukit/../../../raspberrypi/lib/include/rtems/confdefs.h:849: multiple definition of `_POSIX_Threads_Initialize_user_threads_p' init.o:/home/bison/RTEMS/arm/raspberry_pi/b-rtems4.11/arm-rtems4.11/c/raspberrypi/testsuites/samples/hello/../../../../../raspberrypi/lib/include/rtems/confdefs.h:849: first defined here ../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.data+0x0): multiple definition of `_RTEMS_tasks_Initialize_user_tasks_p'
init.o:(.data+0x0): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.rodata+0x0): multiple definition of `Configuration'
init.o:(.rodata+0x0): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.data+0x4): multiple definition of `rtems_maximum_priority'
init.o:(.data+0x4): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.data+0x8): multiple definition of `rtems_minimum_stack_size'
init.o:(.data+0x8): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o): In function `_Thread_Get_executing': /home/bison/RTEMS/arm/raspberry_pi/b-rtems4.11/arm-rtems4.11/c/raspberrypi/cpukit/libmisc/../../cpukit/../../../raspberrypi/lib/include/rtems/score/thread.h:632: multiple definition of `Configuration_POSIX_API' init.o:/home/bison/RTEMS/arm/raspberry_pi/b-rtems4.11/arm-rtems4.11/c/raspberrypi/testsuites/samples/hello/../../../../../raspberrypi/lib/include/rtems/test.h:73: first defined here ../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.data+0xc): multiple definition of `Configuration_RTEMS_API'
init.o:(.data+0xc): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.data+0x3c): multiple definition of `Device_drivers'
init.o:(.data+0x3c): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.data+0x6c): multiple definition of `Initialization_tasks'
init.o:(.data+0x6c): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.bss+0x38): multiple definition of `rtems_malloc_dirty_helper' init.o:/home/bison/RTEMS/code/c/src/../../testsuites/samples/hello/init.c:47: first defined here ../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.rodata+0x74): multiple definition of `rtems_malloc_extend_handler'
init.o:(.rodata+0xc8): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.bss+0x3c): multiple definition of `rtems_malloc_statistics_helpers' init.o:/home/bison/RTEMS/arm/raspberry_pi/b-rtems4.11/arm-rtems4.11/c/raspberrypi/testsuites/samples/hello/../../../../../raspberrypi/lib/include/rtems/score/thread.h:632: first defined here ../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.data+0x88): multiple definition of `RTEMS_Malloc_Heap'
init.o:(.data+0x88): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.rodata+0x78): multiple definition of `_Scheduler_FIXME_thread_priority_queues_are_broken'
init.o:(.rodata+0xcc): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.data+0x8c): multiple definition of `_Scheduler'
init.o:(.data+0x8c): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.rodata+0x7c): multiple definition of `rtems_filesystem_root_configuration'
init.o:(.rodata+0xd0): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.rodata+0x90): multiple definition of `rtems_filesystem_table'
init.o:(.rodata+0xec): first defined here
/home/bison/RTEMS/arm/tools/rtems-4.11_arm/lib/gcc/arm-rtems4.11/4.8.2/../../../../arm-rtems4.11/bin/ld: Warning: size of symbol `rtems_filesystem_table' changed from 24 in init.o to 16 in ../../../../../raspberrypi/lib/librtemscpu.a(dummy.o) ../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.bss+0x40): multiple definition of `rtems_telnetd_maximum_ptys'
init.o:(.bss+0x90): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.data+0xd0): multiple definition of `rtems_libio_number_iops'
init.o:(.data+0xcc): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.rodata+0xa0): multiple definition of `rtems_fs_init_helper'
init.o:(.rodata+0x104): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.rodata+0xa4): multiple definition of `rtems_libio_exit_helper'
init.o:(.rodata+0x108): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.rodata+0xa8): multiple definition of `rtems_libio_post_driver_helper'
init.o:(.rodata+0x10c): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.rodata+0xac): multiple definition of `rtems_libio_init_helper'
init.o:(.rodata+0x110): first defined here
../../../../../raspberrypi/lib/librtemscpu.a(dummy.o):(.data+0x7c): undefined reference to `main'
collect2: error: ld returned 1 exit status
(..)

Any clue of what may be the problem?

--André Marques.

_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel

Reply via email to