Question about partition table

Learn MoreFAQsTutorials

8 posts / 0 new
Last post
kuanyu99
Offline
Last seen:2个月前1年
Joined:2019-07-03 09:35
Question about partition table

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

Take the 4M\partition_table.h for example.

#定义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:4 hours 23 min 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:2个月前1年
Joined:2019-07-03 09:35
Hi PM_Dialog,

Hi PM_Dialog,

Yes, I had read it and it also confused me. Why it sometimes has to be set to 512KB alignment while sometimes can be set to 1MB alignment? And what is the " An offset ofup 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:4 hours 23 min 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:2个月前1年
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. To fullfill the requirements of the *alignment* and the *FLASH_REGION_SIZE*, I maybe have to set the FLASH_REGION_SIZE to 2MB and make the end address of the NVMS_FIRMWARE align to 2MB. Is that correct?

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:4 hours 23 min 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:2个月前1年
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:4 hours 23 min 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