chipKIT® Development Platform

Inspired by Arduino™

New User Perspective, free, exceptions.h and a request

Created Mon, 16 Jan 2012 21:07:34 +0000 by username


Mon, 16 Jan 2012 21:07:34 +0000

First - I'm impressed with support for this product and with everyone's level of knowledge and professionalism. So hi!

I've been porting some Arduino libraries (ArdOSC for the curious) and since I've had to do some major surgery I've found / created some pointer errors (surprisingly enough, there weren't much in the alignment category); and tracking them down has not been a pile of fun. What did help TONS was the general exception handler, and especially "whoover"'s exceptions.h ( http:/forum/viewtopic.php?f=16&t=300 )

I want to second the idea that this gets built into the standard libraries... it will really help the folks coming over from Arduino land (and the varying levels of sophistication) to get some sort of useful description of the error they have, maybe even with a pointer back to a discussion on this message board about what sorts of things they should look for. Maybe even a dump of the address and how folks can look at their code to turn the exception location back into which function the it occurred in.

Oh, and one minor thing... I think C99 says it's OK to do a free(0), and that it should be considered a nop. I'm not sure what the other standards say... but it's certainly a common idiom. The current implementation of free doesn't like this as I've learned.

Keep up the awesome work... I've ordered a pickit3 and am looking forward to some inline debugging!