Merge remote-tracking branch 'origin/dev' into feature/usb-common

This commit is contained in:
ardnew
2021-09-08 23:46:21 -05:00
90 changed files with 2826 additions and 565 deletions
+8
View File
@@ -0,0 +1,8 @@
{
"inherits": ["atsamd21g18a"],
"build-tags": ["arduino_mkrwifi1010"],
"serial": "usb",
"serial-port": ["acm:2341:8054", "acm:2341:0054"],
"flash-command": "bossac -i -e -w -v -R -U --port={port} --offset=0x2000 {bin}",
"flash-1200-bps-reset": "true"
}
+1 -1
View File
@@ -2,7 +2,7 @@
MEMORY
{
FLASH_TEXT (rw) : ORIGIN = 0x00000000+0x26000, LENGTH = 0xED000-0x26000 /* SoftDevice S140. See https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/hathach-memory-map. Application starts at 0x26000; user data starts at 0xED000 */
RAM (xrw) : ORIGIN = 0x20004180, LENGTH = 37K
RAM (xrw) : ORIGIN = 0x20004180, LENGTH = 0x20040000-0x20004180
}
_stack_size = 2K;
+42 -10
View File
@@ -5,16 +5,48 @@
_start:
b start_vector
.fill 156,1,0 // Nintendo Logo Character Data (8000004h)
.fill 16,1,0 // Game Title
.byte 0x30,0x31 // Maker Code (80000B0h)
.byte 0x96 // Fixed Value (80000B2h)
.byte 0x00 // Main Unit Code (80000B3h)
.byte 0x00 // Device Type (80000B4h)
.fill 7,1,0 // unused
.byte 0x00 // Software Version No (80000BCh)
.byte 0xf0 // Complement Check (80000BDh)
.byte 0x00,0x00 // Checksum (80000BEh)
// ROM header
.byte 0x24,0xff,0xae,0x51,0x69,0x9a,0xa2,0x21,0x3d,0x84,0x82,0x0a,0x84,0xe4,0x09,0xad
.byte 0x11,0x24,0x8b,0x98,0xc0,0x81,0x7f,0x21,0xa3,0x52,0xbe,0x19,0x93,0x09,0xce,0x20
.byte 0x10,0x46,0x4a,0x4a,0xf8,0x27,0x31,0xec,0x58,0xc7,0xe8,0x33,0x82,0xe3,0xce,0xbf
.byte 0x85,0xf4,0xdf,0x94,0xce,0x4b,0x09,0xc1,0x94,0x56,0x8a,0xc0,0x13,0x72,0xa7,0xfc
.byte 0x9f,0x84,0x4d,0x73,0xa3,0xca,0x9a,0x61,0x58,0x97,0xa3,0x27,0xfc,0x03,0x98,0x76
.byte 0x23,0x1d,0xc7,0x61,0x03,0x04,0xae,0x56,0xbf,0x38,0x84,0x00,0x40,0xa7,0x0e,0xfd
.byte 0xff,0x52,0xfe,0x03,0x6f,0x95,0x30,0xf1,0x97,0xfb,0xc0,0x85,0x60,0xd6,0x80,0x25
.byte 0xa9,0x63,0xbe,0x03,0x01,0x4e,0x38,0xe2,0xf9,0xa2,0x34,0xff,0xbb,0x3e,0x03,0x44
.byte 0x78,0x00,0x90,0xcb,0x88,0x11,0x3a,0x94,0x65,0xc0,0x7c,0x63,0x87,0xf0,0x3c,0xaf
.byte 0xd6,0x25,0xe4,0x8b,0x38,0x0a,0xac,0x72,0x21,0xd4,0xf8,0x07
// Game title
.byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
// Game code
.byte 0x00,0x00,0x00,0x00
// Maker code
.byte 0x00,0x00
// Fixed value
.byte 0x96
// Main unit code
.byte 0x00
// Device type (0x00 retail, 0x80 debug)
.byte 0x00
// Reserved
.byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00
// Software version
.byte 0x00
// Complement check
.byte 0x51
// Reserved area
.space 98
start_vector:
// Configure stacks
+12
View File
@@ -0,0 +1,12 @@
{
"inherits": ["nrf52840"],
"build-tags": ["mdbt50qrx", "nrf52840_reset_uf2", "softdevice", "s140v6"],
"serial": "usb",
"flash-1200-bps-reset": "true",
"flash-method": "msd",
"serial-port": ["acm:239a:801b", "acm:239a:010b", "acm:239a:810c"],
"msd-volume-name": "MDBT50QBOOT",
"msd-firmware-name": "firmware.uf2",
"uf2-family-id": "0xADA52840",
"linkerscript": "targets/circuitplay-bluefruit.ld"
}
+3 -1
View File
@@ -9,5 +9,7 @@
"rp2040-boot-patch": true,
"extra-files": [
"src/device/rp/rp2040.s"
]
],
"openocd-transport": "swd",
"openocd-target": "rp2040"
}
+4
View File
@@ -285,6 +285,10 @@
throw 'trying to exit with code ' + code;
}
},
random_get: (bufPtr, bufLen) => {
crypto.getRandomValues(loadSlice(bufPtr, bufLen));
return 0;
},
},
env: {
// func ticks() float64