Preserving error information between reboots with RTC_NOINIT_ATTR

JosuGZ
Posts: 23
Joined: Tue Jan 14, 2020 9:47 am

Preserving error information between reboots with RTC_NOINIT_ATTR

Postby JosuGZ » Thu Jul 23, 2020 8:02 am

Hi, I want to preserve some memory between reboots so I can check the cause (for example, by setting a variable before calling abort); or just keep some counters (like an error counter).

I've seen that I can achieve that with "RTC_NOINIT_ATTR", but I'm not sure the bootloader will not override the values, is there a proper way to do this?

Also, it would be interesting to have some kind of stack trace or core dump preserved, I'm not sure if that can be done.

JosuGZ
Posts: 23
Joined: Tue Jan 14, 2020 9:47 am

Re: Preserving error information between reboots with RTC_NOINIT_ATTR

Postby JosuGZ » Wed Jan 13, 2021 3:42 pm

It seems like I should check the linker script for this, although I still don't know how to do it...

ESP_Sprite
Posts: 4261
Joined: Thu Nov 26, 2015 4:08 am

Re: Preserving error information between reboots with RTC_NOINIT_ATTR

Postby ESP_Sprite » Thu Jan 14, 2021 1:53 am

The bootloader shouldn't touch the RTC memory.

Who is online

Users browsing this forum: Baidu [Spider] and 49 guests