Hello Josh, You need to change settings for "Assert Failures" as well as "Error Log", in order to enable ssp_error_log callbacks. Remember that errors can occur before USB is open (some are not critical however) - if error logging callback calls printf that resolves to USB CDC write, then the application will crash because another error will occur since USB is not yet open - this will result in ssp_error_log being called yet again and you end up in recursive loop that will quickly deplete your stack. I'm attaching a simple example that attempts to open GPT driver with invalid configuration (period too long) and uses ssp_error_log to produce error callbacks to the USB CDC interface. Few things to watch out for: - prevent calls to comms framework if error comes from comms framework - disable optimization for this function as it may be called before everything is fully initialized - use variable to control when the callback can become active (i.e. after USB has been inserted) (Please visit the site to view this file) Regards
↧