catalin80 wrote on Wednesday, December 27, 2017:
Hi,
I’m tring to build the FreeRTOSv10.0.0/FreeRTOS/Demo/ARM7_LPC2106_GCG project under linux.
I made some changes over the starting script by replacing the set inside bat files with export and added
.note.gnu.build-id :
{
. = ALIGN(4);
PROVIDE( _note = .);
*(.note.gnu.build-id)
. = ALIGN(4);
(.note.gnu.build-id.);
. = ALIGN(4);
PROVIDE( _enote = .);
} >flash
inside lpc2106-rom.ld.
That helped me to pass over some gcc error that saying that the build-id should be specified
/usr/lib/gcc-cross/arm-linux-gnueabi/7/../../../../arm-linux-gnueabi/bin/ld: error: no memory region specified for loadable section `.note.gnu.build-id'
After that, unfortunatly, I’m receiving the following error:
arm-linux-gnueabi-gcc -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wunused -Wl,–strip-all -D RUN_FROM_ROM -D GCC_ARM7 -I. -I…/…/Source/include -I…/Common/include -mcpu=arm7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/…/Source/portable/GCC/ARM7_LPC2000/portISR.o serial/serialISR.o main.o serial/serial.o ParTest/ParTest.o …/Common/Minimal/integer.o …/Common/Minimal/flash.o …/Common/Minimal/PollQ.o …/Common/Minimal/comtest.o …/Common/Minimal/flop.o …/Common/Minimal/semtest.o …/Common/Minimal/dynamic.o …/Common/Minimal/BlockQ.o …/…/Source/tasks.o …/…/Source/queue.o …/…/Source/list.o …/…/Source/portable/MemMang/heap_2.o …/…/Source/portable/GCC/ARM7_LPC2000/port.o -nostartfiles boot.s -Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
**/usr/lib/gcc-cross/arm-linux-gnueabi/7/…/…/…/…/arm-linux-gnueabi/bin/ld: rtosdemo.elf: Not enough room for program headers, try linking with -N
**/usr/lib/gcc-cross/arm-linux-gnueabi/7/…/…/…/…/arm-linux-gnueabi/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:92: recipe for target ‘rtosdemo.elf’ failed
make: *** [rtosdemo.elf] Error 1
Is there someone that had that issue before ?
How should this be fixed ?
Notes:
- I already using -N and seems that the objects are not linked to the final elf.
- I already using -Wl,–strip-all.