Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't make CodeSourcery G++ for ARM m4 work on Eclipse
Can't make CodeSourcery G++ for ARM m4 work on Eclipse [message #853257] Sun, 22 April 2012 22:04 Go to next message
Danny M is currently offline Danny MFriend
Messages: 5
Registered: April 2012
Junior Member
Not sure if it's an Eclipse issue, either way, I could really really use some help.

I have plenty of experience with microcontrollers, C, and the PIC MPLAB IDE. I now have the STM32F4 Discovery kit with the ARM Cortex m4 on it. So, time to learn a new thing, but the toolchain for the m4 seems to be less than "well-established".

I tried to follow the procedure at http: //shareee.netne.net/wordpress/?p=5 to use CodeSourcery G++ Lite for Cortex m4 with the demo LED_Blink project, designed for the STM32F4 board, with the Eclipse Indigo IDE.

I had trouble with the long list shown there in "Paths and Symbols", no such list was showing up by default and the install path names for my EABI package was somewhat different. I skipped that step, tried to compile, of course it bombed because it couldn't find certain files, I looked for where those files were and added them under "Paths and Symbols".

Now I get a situation where there are no FILES which can't be found, so that's good, but an issue of unresolved symbols shows up from core_cm4.h:
make: *** [Template.elf] Error 1
Symbol '__NVIC_PRIO_BITS' could not be resolved (this repeats a bunch of times on the error list)
undefined reference to '_init'

I don't understand what would cause these errors, the LED_Blink project should be complete and very simple. Any help?

I do have a warning about a duplicate path entry, but I don't think it's related to this.

[Updated on: Mon, 23 April 2012 01:31]

Report message to a moderator

Re: Can't make CodeSourcery G++ for ARM m4 work on Eclipse [message #853531 is a reply to message #853257] Mon, 23 April 2012 05:17 Go to previous messageGo to next message
Danny M is currently offline Danny MFriend
Messages: 5
Registered: April 2012
Junior Member
Hmm, I found where __NVIC_PRIO_BITS is an optional define, and for some odd reason that specific error just "went away". I didn't change anything.

So I still have:
Description Resource Path Location Type
make: *** [Template.elf] Error 1 Template C/C++ Problem
Description Resource Path Location Type
undefined reference to `_init' Template line 0 C/C++ Problem

What is "Error 1"?
I tried searching the files for "_init". I found plenty of references for things with "_init" in the task/define label, but no "_init" itself. And why does it say only that its location is "line 0"? How is it I can't find a reference to it, and it doesn't cite a location for this reference, yet it's still a reference?

[Updated on: Mon, 23 April 2012 06:46]

Report message to a moderator

Re: Can't make CodeSourcery G++ for ARM m4 work on Eclipse [message #854668 is a reply to message #853257] Tue, 24 April 2012 06:22 Go to previous messageGo to next message
Danny M is currently offline Danny MFriend
Messages: 5
Registered: April 2012
Junior Member
ok, I found there's much more info on the Console tab that didn't get conveyed under the Problems tab:

c:/program files (x86)/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-init.o): In function `__libc_init_array':
init.c:(.text+0x38): undefined reference to `_init'
collect2: ld returned 1 exit status
cs-make: *** [Template.elf] Error 1


But I don't see where there's an init.c in the project!

The reference is in startup_stm32f4xx.S:
/* Call static constructors */
bl __libc_init_array
Re: Can't make CodeSourcery G++ for ARM m4 work on Eclipse [message #855543 is a reply to message #854668] Tue, 24 April 2012 23:03 Go to previous messageGo to next message
Ricardo Anguiano is currently offline Ricardo AnguianoFriend
Messages: 1
Registered: April 2012
Junior Member
Danny,

You may have better luck getting help with your problem by contacting the CodeBench arm-gnu mailing list: arm-gnu@codesourcery.com.

Good luck,
Re: Can't make CodeSourcery G++ for ARM m4 work on Eclipse [message #855760 is a reply to message #855543] Wed, 25 April 2012 04:35 Go to previous messageGo to next message
Danny M is currently offline Danny MFriend
Messages: 5
Registered: April 2012
Junior Member
GOT IT!!

Properties->C/C++ Build/ARM Sourcery Windows GCC C Linker->General:
"Do not use standard start files" was checked and shouldn't have been
"Remove unused sections" wasn't checked and should have been

Well, at least that's what I had set that wasn't consistent with the step-by-step instructions in the aforementioned URL. With those boxes changed, I now have a build!

[Updated on: Wed, 25 April 2012 04:49]

Report message to a moderator

Re: Can't make CodeSourcery G++ for ARM m4 work on Eclipse [message #1009927 is a reply to message #855760] Sat, 16 February 2013 02:18 Go to previous messageGo to next message
Robert G is currently offline Robert GFriend
Messages: 1
Registered: February 2013
Junior Member
This was extremely helpful. Thank you!
Re: Can't make CodeSourcery G++ for ARM m4 work on Eclipse [message #1028010 is a reply to message #855760] Wed, 27 March 2013 18:10 Go to previous message
Felipe Nipo is currently offline Felipe NipoFriend
Messages: 1
Registered: March 2013
Junior Member
Very helpful, thanks!
Previous Topic:Not building on header file change
Next Topic:Language Settings Provider
Goto Forum:
  


Current Time: Wed Apr 24 22:55:53 GMT 2024

Powered by FUDForum. Page generated in 0.03791 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top