mbed lib 80 ok, lib 81, 82 hangs - where can I get the source of each to compare?

18 Apr 2014

My application has been working over several library updates, until version 81. How it hangs and a printf just inside of main is never emitted. My LPC1768 application uses SPI and one digital output (chip select) for a peripheral and USB for debug printf and that's it.

My current assumption is that C++ object constructors are hanging.

I've been studying https://github.com/mbedmicro/mbed to compare version 80 and 81 - but there are literally hundreds of changes. I could use some advice/support on how to root cause this failure.

thanks,

18 Apr 2014

The libs in this version range introduced a problem with digital pins that are declared as NC. Any pinparameter provided as NC or defaulting to NC will lead to a crash at object construction time. Check your code for this case. The problem should have been fixed in the latest mbed source but may not yet have made it in the currently released library. I have fixed this in my component libraries by checking the pinnames that are allowed to be NC and instantiate them through new().

18 Apr 2014

SOLVED !

Thank Wim, this would have taken me a long time to find.

Changing one unused pin in a constructor solved it -

// change 
RA8875 lcd(p5, p6, p7, p12, NC, "tft");
// to
RA8875 lcd(p5, p6, p7, p12, p21, "tft");  

In this RA8875 Graphics Library I was not using the the 5th parameter (definition of a reset pin), so just had to pick an otherwise unused pin to let it work with the mbed lib 81, 82 defect.

18 Apr 2014

As Wim said, the next time a new version is rolled out it should work fine again. Also in mbed-src it is already fixed. Until that time it might be just as simple to stick to version 79, until you really need the newer versions.