aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBen V. Brown <[email protected]>2023-08-01 21:10:15 +1000
committerBen V. Brown <[email protected]>2023-08-01 21:10:15 +1000
commita7df1cc5be6ca855da3bd1424c0714e2f570911d (patch)
treed2bcdb4084618cb8368c8cef99de6ff1cc6fdaa2
parent584b3826c3bdd137bf4a0d07ed9d173656afa18a (diff)
downloadIronOS-a7df1cc5be6ca855da3bd1424c0714e2f570911d.tar.gz
IronOS-a7df1cc5be6ca855da3bd1424c0714e2f570911d.zip
Fixup for logo addresses + Set DFU address for PinecilV2
-rw-r--r--source/Core/BSP/MHP30/configuration.h4
-rw-r--r--source/Core/BSP/Pinecilv2/bl_mcu_sdk/drivers/bl702_driver/bl702_flash.ld2
-rw-r--r--source/Core/BSP/Pinecilv2/configuration.h16
-rw-r--r--source/Makefile3
4 files changed, 14 insertions, 11 deletions
diff --git a/source/Core/BSP/MHP30/configuration.h b/source/Core/BSP/MHP30/configuration.h
index 5d4c2eb1..c99afc64 100644
--- a/source/Core/BSP/MHP30/configuration.h
+++ b/source/Core/BSP/MHP30/configuration.h
@@ -164,13 +164,13 @@
#define HARDWARE_MAX_WATTAGE_X10 650
#define TIP_THERMAL_MASS 65 // TODO, needs refinement
#define TIP_RESISTANCE 60 // x10 ohms, ~6 typical
-#endif /* MHP30 */
+#endif /* MHP30 */
#ifdef ACCEL_EXITS_ON_MOVEMENT
#define NO_SLEEP_MODE
#endif
-#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
+#define FLASH_LOGOADDR (0x08000000 + (126 * 1024))
#define SETTINGS_START_PAGE (0x08000000 + (127 * 1024))
#endif /* CONFIGURATION_H_ */
diff --git a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/drivers/bl702_driver/bl702_flash.ld b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/drivers/bl702_driver/bl702_flash.ld
index 37165c60..2ae61c59 100644
--- a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/drivers/bl702_driver/bl702_flash.ld
+++ b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/drivers/bl702_driver/bl702_flash.ld
@@ -22,7 +22,7 @@ __EM_SIZE =8K;
MEMORY
{
- xip_memory (rx) : ORIGIN = 0x23000000, LENGTH = 1022K
+ xip_memory (rx) : ORIGIN = 0x23000000, LENGTH = 1008K /*1024 - 8K header - 4K*2 for settings and logo*/
itcm_memory (rx) : ORIGIN = 0x22014000, LENGTH = 12K
dtcm_memory (rx) : ORIGIN = 0x42014000, LENGTH = 8K
ram_memory (!rx) : ORIGIN = 0x42016000, LENGTH = 72K
diff --git a/source/Core/BSP/Pinecilv2/configuration.h b/source/Core/BSP/Pinecilv2/configuration.h
index 686f54f5..9cc198b2 100644
--- a/source/Core/BSP/Pinecilv2/configuration.h
+++ b/source/Core/BSP/Pinecilv2/configuration.h
@@ -63,10 +63,10 @@
* OLED Brightness
*
*/
-#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
-#define MAX_BRIGHTNESS 101 // Max OLED brightness selectable
-#define BRIGHTNESS_STEP 25 // OLED brightness increment
-#define DEFAULT_BRIGHTNESS 26 // default OLED brightness
+#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
+#define MAX_BRIGHTNESS 101 // Max OLED brightness selectable
+#define BRIGHTNESS_STEP 25 // OLED brightness increment
+#define DEFAULT_BRIGHTNESS 26 // default OLED brightness
/**
* Temp change settings
@@ -87,7 +87,7 @@
#define POWER_PULSE_DEFAULT 0
#else
#define POWER_PULSE_DEFAULT 5
-#endif /* Pinecil */
+#endif /* Pinecil */
#define POWER_PULSE_WAIT_DEFAULT 4 // Default rate of the power pulse: 4*2500 = 10000 ms = 10 s
#define POWER_PULSE_DURATION_DEFAULT 1 // Default duration of the power pulse: 1*250 = 250 ms
@@ -167,8 +167,10 @@
#define CANT_DIRECT_READ_SETTINGS
#endif /* Pinecilv2 */
-#define FLASH_LOGOADDR (0x23000000 + (1022 * 1024))
-#define FLASH_PAGE_SIZE (1024)
+#define FLASH_PAGE_SIZE (1024) // Read pages
+// Erase is 4 or 8 k size, so we pad these apart for now
+// If we ever get low on flash, will need better solution
+#define FLASH_LOGOADDR (0x23000000 + (1016 * FLASH_PAGE_SIZE))
#define SETTINGS_START_PAGE (1023 * FLASH_PAGE_SIZE) // Hal auto offsets base addr
#endif /* CONFIGURATION_H_ */
diff --git a/source/Makefile b/source/Makefile
index 7ffa4b95..d1c123a8 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -407,7 +407,8 @@ DEVICE_BSP_DIR=./Core/BSP/Pinecilv2
S_SRCS:=$(shell find $(PINECILV2_DIR) -type d \( -path $(PINECILV2_VENDOR_BSP_COMMON_DIR) \) -prune -false -o -type f -name '*.S') $(info $(S_SRCS) )
ASM_INC=$(DEVICE_INCLUDES)
LDSCRIPT=./Core/BSP/Pinecilv2/bl_mcu_sdk/drivers/bl702_driver/bl702_flash.ld
-
+DEVICE_DFU_ADDRESS=0x23000000
+# DFU starts at the beginning of flash
# Flags
CPUFLAGS=-march=rv32imafc \
-mabi=ilp32f \