Replies: 1 comment 1 reply
-
Hi @shalauko some devices have the possibility to change the bootaddress in the option bytes. Sadly your device does not have this property. The only way you can reserve sectors for nvs on your device is by using a bootloader (this can be a very simple one) on the first sector of your device. All this bootloader needs to do is jump to a different address (the slot0 address). You will have to create this simple loader (which can be a zephyr app) yourself and program it to the first sector of the device. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to use "settings" subsystem to store some variables between device boots. But failed to implement correct DTS.
I work on a project where we will have a custom board, therefore I want to have a custom
.dts
file. For development purpose we use on STM32 NUCLEO-F446RE. The target board will be based on STM32F446RE, so I took the available.dts
file for NUCLEO-F446RE as a base.The mentioned devicetree contains flash section adjusted to use with bootloader. I.e. it has first
boot_partition
, thenstorage_partition
and then few sections of image. As long as firmware was less than 64KB it worked fine without bootloader. So, basically we put firmware in the bootloader section, but it was fine. However, our firmware is bigger that 64KB, so we needed to move it to a first image section. Therefore, we needed to implement simple bootloader which only jump toslot0_partition
and nothing more, when real application is flashed inslot0_partition
.Our current DTS looks in the following way and it works fine:
I want to simplify the whole process as we don't actually need a bootloader. Actually, we need one application section and one "storage" section.
I've tried to follow an example from Zephyr documentation (with a ROM bootloader), but then
settings_backend_init
fails with code-EDOM
(-33) in this part of code (my nvs_sector_size at the end of the flash is 128KB):Then I changed order of sections, but in this case the board doesn't boot at all.
Could you please advise how should configure my
.dts
andprj.conf
to have storage at the beginning of the flash and entrance point moved 64KB further? Technically speaking, there is no requirement to have storage at the beginning of the flash. The one requirement is to get rid of bootloader and keep settings subsystem operable.Beta Was this translation helpful? Give feedback.
All reactions