chipKIT® Development Platform

Inspired by Arduino™

Arduino 1.0 beta release—MPIDE adapted?

Created Thu, 11 Aug 2011 16:10:24 +0000 by avenue33


avenue33

Thu, 11 Aug 2011 16:10:24 +0000

A beta release of Arduino 1.0 is available at :arrow: [url]http://code.google.com/p/arduino/wiki/Arduino1[/url]

Is MPIDE going to be adapted to include the new features?

Environment (IDE)

  • New file extension (.ino)
  • New toolbar icons: checkmark (verify) and arrow (upload)
  • (Nicholas Zambetti) New color scheme, document icon, about image (ToDo)
  • Support for uploading sketches from within the IDE: hold shift while clicking upload or select "Upload Using Programmer" from the File menu
  • Verbose output (during compilation or uploading) now enabled from within the preferences dialog Language (API)
  • Switching to non-blocking Serial writes with a transmit buffer Serial.flush() now waits for transmission of outgoing data rather than discarding received incoming data
  • Reimplementation of the SoftwareSerial library to support multiple ports (NewSoftSerial by Mikal Hart)
  • Removed Matrix and Sprite libraries
  • Serial.print(byte) now prints the digits of the number as characters; use write() to send as a single byte
  • Removed the ability to say "client == NULL" or "client != NULL" from Ethernet library; use "if (client)" or "if (!client)" instead
  • Reimplementation of String class (Paul Stoffregen + additional modifications)
  • Added support for Flash-based strings using the F("string") syntax
  • Added DHCP and DNS support to the Ethernet library (integration by Adrian McEwen)
  • Modified UDP API
  • Addition of IPAddress class (Adrian McEwen)
  • Modified Wire library to inherit from Stream (use read(), write(), print(), println(), etc)
  • Adding support for multiple open files and directory iteration in SD card library (Limor Fried)
  • Added serialEvent() function, called automatically on reception of serial data if it exists
  • Also, serialEvent1(), serialEvent2(), and serialEvent3() on the Mega Internals
  • Renamed WProgram.h to Arduino.h
  • Pin definitions separated from the core and stored in new pins/ sub-directory
  • Specified by the BOARD.Build.pins preference in boards.txt

marcmccomb

Thu, 11 Aug 2011 20:31:40 +0000

Hi Avenue:

Actually, many of the modifications to the new Arduino 1.0 will be as a result of improvements made during the development of the MPIDE. Rick Anderson from FUBAR labs who developed the MPIDE is working closely with David Mellis on implementing his fixes into the Arduino 1.0. Therefore, you can almost consider the MPIDE a precursor for upcoming 1.0 release. As for some of the changes being made to source file naming, new functions and so on, and basically aesthetics to the IDE, we really want to make sure that any bugs are identified and fixed before porting these to the chipKIT boards. Our commitment is to develop a "rock solid" version of MPIDE based on 0022. At this time, our main focus is to tweak and fine-tune the existing core functions and standard libraries so that they are a little more efficient. In fact, we should have a new build out shortly that will have some recent additions that users should find helpful including a nice version of attachInterrupt()/detachInterrupt().


avenue33

Fri, 12 Aug 2011 07:51:49 +0000

Hi Marc,

Thank you for the detailed answer, and good luck to the developers!


ricklon

Mon, 15 Aug 2011 00:41:20 +0000

I'm actively working to get the multiplatofrm capability added to Arduino 1.0. I would like the process to be easier for people to deliver excellent library support across many platforms, and not have support a custom editor per platform.

In terms of libraries the idea is to be compatible with the existing 0022 code base, and then focus on getting the libraries to match the 1.0 library updates.

--Rick


aaknitt

Mon, 09 Jan 2012 16:32:51 +0000

Is there any update on adding the new Arduino 1 functions to MPIDE? Or is there a list somewhere of differences between MPIDE and Arduino 0022? Specifically, I'm wondering about the serialEvent() function, as this is something I'd like to use but doesn't seem to be supported by the latest MPIDE.

Regards,

Andy


Jacob Christ

Tue, 17 Jan 2012 00:15:22 +0000

Is there any update on adding the new Arduino 1 functions to MPIDE? Or is there a list somewhere of differences between MPIDE and Arduino 0022? Specifically, I'm wondering about the serialEvent() function, as this is something I'd like to use but doesn't seem to be supported by the latest MPIDE. Regards, Andy

I haven't had time to dig into the new IDE but you might look at the closed issues. If its not there and there is no open issue you should add the issue so that its tracked.

https://github.com/chipKIT32/chipKIT32-MAX

Jacob


avenue33

Tue, 17 Jan 2012 09:18:25 +0000

Going from 0023 to 1.0 implies important changes and a careful editing of previous code:

  • WProgram.h is changed for Arduino.h
  • all serial and I2C libraries are changed: Wire.send becomes Wire.write, and alike
  • String functions are in-place now: s=s.trim(); becomes s.strim();
  • etc

For reasons discussed :arrow: here, I'm keeping Arduino 0023.

In the meantime, I strongly recommend reading very carefully

to get an exact picture of the changes and the consequences of the new release.


owendelong

Wed, 22 Feb 2012 16:01:29 +0000

OK, so, I admit that I'm new to the chipKit stuff and the mpIDE.

However, at this point, for better or worse, most of the Arduino community is developing on 1.0 IDE and that means that most of the third-party libraries are written for the 1.0 environment.

This means that if I want to move up to Max32 from my Arduino Mega 2560 and I've already built interaction with a bunch of external hardware (i.e. have dependencies on third-party libraries), I've got two choices:

  1. Wait for mpIDE with 1.0 support (or Arduino 1.0 with MP support) to come out
  2. Spend a whole lot of time and energy backporting a bunch of libraries I didn't write from 1.0 to 022/023.

Certainly, the more cost-effective and convenient solution is option 1. Given Rick's message from August, I'd even say this option is somewhat hopeful. However, Rick makes no mention of a timeframe.

I realize that this is open source and people are (mostly) doing this as volunteers. I'm not trying to push anyone to accelerate a delivery date (though I wouldn't mind if that happened), but, it would be nice to have a realistic estimate on which one can base decisions.

I'd hate to spend a bunch of time backporting libraries only to find out that 1.0 support was available a few days later. Conversely, I'd hate to wait months to start backporting libraries hoping that 1.0 support was coming soon only to discover it's still a year away.

Any advice is appreciated.


avenue33

Wed, 22 Feb 2012 21:12:46 +0000

I've got two choices:

  1. Wait for mpIDE with 1.0 support (or Arduino 1.0 with MP support) to come out
  2. Spend a whole lot of time and energy backporting a bunch of libraries I didn't write from 1.0 to 022/023.

I've taken option 1.

So my libraries are blocked. This is a very serious drawback.

Differences between 0023 and 1.0 are numerous and subtle. Putting conditional compilation tags everywhere to deal with both versions is rather inelegant and makes the code hard to read and maintain.

Just a question: is there a link between the late chipKIT 1.0 and the delayed Arduino DUE release :?:


ricklon

Wed, 29 Feb 2012 20:15:37 +0000

I've done an analysis of the all changes to the APIs for version 1.0. So I've got a good idea of the scope of the changes. There are some questions about how we want to include the updated 0100 code. We could support both the 0023 and the 0100 libraries. There are a couple options:

  1. Find a way to configure a compile target and have the same set of libraries support both 0023, and 0100, and be able to define a value of what version you wanted the code compiled for.

  2. Have the choice of either platform be an option in Preferences.

I'm interested in other options as well. For instance there are lot of boards in the drop down list do we want to be able to customize the board list?

We can also support adding new toolchains by adding them to a "hardware" folder located in the users Sketch directory.

There would be a platforms.txt configured for 0023, and 0100. They would share everything but the location of the libraries, and core.

So for support of Arduino 1.0/1.x I'd like to narrow this down to one clean narrative and goal. That we all share.

-_Rick


avenue33

Wed, 29 Feb 2012 20:50:07 +0000

Thank you for the update. Is there an ETA?

Dealing with multiple and non-compatible releases is difficult, messy and prone to errors.

Code with multiple

#if ARDUINO >= 100 
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

is hard to read, especially when the sketch has multiple Wire.send/write and Wire.receive/read.

IMHO I'd rather prefer and opt for a big bang. Because MPIDE 0023 is very stable, let's keep it and have an independent MPIDE 1.0.

On the embedXcode project, I'm using the Arduino.app for Arduino boards, MPIDE.app for chipKIT boards, and the same is true for other Processing-based IDEs for their respective boards, just a specific makefile away.


lloyddean

Wed, 29 Feb 2012 23:28:42 +0000

And I prefer a single IDE for all of the Arduino work-a-like boards. I very much dislike having multiple IDE's that all interfere with each other on double clicking 'pde' files to bring up there respective IDE. Pain in the ...

Then there is the school environment where student have different boards depending on the project requirements.


owendelong

Fri, 02 Mar 2012 06:31:56 +0000

Rick,

I think that #ifdef in the libraries that choose to support both is a fine idea.

However, I think it would be better not to block on this. My concern is getting MPIDE moved forward to 1.0 compatibility because the majority of the third-party libraries (at least the ones I'm finding for the devices I'm using) are developed to 1.0 without looking back to 0023.

I would much rather see an MPIDE with 1.0 support and 1.0 compatible libraries than have it take a bunch more time to get the MPIDE up to snuff with 1.0 code.

There are enough challenges in porting stuff from Arduino to Max32 (overloaded pins, crazy pin layouts (if you want an 8 bit parallel set of pins on a single register, the Ardunio Mega provides only pins 22-29, but, you have to use 30-37 on the Max 32) differing approaches to low-level IO (a standard library that did the right thing for each platform underneath would be WAY COOL!) and weird AVR-specific mechanisms like PROGMEM peppered throughout libraries, etc.

For an "Arduino Compatible" board, getting my hardware working on the Max32 has been an unexpected adventure.

Don't get me wrong, I LOVE that my frame rate has gone from 250ms+/frame to ~25ms/frame and that my buttons have become reasonably responsive (well, too responsive on the touchscreen soft buttons, but, I'll find and fix that bug eventually).

I LOVE that the TCP/IP is a library and not a chip-based mechanism (I want to dual-stack my Max32 eventually). I think I found an IPv6 library for it and there is already the IPv4 library that ships with the MPIDE, so, hopefully I can marry them.

Another example, however, is that the MPIDE Ethernet Library has functionality in 0023 beyond the Arduino 0023 Ethernet Library, but, falls short of the Ethernet Library in Arduino 1.0.

So, in short, doing whatever can make the most third-party libraries work with Max32 with the smallest amount of consternation, confusion, and customization by the developer is what I would hope would be the priority.


ricklon

Sat, 03 Mar 2012 16:20:04 +0000

I think some of what you've run into with the max32 would be a good addition to the wiki.

So far the open source newlib compiler from Jason Kajitia is working well. I was hoping to do the 1.0.1,x implementation off of that compiler. I just got the source code building for it, and it's working good. I just have to finish running every sketch on it for Mac, Windows, and Linux. Once that's done I'll do a new test build. Also, I'll be closing many of the recently fixed issues as soon as I confirm them fixed.

Getting 1.0 libraries update is going to be a big task for this group to do the updates. I've been working on a document that breaks the changes down library by libraru. As soon as it's ready I can put that up on the wiki. Then we'll need to add each library to the issue list in Github with the description of changes. We can close off the issues as each one is updated, and confirmed updated.

Lastly, since getting to 1.0/1.x is big effort and we need all hands on deck .I've set up a ChipKit developer mailing list: http://chipkit-dev.posterous.com/welcome-to-the-chipkit-developer-mailing-list

I'm hoping to eventually get a chipkit domain for it. But we need to start somewhere.

--Rick


owendelong

Tue, 06 Mar 2012 19:45:57 +0000

I think some of what you've run into with the max32 would be a good addition to the wiki. So far the open source newlib compiler from Jason Kajitia is working well. I was hoping to do the 1.0.1,x implementation off of that compiler. I just got the source code building for it, and it's working good. I just have to finish running every sketch on it for Mac, Windows, and Linux. Once that's done I'll do a new test build. Also, I'll be closing many of the recently fixed issues as soon as I confirm them fixed. Getting 1.0 libraries update is going to be a big task for this group to do the updates. I've been working on a document that breaks the changes down library by libraru. As soon as it's ready I can put that up on the wiki. Then we'll need to add each library to the issue list in Github with the description of changes. We can close off the issues as each one is updated, and confirmed updated. Lastly, since getting to 1.0/1.x is big effort and we need all hands on deck .I've set up a ChipKit developer mailing list: http://chipkit-dev.posterous.com/welcome-to-the-chipkit-developer-mailing-list I'm hoping to eventually get a chipkit domain for it. But we need to start somewhere. --Rick

Thanks, Rick. Your efforts are greatly appreciated.

I'm willing to help with the library updates once the needs are defined (though my limited coding abilities may limit the usefulness of said willingness).

I will try to post some stuff to the wiki.

Owen


owendelong

Tue, 06 Mar 2012 19:53:24 +0000

I think some of what you've run into with the max32 would be a good addition to the wiki.

Apparently getting a wiki account involves posting to the forum and hoping someone that can create one notices. I've posted in what I think is the appropriate topic. Seems an odd process.


ricklon

Wed, 07 Mar 2012 05:56:51 +0000

I think there was a spam issue with the Wiki a while ago. I'm checking with the maintainer of it and see what the issues are and the I'll check out the wiki version. Hopefully, Wednesday will have some action on it.


owendelong

Wed, 07 Mar 2012 19:13:35 +0000

I think there was a spam issue with the Wiki a while ago. I'm checking with the maintainer of it and see what the issues are and the I'll check out the wiki version. Hopefully, Wednesday will have some action on it.

Got the email with my account information this morning.

Posted my (expanded) information to the WIki under Programming hints:

http://www.chipkit.cc/wiki/index.php?title=Programming_Hints

Hopefully people will find the information useful. It also has some suggestions for future direction for MPIDE.