Skip to content
This repository was archived by the owner on Jan 29, 2024. It is now read-only.

Commit 02661fc

Browse files
committed
make Crossworks compatible; increment bcdDevice in USB descriptor to make change evident
1 parent 2f78bb9 commit 02661fc

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ The USBCRM mode should be universal, as it doesn't depend on optional external c
4848

4949
Pre-compiled images are already available via this project's Releases tab.
5050

51-
[Rowley Crossworks for ARM](http://www.rowley.co.uk/arm/) is presently suggested to compile this code, as it includes support for Clang; at this time, I am not aware of any other ready-to-use (and multi-OS to boot) Clang ARM cross-compiler package that I can readily point users to. With Crossworks for ARM v4.6.1, compiling v1.05 using the Clang 9.0.1 compiler produces a 1003 byte image. The more mainstream GCC lags behind Clang, although more recent GCC versions produce code that is less overweight than in years past.
51+
[Rowley Crossworks for ARM](http://www.rowley.co.uk/arm/) is presently suggested to compile this code, as it includes support for Clang; at this time, I am not aware of any other ready-to-use (and multi-OS to boot) Clang ARM cross-compiler package that I can readily point users to. With Crossworks for ARM v4.8.1, compiling v1.06 using the Clang 11.1.0 compiler produces a 995 byte image. The more mainstream GCC lags behind Clang, although more recent GCC versions produce code that is less overweight than in years past.
5252

53-
|bootloader variant|Clang 9.0.1 (-O1) |GNU Arm 2018-q3 (-Os) |GNU Arm 2019-q4 (-Os) |
54-
|------------------|------------------|----------------------|----------------------|
55-
| USE_DBL_TAP | 1003 bytes | 1044 bytes (too big!)| 1041 bytes (too big!)|
56-
| GPIO input | 979 bytes | 1008 bytes | 1006 bytes |
53+
|bootloader variant|Clang 9.0.1 (-O1) |Clang 11.1.0 (-O1) |GNU Arm 2018-q3 (-Os) |GNU Arm 2019-q4 (-Os) |
54+
|------------------|------------------|-------------------|----------------------|----------------------|
55+
| USE_DBL_TAP | 1003 bytes | 995 bytes | 1044 bytes (too big!)| 1041 bytes (too big!)|
56+
| GPIO input | 979 bytes | 975 bytes | 1008 bytes | 1006 bytes |
5757

5858
A Makefile supporting GCC is provided, but even if you have the latest GCC, it may not be able to output a version within the 1024 bytes available. The latest GCC for ARM can be here: [GNU Arm Embedded Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm). Note that if you are adapting the Makefile for use with clang, try replacing the "-Os" argument in CFLAGS with something like "-O1" if the output size is larger than expected.
5959

bootloader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static void USB_Service(void)
227227

228228
#ifdef USE_DBL_TAP
229229
#define DBL_TAP_MAGIC 0xf02669ef
230-
static volatile uint32_t __attribute__((section(".dont_move"))) double_tap;
230+
static volatile uint32_t __attribute__((section(".vectors_ram"))) double_tap;
231231
#endif
232232

233233
void bootloader(void)

linker/samd11d14.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ SECTIONS
6969

7070
.dont_move_block (NOLOAD): ALIGN(4)
7171
{
72-
*(.dont_move)
72+
*(.vectors_ram)
7373
}
7474

7575
.data : ALIGN(4)

0 commit comments

Comments
 (0)