chipKIT® Development Platform

Inspired by Arduino™

SOLVED — Mpide-2014-03-16 succeeds but Mpide-2014-06-05 fails

Created Fri, 01 Aug 2014 20:38:50 +0000 by avenue33


Fri, 01 Aug 2014 20:38:50 +0000


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/ 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)
132:    const IMAGE_HEADER_INFO * pImageHeader = getImageHeaderInfoStructure();
133:    int i = 0;
135:    void * pvOrgIntVec = (void *)pImageHeader->pOrgVector0; 

...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/

Any hint?

Jacob Christ

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.



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.


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: 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 I have one on top..


This is the path to where you have created/cloned your project

PROJECT_DIR = /home/harsha/sketchbook


Path to the Arduino-Makefile directory.

ARDMK_DIR = $(PROJECT_DIR)/Arduino-Makefile-master


Path to the Arduino application and ressources directory.

On OS X:

ARDUINO_DIR = /Applications/

or on Linux: (remove the one you don't want)

ARDUINO_DIR = /usr/share/arduino


Path to where the your project's libraries are stored.



It must be set to the board you are currently using. (i.e uno, mega2560, etc.)

BOARD_TAG = uno_pic32


It must be set to Serial baudrate value you are using.



Path to the AVR tools directory such as avr-gcc, avr-g++, etc.

On OS X with homebrew:

AVR_TOOLS_DIR = /usr/local

or on Linux: (remove the one you don't want)

AVR_TOOLS_DIR = /home/harsha/bin/mpide-0023-linux64-20140821/hardware/pic32/compiler/pic32-tools

= /home/harsha/bin/mpide-0023-linux64-20140821/hardware/tools/avr


Path to avrdude directory.

On OS X with homebrew:

AVRDDUDE = /home/harsha/bin/mpide-0023-linux64-20140821/hardware/tools

or on Linux: (remove the one you don't want)

AVRDDUDE = /home/harsha/bin/mpide-0023-linux64-20140821/hardware/tools/avrdude


Set the C standard to be used during compilation. Documentation (

CFLAGS_STD = -std=gnu11


CXXFLAGS_STD = -std=gnu++11


Flags you might want to set for debugging purpose. Comment to stop.

CXXFLAGS += -pedantic -Wall -Wextra


The port your board is connected to. Using an '*' tries all the ports and finds the right one.



Do not touch - used for binaries path

CURRENT_DIR = $(shell basename $(CURDIR))


This is were you put the binaries you just compile using 'make'






path to, inside the ARDMK_DIR, don't touch.

include $(ARDMK_DIR)/

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/ -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/ -T/Users/ReiVilo/github/chipKIT/chipKIT32-MAX/build/macosx/work/ /Users/ReiVilo/github/chipKIT/chipKIT32-MAX/build/macosx/work/ MPIDE Version not specfied correctly /Users/ReiVilo/github/chipKIT/chipKIT32-MAX/build/macosx/work/ 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.