chipKIT® Development Platform

Inspired by Arduino™

MPIDE Version not specified correctly

Created Fri, 07 Nov 2014 13:12:41 +0000 by ronthepicguy


ronthepicguy

Fri, 07 Nov 2014 13:12:41 +0000

Hello, Everyone. This is my maiden post on this forum. I have just got into Arduino (Mega) and the chipKit (Max32).

I modified some code that I found on the 'Net and got it to compile without error on the Arduino IDE. I then tried it on the MPIDE, and got this fault...

"C:\Program Files/mpide-0023-windows-20140821..../bin/ld.exe: MPIDE Version not specified correctly" "C:\Program Files/mpide-0023-windows-20140821..../bin/ld.exe: Link terminated due to previous error(s)." "collect2: ld returned 1 exit status"

What is up? The above information contains the build number of the MPIDE compiler, and I think that the code itself should be immaterial to this problem. I suspect that I have not set up some parameter or other properly, and a search of the 'Net has not enlightened me. Arduino files from the Arduino installation compile properly on the MPIDE. I tried several of different size and complexity.

Thank you for taking the time to scan this post.


EmbeddedMan

Sat, 08 Nov 2014 19:28:00 +0000

This is very strange. I agree with you that it shouldn't matter. I wonder what's triggering that error?

I've used that version of MPIDE on Windows several times without encountering that error before.

Try downloading MPIDE again maybe?

Or try the latest test build that we just put up: [url]https://chipkit.s3.amazonaws.com/builds/mpide-0150-windows-20141104-test.zip[/url] and see if that fixes the problem?

*Brian


ronthepicguy

Sat, 08 Nov 2014 22:18:08 +0000

I tried the same files on a different computer. Same faults.


ronthepicguy

Sat, 08 Nov 2014 22:31:32 +0000

I tried the latest build that you recommended. No luck. Same faults.


EmbeddedMan

Sat, 08 Nov 2014 23:11:39 +0000

Have you ever used MPIDE on either of the machines before? I wonder if a stale settings file could cause this somehow?

*Brian


ronthepicguy

Sun, 09 Nov 2014 22:27:57 +0000

I got my Arduino Mega and chipKit MAX32 on the same day.

I installed the Arduino IDE, Atmel Studio, and MPIDE a few days earlier to play while I awaited the hardware.

I played with both boards, using the Blink example and a few others. The MAX32 showed no reluctance to compile any of the examples.

I worked over the files in question, modifying them to run with Arduino C. I had to compile them to the Due because the RAM requirements exceeded the Megas capacity. When I tried to compile the same files using the MPIDE I got the errors that initiated these postings.

I have uninstalled, reinstalled, and tried everything that I know to try. No luck so far.


majenko

Sun, 09 Nov 2014 22:38:06 +0000

Try using UECIDE - should be good for both your Mega and MAX32 so only one IDE needed.


majenko

Sun, 09 Nov 2014 23:21:01 +0000

Please don't repost the same post in other sections of the same forum, it just wastes our time.

The MPIDE Version Not Specified Correctly comes from the linker script. There is a special variable that must be initialized in order for the linker to work properly. That variable is usually created by the core API software.

It could be that the code you are trying to run breaks that functionality in some way. Unless you show us what the code is we can't help you work out what might be clobbering that variable.

Please post your full code either inside a reply (including code tags) or as an attachment if it is too big.


ronthepicguy

Tue, 11 Nov 2014 01:38:11 +0000

I tried UECIDE. I like it! But I got the same result. Please find attached the four files that comprise the program. The program is a sun tracking program that I got from NREL. I quickly modded it to get it to compile on the Arduino platform(Due).

If the problem is with the linker then maybe my #include commands are causing some problem(?).


majenko

Tue, 11 Nov 2014 10:55:12 +0000

Well, all I can say is whoever wrote that code doesn't have the slightest clue how to write C programs.

The "main" problem here (pun intended) is that they have decided to make their own function called "main". "main" is a reserved function name and is the name of the first function run after system initialization. Naming some other function "main" is asking for trouble and is just plain stupid.

The compiler will take the main in your sketch in preference to the main function in the core API, and so the system will never be properly initialized, and massive chunks of code and data (including the MPIDE version variable) will be thrown away as not needed any more.

Also, filling header files with code?! That's is just psychotically evil!

The quickest fix would be to get rid of that main() function and name it something more sensible. Anything other than main() would be more sensible. Even uqwehduhwqe9dqh43p97gq4rweyr9743yr() would be more sensible than main().