Open fabiodl opened 3 years ago
Here is the result of 3 days of head scratching (huge thanks for this project, btw!) ;)
USBHost.c has
__at(0x0000) unsigned char __xdata RxBuffer[MAX_PACKET_SIZE]; __at(0x0100) unsigned char __xdata TxBuffer[MAX_PACKET_SIZE];
but the SDCC manual (page 42) reports The compilerdoesnotreserve any space for variables declared in this way (they are implemented with an equate in the assembler). and indeed I had memory corruption.
The compilerdoesnotreserve any space for variables declared in this way (they are implemented with an equate in the assembler).
__at(0x0000) unsigned char __xdata RxBuffer[MAX_PACKET_SIZE]={0}; __at(0x0100) unsigned char __xdata TxBuffer[MAX_PACKET_SIZE]={0};
fixes it
Thank you :)
Here is the result of 3 days of head scratching (huge thanks for this project, btw!) ;)
USBHost.c has
but the SDCC manual (page 42) reports
The compilerdoesnotreserve any space for variables declared in this way (they are implemented with an equate in the assembler).
and indeed I had memory corruption.fixes it