Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 7 months ago.
How to get USBSerial to enumerate with mbed-cli GCC_ARM debug build ?
Working with a MAX32630FTHR, mbed-os 5.11.5 (as 5.12 embeds usb and doesn't have a target for max yet) I've been wracking what I did wrong when my USBSerial object tests started getting run time errors with red led flashing 4x4. The online compiler worked. I see it is using ARM 5. I tried GCC ARM 5/6/7/8 - they all failed. MStudio 0.4 locks up a lot for me so didn't go that route. Thinking the online compiler creates release builds I tried a release build on GCC ARM 8 for giggles and it worked !
Does anyone know the magic to get a debug build USBSerial object connect properly and share please ?
I moved the online program to offline inside a visualgdb environment. I then edited mbed-os debug profile GCC section to remove "MBED_TRAP_ERRORS_ENABLED=1". While there I added "-fsingle-precision-constant", and changed "-O0" to "-Og" per compiler doc recommendation. error("xxx) still halts system without spitting out the error on stderr but /shrug. Ohh also .mbedignore'd the usb directory as I need to used the 5.11.5 method of using an external lib for max32630fthr as 5.12.x doesn't have a target yet. I'll publish a max32630-test program after a test using an older SD card lib if faster than the mbed-os with notes on all the hoops I jumped through to get it all working. FYI, a response from maxim tech support said they are looking into it as they intend to support mbed USB on their devices so that's good - thanks Max !
posted by psion prime 10 May 2019