bootloader somehow working
Signed-off-by: Eduard Iten <eduard@iten.pro>
This commit is contained in:
94
software/apps/bl_test/sysbuild/common.dtsi
Normal file
94
software/apps/bl_test/sysbuild/common.dtsi
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Common Devicetree Configuration für weact_stm32g431_core
|
||||
* - Konfiguriert einen W25Q128 Flash-Speicher auf SPI2
|
||||
* - Konfiguriert USB-CDC für MCUMGR
|
||||
* - Setzt den Chip Select (CS) Pin auf PA5
|
||||
* - Weist das Label "flash1" zu
|
||||
*/
|
||||
|
||||
/* Partitions für internes Flash (STM32G431) */
|
||||
&flash0 {
|
||||
/delete-node/ partitions; /* Entferne die Standard-Partitionen */
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
/* MCUboot bootloader - 48 KB */
|
||||
boot_partition: partition@0 {
|
||||
label = "mcuboot";
|
||||
reg = <0x00000000 0x0000C000>;
|
||||
};
|
||||
|
||||
/* Slot0 partition für primäres Application Image - 80 KB (20 sectors @ 4KB) */
|
||||
slot0_partition: partition@C000 {
|
||||
label = "image-0";
|
||||
reg = <0x0000C000 0x00014000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/* USB-CDC Konfiguration für MCUMGR */
|
||||
&usb {
|
||||
status = "okay";
|
||||
cdc_acm_uart0: cdc_acm_uart0 {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
};
|
||||
};
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,uart-mcumgr = &cdc_acm_uart0;
|
||||
};
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
/* Definiere die Pins für SCK, MISO, MOSI auf Port B */
|
||||
pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
|
||||
/* === Chip Select (CS) auf PA5 gesetzt === */
|
||||
cs-gpios = <&gpioa 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
|
||||
/* Definiere den Flash-Chip als SPI NOR Gerät */
|
||||
flash1: flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
label = "flash1";
|
||||
|
||||
/* JEDEC ID für einen Winbond W25Q128 (16 MBytes) */
|
||||
jedec-id = [ef 40 18];
|
||||
|
||||
/* Speichergröße in Bytes (16 MBytes) */
|
||||
size = <DT_SIZE_M(16)>;
|
||||
|
||||
/* Maximale Taktfrequenz - angepasst an STM32G431 Limits */
|
||||
spi-max-frequency = <1000000>;
|
||||
|
||||
/* Partitions für externes Flash */
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
/* Slot1 partition für MCUboot (sekundäres Image) - 80 KB (20 sectors @ 4KB) */
|
||||
slot1_partition: partition@0 {
|
||||
label = "image-1";
|
||||
reg = <0x00000000 0x00014000>;
|
||||
};
|
||||
|
||||
/* Scratch partition für MCUboot - 80 KB (20 sectors @ 4KB) */
|
||||
scratch_partition: partition@14000 {
|
||||
label = "scratch";
|
||||
reg = <0x00014000 0x00014000>;
|
||||
};
|
||||
|
||||
/* Speicher partition für LittleFS - ~15.83 MB */
|
||||
storage_partition: partition@28000 {
|
||||
label = "storage";
|
||||
reg = <0x00028000 0x00FD8000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user