Go Down

Topic: New Mega 2560 won't compile previously working 1280 code (Read 849 times) previous topic - next topic

len-morgan

I had a sketch I was developing that used the Ethernet library and ran fine on a Mega 1280.  We were ready to deploy the project ordered more Mega boards for "production."  What came used the 2560 processor and the new Atmel USB chip.  Needless to say, it didn't work.  I downloaded the latest 0022 version of the IDE, selected the correct board and recompiled the sketch.  Now I am getting nothing but errors mostly having to do with SPI.h not being defined.

It appears that all of the libraries have changed from C to C++ so a direct compare between the 0018 version and 0022 version to see what has changed is useless.  I tried using the same sketch and going back to my original development board (1280) and changed the board type in the IDE but now IT gets the same errors!

Does anyone know what is going on?  Why was the change made from C (works great) to C++ (worthless).  Can I even compile C code and use it with the new C++ libraries?

I am getting in a bind because I told my boss that the code was done and we just needed to load it into the new processors.  That now seems impossible.

Any help would be appreciated.

Len Morgan

len-morgan

Sorry, I just realized that the 0018 libraries were also C++.  I still have the problem though.

len-morgan

Nothing?  I find it hard to believe (although I guess in theory possible) that no one else has had this problem with the new Mega boards.  I've searched here and a few other places for information before posting but found nothing except about communicating with the new USB chip.

ANY help or pointers to where I can go to help myself would be greatly appreciated!

len

Go Up