Skip to content

Commit 3d354f4

Browse files
committed
sync micro:bit V2 board with others (MTU 53, 2 centrals, packed symbols, omit startup code)
1 parent f18e6e0 commit 3d354f4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

boards/MICROBIT2.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@
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',

0 commit comments

Comments
 (0)