xmos / lib_xud

USB device library
Other
9 stars 25 forks source link

Fix stringDescriptors declaration for XC #317

Closed syrykh closed 2 years ago

syrykh commented 2 years ago

Without an unsafe block the AN00129_hid_class example is crashing on x200 with the following error:

xrun: Program received signal ET_LOAD_STORE, Memory access exception.
      [Switching to tile[0] core[1]]
      0x00042ee4 in strnlen ()

And the following stacktrace:

6 strnlen() 0x00042ee4
5 _safe_strlen() 0x00042dc4
4 USB_StandardRequests() xud_device.xc:392 0x00041c45
3 Endpoint0() 0x00040695
...

The crash was bisected to commit 9b14001 and it was checked that adding unsafe block (and unsafe keyword for stringDescriptors) resolves the issue.

xross commented 2 years ago

Thank you for the fix. Our internal checking will fail at the moment since the copyright comment is "2021" it should now be "2021-2022"

syrykh commented 2 years ago

it should now be "2021-2022"

Fixed. Thank you!