Serial attach problem

07 Oct 2010 . Edited: 07 Oct 2010

I have a console class which in the constructor uses the attach method. It was working previously with this


Console::Console( Serial& _serial , size_t bufferSize) : serial( _serial ) {

      serial.attach( this, &Console::handleInterrupt, Serial::RxIrq);


But since a few days ago, this code now crashes at startup. I have fixed it by moving the attach method outside of the class for example now in the main.cpp


Serial serial(p28,p27);

Console myconsoleobject(serial,256);

main() {

      myconsoleobject.attach( &console, &Console::handleInterrupt, Serial::RxIrq);


Has anything changed with the compiler?

07 Oct 2010

Hi Jason,

Yes, the beta (4.1) compiler we've been trialling for a while went live yesterday, so it sounds like this might be related.

By way of proving this, can you try temporarily rolling back to the old compiler and just double checking that the same code base compiles, and then let us know.

To roll back your compiler go to the following URL:

Once you have visted that URL you will then be temporarily using the old (4.0) compiler. It will time out after one day, or you can visit the following URL to disable the roll back

Lastly, on the assumption that this is caused by a change in the compiler, would you mind either publishing your project so I can import and have a look. If you;d rather not publish, you could exporting it to a zip file and send directly to





07 Oct 2010 . Edited: 07 Oct 2010

Hey Chris, I just tried to email it. But google mail dont accept .zip files

Final-Recipient: rfc822;
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; host ASPMX.L.GOOGLE.COM[] said:
    552-5.7.0 Our system detected an illegal attachment on your message. Please
    552-5.7.0 visit to
    552 5.7.0 review our attachment guidelines. v1si4905569wfd.113 (in reply to
    end of DATA command)
09 Oct 2010

Can ask very nicely to get a pull down menu to select which compiler the workspace uses? Is this possible, as if I forget to use enable rollback compiler every 24hours. I have to touch every file to get my program to work again. Maybe even a project setting!