News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Setup GNU Tools ARM Embedded in Code::Blocks

Started by Pavel_47, November 29, 2016, 11:30:58 AM

Previous topic - Next topic

Pavel_47

Hello,

After specifying "GNU Tools ARM Embedded in Code" executable in the "Compiler options" can't build simplest project.
The assembler "vectors.S" file is generated, that contain references to undefined functions.
default\src\vectors.o||In function `warm_reset':|
C:\Users\user1\Documents\proj_ARM\proj1\src\vectors.S|219|undefined reference to `IrqInit'|
C:\Users\user1\Documents\proj_ARM\proj1\src\vectors.S|264|undefined reference to `_exit'|


Hoping that unrecognized functions are located in link libraries, I've added 2 references in "Link Libraries":
C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\lib\gcc\arm-none-eabi\5.4.1\libgcc.a
C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\lib\gcc\arm-none-eabi\5.4.1\libgcov.a


Still doesn't work.
Help, please.

Thanks in advance.

stahta01

Post a build log!

Because the newbies seem to have trouble adding libraries correctly.

I for one will ignore you till you post a build log.

You need to post the complete and full linking command!

EDIT: Build messages is NOT build log!

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Pavel_47

Here it is:

||=== Build: default in proj1 (compiler: GNU GCC Compiler for ARM) ===|
default\src\vectors.o||In function `warm_reset':|
C:\Users\user1\Documents\proj_ARM\proj1\src\vectors.S|219|undefined reference to `IrqInit'|
C:\Users\user1\Documents\proj_ARM\proj1\src\vectors.S|264|undefined reference to `_exit'|
default\src\vectors.o||In function `IRQ':|
C:\Users\user1\Documents\proj_ARM\proj1\src\vectors.S|315|undefined reference to `IrqHandler'|
c:\program files (x86)\gnu tools arm embedded\5.4 2016q3\bin\..\lib\gcc\arm-none-eabi\5.4.1\..\..\..\..\arm-none-eabi\lib\crt0.o||In function `_start':|
(.text+0x104)||undefined reference to `__bss_start__'|
c:\program files (x86)\gnu tools arm embedded\5.4 2016q3\bin\..\lib\gcc\arm-none-eabi\5.4.1\..\..\..\..\arm-none-eabi\lib\crt0.o||In function `_start':|
(.text+0x108)||undefined reference to `__bss_end__'|
c:\program files (x86)\gnu tools arm embedded\5.4 2016q3\bin\..\lib\gcc\arm-none-eabi\5.4.1\..\..\..\..\arm-none-eabi\lib\libc.a(lib_a-exit.o)||In function `exit':|
exit.c:(.text.exit+0x2c)||undefined reference to `_exit'|
||error: ld returned 1 exit status|
||=== Build failed: 7 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

stahta01

#3
Post the LINKER COMMAND from the build log or I will just ignore you !!!

Decide to do what you want me to do in the past.

Quote from: Pavel_47 on January 25, 2015, 07:05:56 PM
Henceworth don't trouble yourself to answer to my questions !!!

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Pavel_47

arm-none-eabi-g++.exe -L"C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\lib\gcc\arm-none-eabi\5.4.1" -o default\proj1.elf default\src\main.o default\src\vectors.o  -s -Wl,-Map,map.txt -mcpu=arm7tdmi -T ld/target.ld  "C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\lib\gcc\arm-none-eabi\5.4.1\libgcc.a" "C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\lib\gcc\arm-none-eabi\5.4.1\libgcov.a" "C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\lib\gcc\arm-none-eabi\5.4.1\libgcc.a" "C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\lib\gcc\arm-none-eabi\5.4.1\libgcov.a"
default\src\vectors.o: In function `warm_reset':
C:\Users\user1\Documents\proj_ARM\proj1/src/vectors.S:219: undefined reference to `IrqInit'
C:\Users\user1\Documents\proj_ARM\proj1/src/vectors.S:264: undefined reference to `_exit'
default\src\vectors.o: In function `IRQ':
C:\Users\user1\Documents\proj_ARM\proj1/src/vectors.S:315: undefined reference to `IrqHandler'
c:/program files (x86)/gnu tools arm embedded/5.4 2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/crt0.o: In function `_start':
(.text+0x104): undefined reference to `__bss_start__'
c:/program files (x86)/gnu tools arm embedded/5.4 2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/crt0.o: In function `_start':
(.text+0x108): undefined reference to `__bss_end__'
c:/program files (x86)/gnu tools arm embedded/5.4 2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
7 error(s), 0 warning(s) (0 minute(s), 0 second(s))

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]