Starting with a fresh clone from master. Compiling on 5.15.7-arch1-1 x86_64 GNU/Linux using arm-none-eabi-gcc 11.2.0-1 leads to two errors:
First src/cdc_enumerate.c: In function 'AT91F_USB_SendZlp': src/cdc_enumerate.c:725:5: error: 'c' may be used uninitialized [-Werror=maybe-uninitialized] 724 | uint8_t c;725 | USB_Write(&c, 0, 0);
which can be fixed by initialising uint8_t c = 0; although c should be overwritten anyway, humor the compiler ;)
Second lib/cmsis/CMSIS/Include/core_cm0plus.h:85:28: error: listing the stack pointer register 'sp' in a clobber list is deprecated [-Werror=deprecated] lib/cmsis/CMSIS/Include/core_cmFunc.h:456:3: note: in expansion of macro '__ASM' 456 | __ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) : "sp");
which can be fixed by omitting "sp"
__ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) : );
The result compiles and was tested working on SAMD21.
Starting with a fresh clone from master. Compiling on 5.15.7-arch1-1 x86_64 GNU/Linux using arm-none-eabi-gcc 11.2.0-1 leads to two errors:
First
src/cdc_enumerate.c: In function 'AT91F_USB_SendZlp': src/cdc_enumerate.c:725:5: error: 'c' may be used uninitialized [-Werror=maybe-uninitialized]
724 | uint8_t c;
725 | USB_Write(&c, 0, 0);
which can be fixed by initialising
uint8_t c = 0;
although c should be overwritten anyway, humor the compiler ;)Second
lib/cmsis/CMSIS/Include/core_cm0plus.h:85:28: error: listing the stack pointer register 'sp' in a clobber list is deprecated [-Werror=deprecated] lib/cmsis/CMSIS/Include/core_cmFunc.h:456:3: note: in expansion of macro '__ASM'
456 | __ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) : "sp");
which can be fixed by omitting "sp"
__ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) : );
The result compiles and was tested working on SAMD21.
Both changes exported from
git diff
compile.patchThank you for your work and effort :)