Skip to content

Commit a8497c7

Browse files
committed
On Bangle.js 2 iflash/noflash builds update the available flash pages as it looks like FS is using one more than we thought (#2667)
1 parent 798099c commit a8497c7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

boards/BANGLEJS2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@
118118
'adc' : 1,
119119
'dac' : 0,
120120
'saved_code' : {
121-
# 'address' : ((246 - 20) * 4096), # Bootloader takes pages 248-255, FS takes 246-247
121+
# 'address' : ((245 - 20) * 4096), # Bootloader takes pages 248-255, FS takes 245-247
122122
'page_size' : 4096,
123123
# 'pages' : 20,
124-
'flash_available' : 1024 - ((38 + 8 + 2 + 20)*4), # Softdevice uses 0x26=38 pages of flash, bootloader 8, FS 2, code 20. Each page is 4 kb.
124+
'flash_available' : 1024 - ((38 + 8 + 3 + 20)*4), # Softdevice uses 0x26=38 pages of flash, bootloader 8, FS 3, code 20. Each page is 4 kb.
125125
# 'address2' : 0x60000000, # put this in external spiflash (see below)
126126
# 'pages2' : 2048, # Entire 8MB of external flash
127127

boards/BANGLEJS2_IFLASH.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@
127127
'dac' : 0,
128128
'saved_code' : {
129129
'page_size' : 4096,
130-
'address' : ((246 - 68) * 4096), # Bootloader takes pages 248-255, FS takes 246-247
131-
'pages' : 68,
132-
'flash_available' : 1024 - ((38 + 8 + 2 + 68)*4), # Softdevice uses 0x26=38 pages of flash, bootloader 8, FS 2, code 68. Each page is 4 kb.
130+
'address' : ((245 - 67) * 4096), # Bootloader takes pages 248-255, FS takes 245-247
131+
'pages' : 67,
132+
'flash_available' : 1024 - ((38 + 8 + 3 + 68)*4), # Softdevice uses 0x26=38 pages of flash, bootloader 8, FS 3, code 68. Each page is 4 kb.
133133
'address2' : 0x60000000, # put this in external spiflash (see below)
134134
'pages2' : 2048, # Entire 8MB of external flash
135135

boards/BANGLEJS2_NOFLASH.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@
120120
'adc' : 1,
121121
'dac' : 0,
122122
'saved_code' : {
123-
'address' : ((246 - 90) * 4096), # Bootloader takes pages 248-255, FS takes 246-247
123+
'address' : ((245 - 89) * 4096), # Bootloader takes pages 248-255, FS takes 245-247
124124
'page_size' : 4096,
125-
'pages' : 90,
126-
'flash_available' : 1024 - ((38 + 8 + 2 + 90)*4), # Softdevice uses 0x26=38 pages of flash, bootloader 8, FS 2, code 100. Each page is 4 kb.
125+
'pages' : 89,
126+
'flash_available' : 1024 - ((38 + 8 + 3 + 90)*4), # Softdevice uses 0x26=38 pages of flash, bootloader 8, FS 3, code 100. Each page is 4 kb.
127127
},
128128
};
129129

0 commit comments

Comments
 (0)