Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
noahp committed Aug 1, 2024
1 parent 406afc3 commit 9b0ad49
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 31 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ To try out this example app:
```bash
mkdir zephyr-workspace
cd zephyr-workspace
west init -m https://github.com/memfault/stm32h7b3i_dk
west init -m https://github.com/memfault/zephyr-stm32h7b0-example
west update
```

3. Build the example app:

```bash
west build stm32h7b3i_dk --sysbuild
west build --sysbuild --board stm32h7b3i_dk --pristine=always zephyr-stm32h7b0-example
```

`--sysbuild` will build the MCUboot image as well, which will also get
Expand All @@ -42,7 +42,7 @@ To try out this example app:

```bash
# select the correct serial port for your system
pyserial-miniterm --raw /dev/serial/by-id/TODO 115200
pyserial-miniterm --raw /dev/serial/by-id/usb-STMicroelectronics_STLINK-V3_002000353331510933323639-if02 115200

uart:~$ mflt get_device_info
[00:09:21.911,000] <inf> mflt: S/N: DEMOSERIAL
Expand Down
11 changes: 0 additions & 11 deletions boards/stm32h7b0.conf

This file was deleted.

13 changes: 0 additions & 13 deletions boards/stm32h7b0.overlay

This file was deleted.

Empty file added boards/stm32h7b3i_dk.conf
Empty file.
55 changes: 55 additions & 0 deletions boards/stm32h7b3i_dk.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/ {
chosen {
zephyr,code-partition = &slot0_partition;
};
aliases {
die-temp0 = &die_temp;
};
};

&die_temp {
status = "okay";
};

&adc2 {
pinctrl-0 = <&adc2_inp0_pc2_c>;
pinctrl-names = "default";
st,adc-clock-source = <SYNC>;
st,adc-prescaler = <4>;
status = "okay";
};

&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x00010000>;
read-only;
};
/*
* The flash starting at 0x00010000 and ending at
* 0x0001ffff (sectors 16-31) is reserved for use
* by the application.
*/
storage_partition: partition@1e000 {
label = "storage";
reg = <0x0001e000 0x00002000>;
};
slot0_partition: partition@20000 {
label = "image-0";
reg = <0x00020000 0x00060000>;
};
slot1_partition: partition@80000 {
label = "image-1";
reg = <0x00080000 0x00060000>;
};
scratch_partition: partition@e0000 {
label = "image-scratch";
reg = <0x000e0000 0x00020000>;
};
};
};
Empty file added partition.overlay
Empty file.
1 change: 0 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ int main(void) {
printk("\n" MEMFAULT_BANNER_COLORIZED);

memfault_device_info_dump();
memfault_zephyr_port_install_root_certs();

return 0;
}
4 changes: 4 additions & 0 deletions sysbuild.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sysbuild configuration file.

# Enable MCUboot per default for this sample.
SB_CONFIG_BOOTLOADER_MCUBOOT=y
2 changes: 0 additions & 2 deletions sysbuild/mcuboot.conf

This file was deleted.

7 changes: 7 additions & 0 deletions sysbuild/mcuboot/boards/stm32h7b3i_dk.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "../../../boards/stm32h7b3i_dk.overlay"

/ {
chosen {
zephyr,code-partition = &boot_partition;
};
};
9 changes: 9 additions & 0 deletions sysbuild/mcuboot/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Enable debug logs for testing
CONFIG_MCUBOOT_LOG_LEVEL_DBG=y

CONFIG_MCUBOOT_IMG_MANAGER=y
CONFIG_IMG_MANAGER=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_STREAM_FLASH=y
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ manifest:
name-allowlist:
- cmsis
- hal_stm32
# - mbedtls
- mbedtls
- mcuboot
- picolibc

Expand Down

0 comments on commit 9b0ad49

Please sign in to comment.