Nov 06

Microchip’s MPLAB X Gets an update. V1.95 Now available.

Microchip have released an update to their IDE, MPLAB X.
MPLAB X IDE v1.95 is available now for download from here

This seems to be a minor point release with the following main updates since v1.90

  • ICSP cable support for UNI/O
  • SQTP in Aux Memory support
  • Harmony quick start and Forum links
  • Enum label support within watch window
  • Detection of Compiler beta device support
  • Support for selection from multiple tools under MDB
  • Support for multiple instances of IPE or IDE
  • Improved Tool discovery on Windows PC’s (fixed a windows issue where tools were not always detected)
  • Break up of large arrays into 100 sub elements to improve performance in debugging and the watch window.
  • Bug Fixes

On windows MPLAB X now uses the latest Java JRE (v1.7) but on Mac OS X we are still stuck at JRE 1.6 which is a bit of an issue, because OS X will try to push the latest Jave Update to users and many of them will accept it, pushing the system up to JRE 1.7, which breaks various things in MPLAB X. Of particular concern is that one of Microchip’s flagship programmer/debuggers the ICD 3 doesn’t work when JRE 1.7 is present. If a user updates their Mac to JRE 1.7, then it’s not an easy job to revert back to 1.6.

I believe the underlying issue is that MPLAB X is built on NetBeans, and Microchip is using an older fork of NetBeans with some out of date JRE dependencies.

Let’s hope we can convince Microchip to move to being JRE 1.7 compatible pretty soon.

Oct 31

Bug hunting : malloc failed :-(

I’ve been tracking down an elusive bug which was causing one of my devices to occasionally start mis-behaving. The device would respond slowly (if at all) to some commands, and respond normally to others.

It was pretty obvious what the issue was when I attached the debugger and started single-stepping through the code while it was misbehaving.

I landed on the ‘return’ in this code:

prevLen = sizeof(LIST_ITEM)+32;
 pWorkItem = malloc(prevLen);
if(pWorkItem == 0)
 return 0;

so it was obvious I was getting a malloc fail, which meant I had ran out of memory somewhere along the line. The ‘return 0’ meant that the command silently failed, without any feedback to the user.

Continue reading