Skip to content

Commit 06b9b9e

Browse files
facchinmsandeepmistry
authored andcommitted
Move certs partition before actual firmware
1 parent a1fbf4b commit 06b9b9e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

combine.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
certsData = open("data/roots.pem", "rb").read()
77

88
# calculate the output binary size, app offset
9-
outputSize = 0x190000 + len(certsData) + 1
9+
outputSize = 0x30000 + len(appData)
1010
if (outputSize % 1024):
1111
outputSize += 1024 - (outputSize % 1024)
1212

@@ -21,13 +21,13 @@
2121
outputData[0x8000 + i] = partitionData[i]
2222

2323
for i in range(0, len(appData)):
24-
outputData[0x10000 + i] = appData[i]
24+
outputData[0x30000 + i] = appData[i]
2525

2626
for i in range(0, len(certsData)):
27-
outputData[0x190000 + i] = certsData[i]
27+
outputData[0x10000 + i] = certsData[i]
2828

2929
# zero terminate the pem file
30-
outputData[0x190000 + len(certsData)] = 0
30+
outputData[0x10000 + len(certsData)] = 0
3131

3232
# write out
3333
with open("NINA_W102.bin","w+b") as f:

partitions.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
33
nvs, data, nvs, 0x9000, 0x6000
44
phy_init, data, phy, 0xf000, 0x1000
5-
factory, app, factory, 0x10000, 0x180000
6-
certs, data, 0x04, 0x190000,0x20000
5+
certs, data, 0x04, 0x10000, 0x20000
6+
factory, app, factory, 0x30000, 0x180000

0 commit comments

Comments
 (0)