Created Fri, 01 Aug 2014 20:38:50 +0000 by avenue33
Fri, 01 Aug 2014 20:38:50 +0000
[color=#FF0000]Solved![/color]
The culprit was a missing space between the -T and the link script.
——————————————————————————————————————
The sketch is the basic blinky example on a chipKIT Uno32 board and I'm using makefiles.
Sketch compilation succeeds with Mpide-2014-03-16 but fails with Mpide-2014-06-05.
With Mpide-2014-06-05, compilation goes fine but linking fails with the message
Builds/embeddedcomputing.a(WSystem.o): In function 'initIntVector': /Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/cores/pic32/WSystem.c:105: Undefined reference to '_image_header_info' collect2: ld returned 1 exit status make: *** [Builds/embeddedcomputing.elf] Error 1
Error message points to file WSystem.c line 135...
130:void initIntVector(void)
131:{
132: const IMAGE_HEADER_INFO * pImageHeader = getImageHeaderInfoStructure();
133: int i = 0;
135: void * pvOrgIntVec = (void *)pImageHeader->pOrgVector0;
136:
...and says
Undefined reference to `_image_header_info'
However, _image_header_info is in file wiring.h line 372...
extern const IMAGE_HEADER_INFO _image_header_info; // this is the header info right before .rodata, defined by the linker
...but I can't find a
const IMAGE_HEADER_INFO _image_header_info;
in wiring.c
The only difference between the two releases is the new pic32_software_reset.S file added to Mpide-2014-06-05 at located at /Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/cores/pic32/.
Any hint?
Sat, 02 Aug 2014 00:23:30 +0000
I have had problems with Ethernet on this version as well... I can actually compile, but it fails when I compile and upload. I was under the impression that there may have been some linker changes as well.
Jacob
Sat, 02 Aug 2014 00:49:58 +0000
That is because the _image_header_info data structure is defined and allocated in the common linker script. If you are using a makefile, chances are you are not doing what MPIDE does. The linker scripts are designed to work in harmony with MPIDE; breaking from the environment... breaks the build.
I just compiled the blink sketch example for the UNO32 in MPIDE 2014-06--05, and it works just fine.
Why are you attempting your own makefiles?
Sat, 02 Aug 2014 09:41:40 +0000
Is this a makefile generated from embeddedXcode perchance? Can you post the command line it's executing when it generates the error?
Sat, 06 Sep 2014 20:06:04 +0000
Hey Rei, long time no talk!
Did you ever find a solution to this problem? I'm trying to update Arduino-Makefile to the latest MPIDE and running into similar problems.
http://chipkit.net/forum/viewtopic.php?f=6&t=3037
Mon, 27 Oct 2014 16:07:01 +0000
Hello I been searching, This error is mainly dude to calculation of the memory size calculation after compliation process. it has nothing to do with compliation. refer: http://www.visualmicro.com/forums/YaBB.pl?num=1406483545 even i Have the same problem, I dont kow what to do ..
/home/harsha/bin/mpide-0023-linux64-20140821/hardware/pic32/compiler/pic32-tools/bin/pic32-gcc -T/home/harsha/bin/mpide-0023-linux64-20140821/hardware/pic32/cores/pic32/chipKIT-application-32MX320F128.ld -T/home/harsha/bin/mpide-0023-linux64-20140821/hardware/pic32/cores/pic32/chipKIT-application-COMMON.ld -mprocessor=32MX320F128H -Wl,--gc-sections -Os -o /home/harsha/sketchbook/bin/uno_pic32/sketchbook/sketchbook.elf /home/harsha/sketchbook/bin/uno_pic32/sketchbook/BlinkWithoutDelay.o /home/harsha/sketchbook/bin/uno_pic32/sketchbook/libcore.a -lc -lm
/home/harsha/sketchbook/bin/uno_pic32/sketchbook/libcore.a(WSystem.o): In function `initIntVector':
WSystem.c:(.text.initIntVector+0x0): undefined reference to `_image_header_info'
WSystem.c:(.text.initIntVector+0x4): undefined reference to `_image_header_info'
collect2: ld returned 1 exit status
Its Make file compliation using chipKit.mk I have one on top..
PROJECT_DIR = /home/harsha/sketchbook
ARDMK_DIR = $(PROJECT_DIR)/Arduino-Makefile-master
ARDUINO_DIR = /usr/share/arduino
USER_LIB_PATH := $(PROJECT_DIR)/lib
BOARD_TAG = uno_pic32
MONITOR_BAUDRATE = 9600
homebrew
:AVR_TOOLS_DIR = /home/harsha/bin/mpide-0023-linux64-20140821/hardware/pic32/compiler/pic32-tools
homebrew
:AVRDDUDE = /home/harsha/bin/mpide-0023-linux64-20140821/hardware/tools/avrdude
MONITOR_PORT = /dev/ttyUSB0
CURRENT_DIR = $(shell basename $(CURDIR))
OBJDIR = $(PROJECT_DIR)/bin/$(BOARD_TAG)/$(CURRENT_DIR)
MPIDE_DIR=/home/harsha/bin/mpide-0023-linux64-20140821
Need help please..
Sat, 14 Feb 2015 22:23:39 +0000
Back to the chipKIT boards... and facing the same problems.
Why are you attempting your own makefiles?
Because the Processing-based IDEs provide the very strict minimum set of features, perform hidden under-the-hood processes and aren't suitable for complex projects with such powerful MCUs at 200 MHz and 512 MB.
Just for fun, I copied the log from MPIDE when performing a verbose build and ran into a Terminal window. Error!
$ /Users/ReiVilo/github/chipKIT/chipKIT32-MAX/build/macosx/work/mpide.app/Contents/Resources/Java/hardware/pic32/compiler/pic32-tools/bin/pic32-g++ -Os -Wl,--gc-sections -mdebugger -mno-peripheral-libs -nostartfiles -mprocessor=32MX320F128H -o /var/folders/5d/dky9xc691m32kztqnhkn8bhw0000gn/T/build307232311059992023.tmp/test_blink.cpp.elf /var/folders/5d/dky9xc691m32kztqnhkn8bhw0000gn/T/build307232311059992023.tmp/LocalLibrary.cpp.o /var/folders/5d/dky9xc691m32kztqnhkn8bhw0000gn/T/build307232311059992023.tmp/test_blink.cpp.o /var/folders/5d/dky9xc691m32kztqnhkn8bhw0000gn/T/build307232311059992023.tmp/core.a -L/var/folders/5d/dky9xc691m32kztqnhkn8bhw0000gn/T/build307232311059992023.tmp -lm -T /Users/ReiVilo/github/chipKIT/chipKIT32-MAX/build/macosx/work/Mpide.app/Contents/Resources/Java/hardware/pic32/cores/pic32/chipKIT-application-32MX320F128.ld -T/Users/ReiVilo/github/chipKIT/chipKIT32-MAX/build/macosx/work/Mpide.app/Contents/Resources/Java/hardware/pic32/cores/pic32/chipKIT-application-COMMON.ld /Users/ReiVilo/github/chipKIT/chipKIT32-MAX/build/macosx/work/Mpide.app/Contents/Resources/Java/hardware/pic32/compiler/pic32-tools/bin/../lib/gcc/pic32mx/4.5.2/../../../../pic32mx/bin/ld: MPIDE Version not specfied correctly /Users/ReiVilo/github/chipKIT/chipKIT32-MAX/build/macosx/work/Mpide.app/Contents/Resources/Java/hardware/pic32/compiler/pic32-tools/bin/../lib/gcc/pic32mx/4.5.2/../../../../pic32mx/bin/ld: Link terminated due to previous error(s). collect2: ld returned 1 exit status
So I don't know what "MPIDE Version not specfied correctly" would mean and the link order is exactly what MPIDE shows in the output pane.