FwLib_STC8 icon indicating copy to clipboard operation
FwLib_STC8 copied to clipboard

Endianness issue in USB demo when compiled by SDCC

Open eeyrw opened this issue 1 year ago • 0 comments

Here the code apply intentional endianness swap due to KEIL C51 using big endian. But SDCC using small endian so no intentional swap is needed. https://github.com/IOsetting/FwLib_STC8/blob/ba28464aa266653d14e679415f662d5b8fbb9bb4/demo/usb/usb_hid.c#L120-L121 Further more if you do not modify the __CODE and __XDATA marco the code can not be compiled by SDCC.

eeyrw avatar Mar 16 '24 13:03 eeyrw