Skip to content

Commit 3aa3e95

Browse files
committed
Cleanup
Signed-off-by: Adam Szczygieł <[email protected]>
1 parent cdfbe89 commit 3aa3e95

File tree

4 files changed

+19
-32
lines changed

4 files changed

+19
-32
lines changed

samples/subsys/mgmt/mcumgr/smp_svr/boards/nrf54h20dk_nrf54h20_cpuapp_iron.overlay

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/ {
2-
sram@22007F00 {
2+
sram@22007FC0 {
33
compatible = "zephyr,memory-region", "mmio-sram";
4-
reg = <0x22007F00 0x100>;
4+
reg = <0x22007FC0 0x40>;
55
zephyr,memory-region = "RetainedMem";
66
status = "okay";
77

@@ -14,7 +14,7 @@
1414
boot_info0: boot_info@0 {
1515
compatible = "zephyr,retention";
1616
status = "okay";
17-
reg = <0x0 0x100>;
17+
reg = <0x0 0x40>;
1818
};
1919
};
2020
};
@@ -25,5 +25,5 @@
2525
};
2626

2727
&cpuapp_ram0 {
28-
reg = <0x22000000 0x7F00>;
28+
reg = <0x22000000 0x7FC0>;
2929
};

samples/subsys/mgmt/mcumgr/smp_svr/prj.conf

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,7 @@ CONFIG_MCUBOOT_UTIL_LOG_LEVEL_WRN=y
4040
# Disable debug logging
4141
CONFIG_LOG_MAX_LEVEL=3
4242

43-
# TODO: My config attempts
4443
CONFIG_RETAINED_MEM=y
4544
CONFIG_RETENTION=y
4645
CONFIG_RETENTION_BOOTLOADER_INFO=y
4746
CONFIG_RETENTION_BOOTLOADER_INFO_TYPE_MCUBOOT=y
48-
49-
# Is it needed?
50-
CONFIG_RETENTION_BOOTLOADER_INFO_OUTPUT_FUNCTION=y
51-
52-
#####################################
53-
# Alternative?
54-
55-
# CONFIG_SETTINGS=y
56-
# CONFIG_SETTINGS_RUNTIME=y
57-
# CONFIG_RETENTION_BOOTLOADER_INFO_OUTPUT_SETTINGS=y

samples/subsys/mgmt/mcumgr/smp_svr/src/main.c

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ LOG_MODULE_REGISTER(smp_sample);
2525
#include "common.h"
2626

2727
#include <zephyr/retention/blinfo.h>
28-
#include <bootutil/boot_status.h>
2928
#include <bootutil/image.h>
30-
#include <zephyr/settings/settings.h>
3129

3230
#define STORAGE_PARTITION_LABEL storage_partition
3331
#define STORAGE_PARTITION_ID FIXED_PARTITION_ID(STORAGE_PARTITION_LABEL)
@@ -55,20 +53,21 @@ static struct fs_mount_t littlefs_mnt = {
5553
};
5654
#endif
5755

58-
static void my_blinfo_bootloader_version(void)
56+
static void blinfo_bootloader_version(void)
5957
{
60-
printf("adsz: my_blinfo_bootloader_version\n");
58+
struct image_version version = {0x00};
6159

62-
struct image_version version= {0x00};
63-
int ret = blinfo_lookup(BLINFO_BOOTLOADER_VERSION, (char *)&version, sizeof(struct image_version));
60+
int ret = blinfo_lookup(BLINFO_BOOTLOADER_VERSION,
61+
(char *)&version,
62+
sizeof(struct image_version));
6463

6564
if (ret < 0) {
66-
printf("adsz: Error: %d\n", ret);
65+
printf("blinfo_lookup error: %d\n", ret);
6766
} else {
68-
printf("adsz: iv_major: %d\n", version.iv_major);
69-
printf("adsz: iv_minor: %d\n", version.iv_minor);
70-
printf("adsz: iv_revision: %d\n", version.iv_revision);
71-
printf("adsz: iv_build_num: %d\n", version.iv_build_num);
67+
printf("bl iv_major: %d\n", version.iv_major);
68+
printf("bl iv_minor: %d\n", version.iv_minor);
69+
printf("bl iv_revision: %d\n", version.iv_revision);
70+
printf("bl iv_build_num: %d\n", version.iv_build_num);
7271
}
7372
}
7473

@@ -106,9 +105,8 @@ int main(void)
106105
* compile which is convenient when testing firmware upgrade.
107106
*/
108107
LOG_INF("build time: " __DATE__ " " __TIME__);
109-
LOG_INF("adsz: Hello from smp_svr!");
110108

111-
my_blinfo_bootloader_version();
109+
blinfo_bootloader_version();
112110

113111
/* The system work queue handles all incoming mcumgr requests. Let the
114112
* main thread idle while the mcumgr server runs.

samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/mcuboot.overlay

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/ {
2-
sram@22007F00 {
2+
sram@22007FC0 {
33
compatible = "zephyr,memory-region", "mmio-sram";
4-
reg = <0x22007F00 0x100>;
4+
reg = <0x22007FC0 0x40>;
55
zephyr,memory-region = "RetainedMem";
66
status = "okay";
77

@@ -14,7 +14,7 @@
1414
boot_info0: boot_info@0 {
1515
compatible = "zephyr,retention";
1616
status = "okay";
17-
reg = <0x0 0x100>;
17+
reg = <0x0 0x40>;
1818
};
1919
};
2020
};
@@ -26,5 +26,5 @@
2626
};
2727

2828
&cpuapp_ram0 {
29-
reg = <0x22000000 0x7F00>;
29+
reg = <0x22000000 0x7FC0>;
3030
};

0 commit comments

Comments
 (0)