From 41551c8ab657fb60935fec4419971d1663c0a8c9 Mon Sep 17 00:00:00 2001 From: fanoush Date: Wed, 11 Jun 2025 00:23:41 +0200 Subject: [PATCH 1/3] ram size already was 128k, update wrong info --- boards/MICROBIT2.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/boards/MICROBIT2.py b/boards/MICROBIT2.py index d0e428427f..9f43e101bd 100644 --- a/boards/MICROBIT2.py +++ b/boards/MICROBIT2.py @@ -17,7 +17,6 @@ # TODO: # Move to SDK17 with proper nRF52833 support -# - expand RAM to 128k # Proper event handling for accelerometer/etc # Functions for sound @@ -59,9 +58,9 @@ 'part' : "NRF52832", # actually 52833 but we're using SDK12 for this at the moment, and it doesn't support it 'family' : "NRF52", 'package' : "QFN48", - 'ram' : 64, + 'ram' : 128, 'flash' : 512, - 'speed' : 64, # TODO: actually 128k + 'speed' : 64, 'usart' : 1, 'spi' : 1, 'i2c' : 1, From f18e6e02d45afe6d99ceedb280ea8c7e06fb1bd9 Mon Sep 17 00:00:00 2001 From: fanoush Date: Wed, 11 Jun 2025 00:25:52 +0200 Subject: [PATCH 2/3] enable JIT for micro:bit V2 --- boards/MICROBIT2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/boards/MICROBIT2.py b/boards/MICROBIT2.py index 9f43e101bd..ee15922268 100644 --- a/boards/MICROBIT2.py +++ b/boards/MICROBIT2.py @@ -38,7 +38,8 @@ # 'NET', 'GRAPHICS', 'NEOPIXEL', - 'TENSORFLOW' + 'TENSORFLOW', + 'JIT' ], 'makefile' : [ 'DEFINES += -DCONFIG_GPIO_AS_PINRESET', # Allow the reset pin to work From 3d354f43abc30819190f434a108c292e3b37f4c9 Mon Sep 17 00:00:00 2001 From: fanoush Date: Wed, 11 Jun 2025 00:31:19 +0200 Subject: [PATCH 3/3] sync micro:bit V2 board with others (MTU 53, 2 centrals, packed symbols, omit startup code) --- boards/MICROBIT2.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/boards/MICROBIT2.py b/boards/MICROBIT2.py index ee15922268..0e0a99170b 100644 --- a/boards/MICROBIT2.py +++ b/boards/MICROBIT2.py @@ -43,7 +43,12 @@ ], 'makefile' : [ 'DEFINES += -DCONFIG_GPIO_AS_PINRESET', # Allow the reset pin to work + 'DEFINES += -DNRF_BLE_GATT_MAX_MTU_SIZE=53 -DNRF_BLE_MAX_MTU_SIZE=53', # increase MTU from default of 23 + 'DEFINES += -DCENTRAL_LINK_COUNT=2 -DNRF_SDH_BLE_CENTRAL_LINK_COUNT=2', # allow two outgoing connections at once + 'LDFLAGS += -Xlinker --defsym=LD_APP_RAM_BASE=0x3290', # set RAM base to match MTU=53 + CENTRAL_LINK_COUNT=2 + 'LDFLAGS += -nostartfiles', 'ASFLAGS += -D__STARTUP_CLEAR_BSS -D__START=main', # Save ~300b by not including CRT startup code '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) + 'DEFINES+=-DESPR_PACKED_SYMPTR', # Pack builtin symbols' offset into pointer to save 2 bytes/symbol '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 'DEFINES += -DMICROBIT', # enable microbit-specific stuff 'INCLUDE += -I$(ROOT)/libs/microbit',