File tree Expand file tree Collapse file tree 5 files changed +83
-0
lines changed
linker/russian-woodpecker
src/targets/russian-woodpecker Expand file tree Collapse file tree 5 files changed +83
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ INCLUDE sam3u/sam3u2.ld
Original file line number Diff line number Diff line change 1+ family = ' sam3u'
2+ has-config = true
Original file line number Diff line number Diff line change 1+ /*
2+ * SPDX-License-Identifier: MIT
3+ * SPDX-FileCopyrightText: 2021 Rafael Silva <perigoso@riseup.net>
4+ */
5+
6+ /* clang-format off */
7+
8+ /* General Config */
9+
10+ #define __SAM3U2C__
11+
12+ /* Clock Config */
13+ #define EXTERNAL_CLOCK_VALUE 12000000UL
Original file line number Diff line number Diff line change 1+ /*
2+ * SPDX-License-Identifier: MIT
3+ * SPDX-FileCopyrightText: 2022 Rafael Silva <perigoso@riseup.net>
4+ */
5+
6+ #include "util/data.h"
7+ #include "util/types.h"
8+
9+ #include "platform/sam3u/eefc.h"
10+ #include "platform/sam3u/pmc.h"
11+ #include "platform/sam3u/wdt.h"
12+
13+ void main ()
14+ {
15+ pmc_init (EXTERNAL_CLOCK_VALUE , 0UL );
16+ pmc_update_clock_tree ();
17+
18+ wdt_disable ();
19+
20+ // systick_init();
21+
22+ for (;;) {
23+ }
24+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * SPDX-License-Identifier: MIT
3+ * SPDX-FileCopyrightText: 2021 Rafael Silva <perigoso@riseup.net>
4+ */
5+
6+ /* Common Configuration */
7+
8+ #define CFG_TUSB_MCU OPT_MCU_SAM3U
9+
10+ #define CFG_TUSB_OS OPT_OS_NONE
11+
12+ #define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED)
13+
14+ /*
15+ * USB DMA on some MCUs can only access a specific SRAM region with restriction on alignment.
16+ * Tinyusb use follows macros to declare transferring memory so that they can be put
17+ * into those specific section.
18+ * e.g
19+ * - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
20+ * - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
21+ */
22+ #ifndef CFG_TUSB_MEM_SECTION
23+ #define CFG_TUSB_MEM_SECTION
24+ #endif
25+
26+ #ifndef CFG_TUSB_MEM_ALIGN
27+ #define CFG_TUSB_MEM_ALIGN __attribute__((aligned(4)))
28+ #endif
29+
30+ /* Device Configuration */
31+
32+ #define CFG_TUD_ENDPOINT0_SIZE 64
33+
34+ /* Class */
35+ #define CFG_TUD_HID 3
36+ #define CFG_TUD_CDC 0
37+ #define CFG_TUD_MSC 0
38+ #define CFG_TUD_MIDI 0
39+ #define CFG_TUD_VENDOR 0
40+
41+ /* HID buffer size Should be sufficient to hold ID (if any) + Data */
42+ #define CFG_TUD_HID_BUFSIZE 64
You can’t perform that action at this time.
0 commit comments