You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Jerzy Kasenberg <je...@codecoup.pl> on 2021/02/05 13:03:31 UTC

core dump in external flash

Hi all,

There is crash handling in mynewt that can result in reboot, registers
dump to console, loop waiting for debugger or core dump save to flash.

In case register dump console_blocking_mode() is called that will
result in console begin handled with minimal functionality.

Unfortunately right now other parts of system are not aware of system failure.
When core dump flash area is placed in external flash problems start.
SPIFLASH driver is not aware of crash condition and it uses OS based
waits for timeouts which may not work at that time.
It may also use SPI bus driver that on its own may use mutexes and semaphores.

g_os_started could be switched back to 0 and checked in crash aware
drivers or maybe some other form of crash awareness could be added.

I'm curious about others opinion before doing it my way.

br
Jerzy

Re: core dump in external flash

Posted by Will <wi...@juul.com.INVALID>.
Not sure that I have a strong opinion here; I think I would need to have a
better understanding of the particular driver to determine the best
approach. If setting g_os_started back to 0 would solve the problems that
seems like reasonable approach.

Will

On Fri, Feb 5, 2021 at 5:03 AM Jerzy Kasenberg <je...@codecoup.pl>
wrote:

> Hi all,
>
> There is crash handling in mynewt that can result in reboot, registers
> dump to console, loop waiting for debugger or core dump save to flash.
>
> In case register dump console_blocking_mode() is called that will
> result in console begin handled with minimal functionality.
>
> Unfortunately right now other parts of system are not aware of system
> failure.
> When core dump flash area is placed in external flash problems start.
> SPIFLASH driver is not aware of crash condition and it uses OS based
> waits for timeouts which may not work at that time.
> It may also use SPI bus driver that on its own may use mutexes and
> semaphores.
>
> g_os_started could be switched back to 0 and checked in crash aware
> drivers or maybe some other form of crash awareness could be added.
>
> I'm curious about others opinion before doing it my way.
>
> br
> Jerzy
>