NUCLEO-L433 problem with USB

Hello Lucas,
nice to see you here again.
Unfortunately not, for many reasons. I am usually lazy in my free time but currently I have a lot of work on house and I have also new job position + new project around electric vehicle drive.

About baremetal

  • You have 256kb of flash but RAM is not so big, just 64kb.
  • Mutex is related to RTOS that means full profile of MbedOS, with the bare metal profile there si no RTOS = no mutex.

About USBSerial

  • the setting in mbed_app.json around USB looks OK.
  • Keep in mind you need PC app what will drive DTR signal for the USBSerial, without this will see nothing in terminal anyway.

When set the first paramater false for non blocking, that mean then constructor will not wait for a connection and also you have to care the conection sequnce by your self.
For example we are using it for debugging like this.

USBSerial serial(false);

template<typename... Args> void debugPrint(const char *msg, Args... args){
    if(!serial.configured()){
        serial.connect();            
    }
    
    if(serial.configured()){
        if(!serial.connected()){
            serial.init();    
        }   
    }
    
    if(serial.connected()){
        serial.printf(msg, args...);
        serial.printf("\r");
    } else printf(msg, args...);
}

About console output
you can retarget the output out of UART, for eaxample to USBSerial like this

Or to SWO

BR, Jan