Skip to content

Commit 9bb9641

Browse files
authored
Merge pull request #2639 from fanoush/f-microbit2
update micro:bit v2
2 parents 1ccded2 + 3d354f4 commit 9bb9641

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

boards/MICROBIT2.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
# TODO:
1919
# Move to SDK17 with proper nRF52833 support
20-
# - expand RAM to 128k
2120
# Proper event handling for accelerometer/etc
2221
# Functions for sound
2322

@@ -39,11 +38,17 @@
3938
# 'NET',
4039
'GRAPHICS',
4140
'NEOPIXEL',
42-
'TENSORFLOW'
41+
'TENSORFLOW',
42+
'JIT'
4343
],
4444
'makefile' : [
4545
'DEFINES += -DCONFIG_GPIO_AS_PINRESET', # Allow the reset pin to work
46+
'DEFINES += -DNRF_BLE_GATT_MAX_MTU_SIZE=53 -DNRF_BLE_MAX_MTU_SIZE=53', # increase MTU from default of 23
47+
'DEFINES += -DCENTRAL_LINK_COUNT=2 -DNRF_SDH_BLE_CENTRAL_LINK_COUNT=2', # allow two outgoing connections at once
48+
'LDFLAGS += -Xlinker --defsym=LD_APP_RAM_BASE=0x3290', # set RAM base to match MTU=53 + CENTRAL_LINK_COUNT=2
49+
'LDFLAGS += -nostartfiles', 'ASFLAGS += -D__STARTUP_CLEAR_BSS -D__START=main', # Save ~300b by not including CRT startup code
4650
'DEFINES += -DNEOPIXEL_SCK_PIN=27 -DNEOPIXEL_LRCK_PIN=18', # SCK pin needs defining as something unused for neopixel (HW errata means they can't be disabled)
51+
'DEFINES+=-DESPR_PACKED_SYMPTR', # Pack builtin symbols' offset into pointer to save 2 bytes/symbol
4752
'DEFINES += -DGPIO_COUNT=2 -DP1_PIN_NUM=16 -DNRF_P1_BASE=0x50000300UL "-DNRF_P1=((NRF_GPIO_Type*)NRF_P1_BASE)"', # Hack for 52833 on SDK12
4853
'DEFINES += -DMICROBIT', # enable microbit-specific stuff
4954
'INCLUDE += -I$(ROOT)/libs/microbit',
@@ -59,9 +64,9 @@
5964
'part' : "NRF52832", # actually 52833 but we're using SDK12 for this at the moment, and it doesn't support it
6065
'family' : "NRF52",
6166
'package' : "QFN48",
62-
'ram' : 64,
67+
'ram' : 128,
6368
'flash' : 512,
64-
'speed' : 64, # TODO: actually 128k
69+
'speed' : 64,
6570
'usart' : 1,
6671
'spi' : 1,
6772
'i2c' : 1,

0 commit comments

Comments
 (0)