- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
I use CYPD3120 USB Type C controller with SDK.
Can you explain what these lines mean?
Please see an example piece of code from the main.c file:
.......................................................................................................................
__attribute__ ((section(".customer_region"), used))
const uint32_t customer_info[8] = {0x00};
/* Place the bootloader version at a fixed location, so that firmware can retrieve this as well. */
__attribute__ ((section(".base_version"), used))
const uint32_t base_version = FW_BASE_VERSION;
__attribute__ ((section(".app_version"), used))
const uint32_t app_version = APP_VERSION;
__attribute__ ((section(".dev_siliconid"), used))
const uint32_t ccg_silicon_id = MAKE_DWORD_FROM_WORD (CCG_DEV_SILICON_ID, CCG_DEV_FAMILY_ID);
__attribute__ ((section(".fw_reserved"), used))
const uint32_t reserved_buf[5] = {0};
.......................................................................................................................
Best regards,
Nazar Melnichek
Solved! Go to Solution.
- Tags:
- usb pd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nazar,
These lines are used to place certain parts of the code at fixed locations as per the firmware architecture. For e.g. __attribute__ ((section(".customer_region"), used)) will place the customer information which can be modified in the configuration as user parameters at an offset of 0xC0 from the firmware image start. This can be further checked in the linker script of the project.
Best Regards,
Sananya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nazar,
These lines are used to place certain parts of the code at fixed locations as per the firmware architecture. For e.g. __attribute__ ((section(".customer_region"), used)) will place the customer information which can be modified in the configuration as user parameters at an offset of 0xC0 from the firmware image start. This can be further checked in the linker script of the project.
Best Regards,
Sananya