Skip to content

Commit f5116ec

Browse files
committed
Merge branch 'feature/add_user_data_to_bin_header' into 'master'
feat: add user data to bin header See merge request sdk/ESP8266_RTOS_SDK!698
2 parents a2b7521 + 68e0a80 commit f5116ec

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

components/esp8266/include/esp_attr.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,7 @@
4646
// Forces read-only data into RTC memory.
4747
#define RTC_RODATA_ATTR __attribute__((section(".rtc.rodata")))
4848

49+
// Forces to put some user defined data in the binary file header, the offset is 0x10.
50+
#define USER_DATA_ATTR __attribute__((section(".user.data")))
51+
4952
#endif /* __ESP_ATTR_H__ */

components/esp8266/ld/esp8266.common.ld

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ SECTIONS
230230
.irom0.text : ALIGN(4)
231231
{
232232
_irom0_text_start = ABSOLUTE(.);
233+
*(.user.data)
233234
*(.rodata.* .rodata .irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text)
234235
*(.literal.* .text.*)
235236

0 commit comments

Comments
 (0)