Question about partition table

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
8 posts / 0 new
Last post
kuanyu99
Offline
Last seen:1 year 5 months ago
Joined:2019-07-03 09:35
Question about partition table

What's is the meaning of the *alignment* inside the partition_table.h?

拍摄4M \ partition_table.h。

#定义NVMS_FIRMWARE_PART_START 0 x002000 / *对齐ment to 512KB is dictated by the default FLASH_REGION_SIZE. */ #define NVMS_FIRMWARE_PART_SIZE 0x07E000 /* +----------------512KB---------------------+ */ #define NVMS_GENERIC_PART_START 0x0E0000 #define NVMS_GENERIC_PART_SIZE 0x020000

The firmware part is start at 0x2000 which is not aligned to 512KB, the generic part is not, too. And why the generic part suddenly jump to 0xE0000 while the end address of the firmware part is 0x80000?

Another question is, Can I arrange a smaller firmware part, which is about 128KB, for my secondary bootloader, and arrange a bigger partition part, which is about 2MB, for my application at the same time? How should I modify the partition_table.h?

Thanks!

Device:
PM_DIALOG.
Offline
Last seen:1 day 6 hours ago
Staff
Joined:2018-02-08 11:03
Hi kuanyu99,

Hi kuanyu99,

By default, both the SDK and chip configurations support running application images of up to 512 kB in size. To do so, both the firmware and generic partition entries, that is NVMS_FIRMWARE and NVMS_GENERIC_PART respectively, should be 512 MB aligned. The NVMS_PRODUCT_HEADER entry should always start at 0x0000 and its size should be 0x2000. The rest of the partition entries can be modified according to user’s needs. Please check the following tutorial from our support website:

http://lpccs-docs.dialog-semiconductor.com/tutorial_da1469x_supporting_fw_images_bigger_than_512kb/index.html

Thanks, PM_Dialog

kuanyu99
Offline
Last seen:1 year 5 months ago
Joined:2019-07-03 09:35
Hi PM_Dialog,

Hi PM_Dialog,

是的,我读过它,它也困惑了我。为什么它有时必须设置为512kb对齐,而有时可以设置为1MB对齐?什么是“偏移量up to 0x4000允许“意味着?

对于分区,我可以将分区设置为128kb对齐吗?这对我来说更灵活。
The partition_table.h may look like following.

#define NVMS_FIRMWARE_PART_START 0x002000 #define NVMS_FIRMWARE_PART_SIZE 0x01E000 /* +----------------128KB---------------------+ */ #define NVMS_GENERIC_PART_START 0x020000 #define NVMS_GENERIC_PART_SIZE 0x0E0000

Thanks!

PM_DIALOG.
Offline
Last seen:1 day 6 hours ago
Staff
Joined:2018-02-08 11:03
Hi kuanyu99,

Hi kuanyu99,

The NVMS_FIRMWARE and NVMS_GENERIC_PART respectively, should be aligned to FLASH_REGION_SIZE. This tutorial aims to provide steps on how to support FW images of different sizes on the DA1469x. In specific, provides the steps required to execute application images of 1 MB in size. Please check CACHE_FLASH_REG[FLASH_REGION_SIZE], and you will see which the available options are. That’s why the NVMS_GENERIC_PART is 1MB aligned. The NVMS_PRODUCT_HEADER entry should always start at 0x0000 and its size should be 0x2000. The rest of the partition entries can be modified according to user’s needs. If you have SUOTA feature.

Thanks, PM_Dialog

kuanyu99
Offline
Last seen:1 year 5 months ago
Joined:2019-07-03 09:35
Hi, PM_Dialog,

Hi, PM_Dialog,

1. To my understanding, I can't access to the address that exceeds the FLASH_REGION_SIZE, otherwise I will get a undefined result. So, if my project is to make a secondary bootloader that is able to jump to a application, I have to set the FLASH_REGION_SIZE larger than the sum of both size. Is that right?

2.填充*对齐*和* flash_region_size *的要求,我必须将flash_region_size设置为2MB,并使NVMS_Firmware的结尾地址对齐至2MB。那是对的吗?

3. Under that partition setting, if I erase only the application region which allocates within that 2MB partition, will it affects other region inside that partition?

Thanks!

PM_DIALOG.
Offline
Last seen:1 day 6 hours ago
Staff
Joined:2018-02-08 11:03
Hi kuanyu99,

Hi kuanyu99,

Apologies for the delay. Which is the size of your firmware that you would like to flash? Does it have SUOTA implementation? If you set the FLASH_REGION_SIZE to 2MB, both the firmware and generic partition entries, that is NVMS_FIRMWARE and NVMS_GENERIC_PART respectively, should be 2 MB aligned.

Thanks, PM_Dialog

kuanyu99
Offline
Last seen:1 year 5 months ago
Joined:2019-07-03 09:35
Hi PM_Dialog,

Hi PM_Dialog,

I may use 1MB or 2MB and I probably understand the partition structure. The major concern is that the FLASH_REGION_SIZE should be aligned to the firmware size for the memory accessing issue.

I guess you mean the NVMS_FW_EXEC_PART and NVMS_FW_UPDATE_PART should have the same size alignment, just like the 4M/suota/partition_table.h example. But whatever the partition name, the SUOTA only looks for the image header for the updating, right?

PM_DIALOG.
Offline
Last seen:1 day 6 hours ago
Staff
Joined:2018-02-08 11:03
Hi kuanyu99,

Hi kuanyu99,

Thanks for accepting my answer. I mean that both NVMS_FIRMWARE and NVMS_GENERIC_PART should be FLASH_REGION_SIZE aligned. Could you please clarify your last question?

Thanks, PM_Dialog