Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Klipper3d/klipper.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2022-06-18 19:38:58 +0300
committerKevin O'Connor <kevin@koconnor.net>2022-06-20 20:03:58 +0300
commitd3c4ba4839dd7a4339ae024752e6c6424884c185 (patch)
treec619e9722a95fdd132015debee8f9f8690f10854
parent9e52dc337fdae5f4cb98744f75cdcd61a1fa2c07 (diff)
rp2040: Add a Kconfig option for selecting "generic_03H" flash type
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--lib/rp2040/boot_stage2/boot2_generic_03h.S2
-rw-r--r--lib/rp2040/rp2040.patch13
-rw-r--r--src/rp2040/Kconfig10
3 files changed, 24 insertions, 1 deletions
diff --git a/lib/rp2040/boot_stage2/boot2_generic_03h.S b/lib/rp2040/boot_stage2/boot2_generic_03h.S
index a10e66abd..cc7e4fbc7 100644
--- a/lib/rp2040/boot_stage2/boot2_generic_03h.S
+++ b/lib/rp2040/boot_stage2/boot2_generic_03h.S
@@ -16,7 +16,7 @@
// 4-byte checksum. Therefore code size cannot exceed 252 bytes.
// ----------------------------------------------------------------------------
-#include "pico/asm_helper.S"
+//#include "pico/asm_helper.S"
#include "hardware/regs/addressmap.h"
#include "hardware/regs/ssi.h"
diff --git a/lib/rp2040/rp2040.patch b/lib/rp2040/rp2040.patch
index 0aa24bd58..bae9e6d1b 100644
--- a/lib/rp2040/rp2040.patch
+++ b/lib/rp2040/rp2040.patch
@@ -1,3 +1,16 @@
+diff --git a/lib/rp2040/boot_stage2/boot2_generic_03h.S b/lib/rp2040/boot_stage2/boot2_generic_03h.S
+index a10e66abd..cc7e4fbc7 100644
+--- a/lib/rp2040/boot_stage2/boot2_generic_03h.S
++++ b/lib/rp2040/boot_stage2/boot2_generic_03h.S
+@@ -16,7 +16,7 @@
+ // 4-byte checksum. Therefore code size cannot exceed 252 bytes.
+ // ----------------------------------------------------------------------------
+
+-#include "pico/asm_helper.S"
++//#include "pico/asm_helper.S"
+ #include "hardware/regs/addressmap.h"
+ #include "hardware/regs/ssi.h"
+
diff --git a/lib/rp2040/boot_stage2/boot2_w25q080.S b/lib/rp2040/boot_stage2/boot2_w25q080.S
index ad3238e2..8fb3def4 100644
--- a/lib/rp2040/boot_stage2/boot2_w25q080.S
diff --git a/src/rp2040/Kconfig b/src/rp2040/Kconfig
index 95db68bca..8bad20c98 100644
--- a/src/rp2040/Kconfig
+++ b/src/rp2040/Kconfig
@@ -52,12 +52,22 @@ config FLASH_START
# Bootloader options
######################################################################
+choice
+ prompt "Flash chip" if LOW_LEVEL_OPTIONS
+ config RP2040_FLASH_W25Q080
+ bool "W25Q080 with CLKDIV 2"
+ config RP2040_FLASH_GENERIC_03
+ bool "GENERIC_03H with CLKDIV 4"
+endchoice
+
config RP2040_STAGE2_FILE
string
+ default "boot2_generic_03h.S" if RP2040_FLASH_GENERIC_03
default "boot2_w25q080.S"
config RP2040_STAGE2_CLKDIV
int
+ default 4 if RP2040_FLASH_GENERIC_03
default 2