Cleanup of flash code

Fix several bugs found in the write-flash code during installer coding.
Move all flash functions into CODE0. This is required to share these
functions with the installer image (currently they are duplicated so
they are not within the CODE1 segment).
De-magics all Flash command codes based on the Winbond W25Q32JV
datasheet.
This commit is contained in:
logicog authored and René van Dorst committed 2025-09-26 21:00:47 +02:00
1 parent 2e52bcac8e
commit d4e2b9872d
4 files changed
+72 -62

No files matched your search

+1 -1
View File
@@ -514,7 +514,7 @@ void cmd_parser(void) __banked
}
if (cmd_compare(0, "flash") && cmd_words_b[1] > 0 && cmd_buffer[cmd_words_b[1]] == 'e') {
print_string("\nFLASH erase\n");
flash_block_erase(0x20000);
flash_sector_erase(0x20000);
}
if (cmd_compare(0, "flash") && cmd_words_b[1] > 0 && cmd_buffer[cmd_words_b[1]] == 'w') {
print_string("\nFLASH write\n");