Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0e178fe

Browse filesBrowse files
committed
Adjust bin size to use sketch.ino.mkrnb1500.bin and NOT sketch.ino.with_bootloader.mkrnb1500.bin
1 parent 9a9d91d commit 0e178fe
Copy full SHA for 0e178fe

File tree

2 files changed

+2181
-2181
lines changed
Filter options

2 files changed

+2181
-2181
lines changed

‎libraries/SBU/extras/SBUBoot/SBUBoot.ino

Copy file name to clipboardExpand all lines: libraries/SBU/extras/SBUBoot/SBUBoot.ino
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int main()
5555
uint32_t read_bytes = 0;
5656

5757
if (updateSize > SBU_SIZE) {
58-
updateSize = updateSize - SBU_SIZE - SBU_START;
58+
updateSize = updateSize - SBU_SIZE;
5959
size_t cycles = (updateSize / blockSize);
6060
size_t spare_bytes = (updateSize % blockSize);
6161
/* Erase the MCU flash */
@@ -65,7 +65,7 @@ int main()
6565
for (auto i = 0; i < cycles; i++) {
6666
uint8_t block[blockSize] { 0 };
6767
digitalWrite(LED_BUILTIN, LOW);
68-
read_bytes = fileUtils.readBlock(UPDATE_FILE_NAME, (i * blockSize) + SBU_SIZE + SBU_START, blockSize, block);
68+
read_bytes = fileUtils.readBlock(UPDATE_FILE_NAME, (i * blockSize) + SBU_SIZE, blockSize, block);
6969
digitalWrite(LED_BUILTIN, HIGH);
7070
mcu_flash.write((void*)flash_address, block, read_bytes);
7171
flash_address += read_bytes;
@@ -75,7 +75,7 @@ int main()
7575
if (spare_bytes){
7676
uint8_t block[spare_bytes] { 0 };
7777
digitalWrite(LED_BUILTIN, LOW);
78-
read_bytes = fileUtils.readBlock(UPDATE_FILE_NAME, tot_bytes + SBU_SIZE + SBU_START, spare_bytes, block);
78+
read_bytes = fileUtils.readBlock(UPDATE_FILE_NAME, tot_bytes + SBU_SIZE, spare_bytes, block);
7979
digitalWrite(LED_BUILTIN, HIGH);
8080
mcu_flash.write((void*)flash_address, block, read_bytes);
8181
flash_address += read_bytes;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.