LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 11-28-2014, 07:14 AM   #1
DutchGeek
Member
 
Registered: Sep 2006
Distribution: SuSE, Slackware
Posts: 55

Rep: Reputation: 10
trouble installing cross-compile toolchain on raspberry pi


Hi All,

I have downloaded the cross-compile toolchain of bitthunder and compiled it on RPi. (http://bitthunder.org/docs/toolchain/)

This is needed to build the bitthunder kernel.

However I cannot seem to find the cross-compilers (arm-eabi-bt-*) in the output directory that I specified in the Makefile.

Did anyone have success with installing bitthunder on RPi?

attached is the Makefile
Attached Files
File Type: txt Makefile.txt (4.8 KB, 39 views)
 
Old 12-02-2014, 07:39 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,876
Blog Entries: 13

Rep: Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929
Is the Raspberry Pi your target for the resultant kernel? I ask because that would seem logical and therefore you do not need a cross compiler, you can just use gcc as installed on the Pi. On any given machine, if you install the proper packages to compile a kernel, and then compile the kernel; the resultant kernel will run on the machine which you compiled it on. Cross compilation is only if you're on say an x86 machine and wish to build a kernel which would run on the Pi.
 
1 members found this post helpful.
Old 12-03-2014, 05:16 AM   #3
DutchGeek
Member
 
Registered: Sep 2006
Distribution: SuSE, Slackware
Posts: 55

Original Poster
Rep: Reputation: 10
Indeed, It somehow passed me this point.

But now I am compiling it with the gcc toolchain that ships with Raspbian in /usr/bin. The compilation stops shortly with the following errors:

Code:
pi@raspberrypi ~/FreeRTOS/bitthunder $ make -j32
 Dark Builder
 Version (1.6.0 - BiCEP2 (Gravitational Waves))
  [LDS]    [Linker]          arch/arm/bitthunder.lds
  [CC]     [FreeRTOS]        kernel/bt_freertos_if.o
  [CC]     [FreeRTOS]        kernel/FreeRTOS/Source/croutine.o
  [CC]     [FreeRTOS]        kernel/FreeRTOS/Source/list.o
  [CC]     [FreeRTOS]        kernel/FreeRTOS/Source/queue.o
  [CC]     [FreeRTOS]        kernel/FreeRTOS/Source/tasks.o
  [CC]     [HAL]             arch/arm/mach/bcm2835/bcm2835.o
  [CC]     [HAL]             arch/arm/mach/bcm2835/irq_chip.o
  [CC]     [HAL]             arch/arm/common/freertos-arm11.o
  [CC]     [HAL]             arch/arm/mm/v7-mmu.o
  [CC]     [FreeRTOS]        kernel/FreeRTOS/Source/event_groups.o
  [CC]     [BitThunder]      os/src/syscall/calls/write.o
  [CC]     [HAL]             arch/arm/common/freertos-arm11-portisr.o
  [CC]     [HAL]             arch/arm/mach/bcm2835/timer.o
  [CC]     [HAL]             arch/arm/mach/bcm2835/gpio.o
  [CC]     [BitThunder]      os/src/syscall/calls/getpid.o
  [CC]     [BitThunder]      os/src/syscall/calls/gpio.o
  [CC]     [BitThunder]      os/src/syscall/calls/read.o
  [AS]     [HAL]             arch/arm/common/crtinit.o
  [AS]     [HAL]             arch/arm/mm/v7-mmu-asm.o
  [AS]     [HAL]             arch/arm/boot/head.o
  [CC]     [BitThunder]      os/src/syscall/calls/yield.o
  [CC]     [BitThunder]      os/src/syscall/calls/open.o
  [CC]     [BitThunder]      os/src/syscall/calls/lseek.o
  [CC]     [BitThunder]      os/src/syscall/calls/klog.o
  [CC]     [BitThunder]      os/src/syscall/calls/sleep.o
  [AS]     [HAL]             arch/arm/common/cpuinit.o
  [CC]     [BitThunder]      os/src/syscall/calls/close.o
  [CC]     [BitThunder]      os/src/interfaces/bt_if_cpu.o
  [CC]     [BitThunder]      os/src/syscall/calls/time.o
  [CC]     [BitThunder]      os/src/time/time.o
  [CC]     [BitThunder]      os/src/interfaces/bt_if_power.o
/home/pi/FreeRTOS/bitthunder/arch/arm/common/crtinit.s: Assembler messages:
/home/pi/FreeRTOS/bitthunder/arch/arm/common/crtinit.s:59: Error: garbage following instruction -- `mov r0,r7//First argument is the machine id.'
/home/pi/FreeRTOS/bitthunder/arch/arm/common/crtinit.s:60: Error: garbage following instruction -- `mov r1,r8//Second argument is the fdt address.'
make: *** [/home/pi/FreeRTOS/bitthunder/build/arch/arm/common/crtinit.o] Error 1
make: *** Waiting for unfinished jobs....
  [CC]     [BitThunder]      os/src/interfaces/bt_dev_if_uart.o
/home/pi/FreeRTOS/bitthunder/kernel/FreeRTOS/Source/tasks.c:173:18: error: field‚xNewLib_reent‚ has incomplete type
/home/pi/FreeRTOS/bitthunder/kernel/FreeRTOS/Source/tasks.c: In function ‚vTaskStartScheduler‚:
/home/pi/FreeRTOS/bitthunder/kernel/FreeRTOS/Source/tasks.c:1517:4: error: ‚_impure_ptr‚ undeclared (first use in this function)
/home/pi/FreeRTOS/bitthunder/kernel/FreeRTOS/Source/tasks.c:1517:4: note: each undeclared identifier is reported only once for each function it appears in
/home/pi/FreeRTOS/bitthunder/kernel/FreeRTOS/Source/tasks.c: In function ‚vTaskSwitchContext‚:
/home/pi/FreeRTOS/bitthunder/kernel/FreeRTOS/Source/tasks.c:2194:4: error: ‚_impure_ptr‚ undeclared (first use in this function)
make: *** [/home/pi/FreeRTOS/bitthunder/build/kernel/FreeRTOS/Source/tasks.o] Error 1
Any ideas?

Last edited by DutchGeek; 12-03-2014 at 06:02 AM.
 
Old 12-03-2014, 07:42 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,876
Blog Entries: 13

Rep: Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929
Haven't used an assembler in probably 25 years. However what I do know is that you can't have stuff after the end of a line like the "//" comment. The conventions varied, like maybe you could use semi-colon or pound, ; or #, but in neither case could you get away without having a whitespace after the end of the assembly term. So if those assembly terms literally say:
Code:
mov r0,r7//First argument is the machine id.
mov r1,r8//Second argument is the fdt address.
Then remove those comments from the file /home/pi/FreeRTOS/bitthunder/arch/arm/common/crtinit.s on lines 59 and 60.

As far as the other complaints, you'll have to inspect line 173 of /home/pi/FreeRTOS/bitthunder/kernel/FreeRTOS/Source/tasks.c to see what variable type field‚xNewLib_reent‚ is declared to be. For instance, if it's a custom enumeration, then perhaps something is wrong with an include file or path to the include file. Maybe the include file is a common one which can be found in several places and as a result it's finding not the specific variation of it which matters to your kernel compile. That might seem the most likely since the implication is that this code can compile and therefore the configure and make would have provisions to find the includes, but sometimes it doesn't get the paths right or you don't have an environment variable set, and as a result, you'll find like "something.h" but it will be the incorrect one, say the standard one from the compilation toolkit versus one written specifically for this piece of source. There are some methods, which I'll describe at the end.

For lines 1517 and 2194 it's complaining that ‚_impure_ptr‚ is undefined. Search for where that is defined and then you'll have to figure out why it can't find that. Again, probably an include file path problem.

Some "methods":
  1. In a complicated compile like this one thing to try is to enable debug for the make, therefore when you invoke "make" you use the -d option and then capture all of your information to a log file, something like: "make -d 2>&1 output.log". I'm not sure if this will output information relevant to the resolved paths for every include file.
  2. What I'm more sure of is if you get a listing file, mixed source assembly output of your compiled file, in the listing file, the exact paths as well as all the information as part of an include is shown within the listing file. Therefore you can see what exact include files it sees as well as what the compiler believes to be within those include files. That helps a lot. You'll have to web search or check the man page on gcc to determine the correct ways to do this and I recommend you modify just the relevant Makefile so as to not cause list files to come out for everything, but only the specific problem areas you need to check.
Hope it helps.
 
Old 12-04-2014, 06:18 AM   #5
DutchGeek
Member
 
Registered: Sep 2006
Distribution: SuSE, Slackware
Posts: 55

Original Poster
Rep: Reputation: 10
Hello,

Thanks for the reply. I changed those comments to traditional /* */ and it fixed it.

Apparently it had todo with the newlib library.

The undeclared errors (xNewLib_reent, impure_ptr) had todo with the configUSE_NEWLIB_REENTRANT flag, defined in FreeRTOS.h. Which in turn is set to 1 when a kernel feature BT_CONFIG_KERNEL_FREERTOS_NEWLIB_REENTRANCY_SUPPORT is set to Y.

Disabled this feature, no newlib errors. but got a whole host of others now:

Code:
 Dark Builder
 Version (1.6.0 - BiCEP2 (Gravitational Waves))
  [LD]     [BitThunder]      vmthunder.elf
collect2: ld terminated with signal 11 [Segmentation fault]
/home/pi/FreeRTOS/bitthunder/build/arch/arm/common/crtinit.o: In function `_start':
(.text+0x10): multiple definition of `_start'
/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crt1.o:(.text+0x0): first defined here
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/kernel/bt_freertos_if.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/kernel/bt_freertos_if.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/kernel/FreeRTOS/Source/croutine.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/kernel/FreeRTOS/Source/croutine.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/kernel/FreeRTOS/Source/list.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/kernel/FreeRTOS/Source/list.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/kernel/FreeRTOS/Source/queue.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/kernel/FreeRTOS/Source/queue.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/kernel/FreeRTOS/Source/tasks.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/kernel/FreeRTOS/Source/tasks.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/kernel/FreeRTOS/Source/event_groups.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/kernel/FreeRTOS/Source/event_groups.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/arch/arm/mach/bcm2835/bcm2835.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/arch/arm/mach/bcm2835/bcm2835.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/arch/arm/mach/bcm2835/irq_chip.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/arch/arm/mach/bcm2835/irq_chip.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/arch/arm/mach/bcm2835/timer.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/arch/arm/mach/bcm2835/timer.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/arch/arm/mach/bcm2835/gpio.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/arch/arm/mach/bcm2835/gpio.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/arch/arm/common/freertos-arm11.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/arch/arm/common/freertos-arm11.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/arch/arm/common/freertos-arm11-portisr.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/arch/arm/common/freertos-arm11-portisr.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/arch/arm/mm/v7-mmu.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/arch/arm/mm/v7-mmu.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/getpid.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/getpid.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/yield.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/yield.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/open.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/open.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/close.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/close.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/read.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/read.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/write.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/write.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/lseek.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/lseek.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/klog.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/klog.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/sleep.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/sleep.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/gpio.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/gpio.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/time.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/syscall/calls/time.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/time/time.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/time/time.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/interfaces/bt_if_cpu.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/interfaces/bt_if_cpu.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/interfaces/bt_if_power.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/interfaces/bt_if_power.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/interfaces/bt_dev_if_uart.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/interfaces/bt_dev_if_uart.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/lib/string.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/lib/string.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/lib/ctype.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/lib/ctype.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/lib/bcd.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/lib/bcd.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/bt_main.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/bt_main.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/process/bt_process.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/process/bt_process.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/process/bt_threads.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/process/bt_threads.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/interrupts/bt_interrupts.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/interrupts/bt_interrupts.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/gpio/bt_gpio.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/gpio/bt_gpio.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/module/bt_module_init.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/module/bt_module_init.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/machines/bt_machines.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/machines/bt_machines.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/timers/bt_timers.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/timers/bt_timers.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/process/bt_mutex.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/process/bt_mutex.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/process/bt_queue.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/process/bt_queue.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/lib/printf.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/lib/printf.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/lib/getmem.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/lib/getmem.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/lib/putc.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/lib/putc.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/syslog/bt_printk.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/syslog/bt_printk.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/lib/multiplexer.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/lib/multiplexer.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/mm/bt_mm.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/mm/bt_mm.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/mm/bt_heap.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/mm/bt_heap.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/devman/bt_devman.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/devman/bt_devman.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/devman/bt_device.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/devman/bt_device.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/devman/bt_resources.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/devman/bt_resources.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/fs/bt_devfs.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/fs/bt_devfs.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/fs/bt_mountfs.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/fs/bt_mountfs.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/fs/bt_fs.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/fs/bt_fs.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/fs/bt_file.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/fs/bt_file.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/os/src/helpers/bt_clkdiv.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/os/src/helpers/bt_clkdiv.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/lib/src/handles/bt_handles.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/lib/src/handles/bt_handles.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/lib/src/collections/bt_linked_list.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/lib/src/collections/bt_linked_list.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/lib/src/collections/bt_fifo.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/lib/src/collections/bt_fifo.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/lib/src/hash/bt_crc32.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/lib/src/hash/bt_crc32.o
/usr/bin/ld: error: /home/pi/FreeRTOS/bitthunder/vmthunder.elf uses VFP register arguments, /home/pi/FreeRTOS/bitthunder/build/lib/src/hash/bt_md5.o does not
/usr/bin/ld: failed to merge target specific data of file /home/pi/FreeRTOS/bitthunder/build/lib/src/hash/bt_md5.o
/home/pi/FreeRTOS/bitthunder/build/os/src/mm/bt_mm.o: In function `realloc':
/home/pi/FreeRTOS/bitthunder/os/src/mm/bt_mm.c:36: undefined reference to `BT_kRealloc'
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.22 assertion fail ../../bfd/elf32-arm.c:13830
make: *** [/home/pi/FreeRTOS/bitthunder/vmthunder.elf] Error 1
 
Old 12-04-2014, 08:46 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,876
Blog Entries: 13

Rep: Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929
I'd "go back to base" and set aside what you do have now, unzip the whole source drop to another directory and try a ./configure and make with a clean version. Because .... this supposedly compiles. So I wonder if the earlier work you did to try and cross compile is causing these problems.

It's seeing the __start symbol twice, that's like having two main() functions. Not good.

The rest of the complaints are all similar to each other and they appear to be saying that things are compiled for different systems.

What those complaints are saying are that a particular register which is either there, or not there on the target system is being used by one binary file and the other binary files do not agree that this is the correct format. The format (by my ad hoc definition here) is the target microcode for the program.

So it seems like a totally broken build. In that case I'd conclude that I tinkered too much and let me go back to a standard release in another directory and see if I can just build it as is. It seems as if some of this was built with one compiler and some of this was built with a different compiler. Which may make sense since you originally were trying to cross compile.
 
Old 12-05-2014, 06:47 AM   #7
DutchGeek
Member
 
Registered: Sep 2006
Distribution: SuSE, Slackware
Posts: 55

Original Poster
Rep: Reputation: 10
Thanks for the reply,

Tried it indeed to check out again from github, no difference.

One problem lies indeed in the hard-float (what the elf files use) vs. soft-float (what my Raspbian version supports). Some description here:
vpf-registered-used-by-executable-not-object-file

Apparently my older version of Raspbian doesnt support hard float, but newer versions do:
http://elinux.org/RPi_Distributions#What_is_armhf

Again it is a compile feature in the .config:
Code:
BT_CONFIG_TOOLCHAIN_FPU_ABI="-mfloat-abi=soft"
changed to:
Code:
BT_CONFIG_TOOLCHAIN_FPU_ABI="-mfloat-abi=hard"
After this it gave VFPS related errors earlier in the compilation process:

Code:
pi@raspberrypi ~/FreeRTOS/bitthunder $ make
 Dark Builder
 Version (1.6.0 - BiCEP2 (Gravitational Waves))
  [CC]     [FreeRTOS]        kernel/bt_freertos_if.o
  [CC]     [FreeRTOS]        kernel/FreeRTOS/Source/croutine.o
  [CC]     [FreeRTOS]        kernel/FreeRTOS/Source/list.o
  [CC]     [FreeRTOS]        kernel/FreeRTOS/Source/queue.o
  [CC]     [FreeRTOS]        kernel/FreeRTOS/Source/tasks.o
  [CC]     [FreeRTOS]        kernel/FreeRTOS/Source/event_groups.o
  [CC]     [HAL]             arch/arm/mach/bcm2835/bcm2835.o
  [CC]     [HAL]             arch/arm/mach/bcm2835/irq_chip.o
  [CC]     [HAL]             arch/arm/mach/bcm2835/timer.o
  [CC]     [HAL]             arch/arm/mach/bcm2835/gpio.o
  [CC]     [HAL]             arch/arm/common/freertos-arm11.o
  [CC]     [HAL]             arch/arm/common/freertos-arm11-portisr.o
/tmp/ccn0aJpQ.s: Assembler messages:
/tmp/ccn0aJpQ.s:82: Error: operand 0 must be FPSCR -- `vmsr FPEXC,r0'
/tmp/ccn0aJpQ.s:85: Error: VFP single precision register expected -- `vldmia LR!,{D16-D31}'
/tmp/ccn0aJpQ.s:154: Error: VFP single precision register expected -- `vstmdb LR!,{D16-D31}'
/tmp/ccn0aJpQ.s:157: Error: operand 1 must be FPSCR -- `vmrs R1,FPEXC'
/tmp/ccn0aJpQ.s:192: Error: operand 0 must be FPSCR -- `vmsr FPEXC,r0'
/tmp/ccn0aJpQ.s:195: Error: VFP single precision register expected -- `vldmia LR!,{D16-D31}'
/tmp/ccn0aJpQ.s:246: Error: VFP single precision register expected -- `vstmdb LR!,{D16-D31}'
/tmp/ccn0aJpQ.s:249: Error: operand 1 must be FPSCR -- `vmrs R1,FPEXC'
/tmp/ccn0aJpQ.s:281: Error: operand 0 must be FPSCR -- `vmsr FPEXC,r0'
/tmp/ccn0aJpQ.s:284: Error: VFP single precision register expected -- `vldmia LR!,{D16-D31}'
make: *** [/home/pi/FreeRTOS/bitthunder/build/arch/arm/common/freertos-arm11-portisr.o] Error 1
I'm thinking of either upgrading Raspbian or changing the current to support hard float.
 
  


Reply

Tags
cross-compile, raspberry pi


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cross compiling eglibc with Linaro toolchain ammayappan Linux - Embedded & Single-board computer 7 02-07-2012 02:40 AM
[SOLVED] Cross compiling software for arm with a proprietary toolchain prushik Linux - Software 6 03-17-2011 02:38 PM
Cross compiling GNU toolchain. pwrichards Linux - Newbie 0 11-30-2007 08:41 AM
How to make cross compilation toolchain for mips architecture kennithwang Linux - Embedded & Single-board computer 3 10-20-2007 09:03 AM
Building cross-compiling toolchain radhapriya Linux - Software 1 06-25-2004 01:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 03:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration