reticulatedpines / magiclantern_simplified

A Git based version of Magic Lantern, for those unwilling or unable to work using Mercurial. The vast majority of branches have been removed, with those thought to be important brought in individually and merged.
GNU General Public License v2.0
142 stars 50 forks source link

RP.160: Add stub for ErrForCamera_handler + DRYOS_ASSERT_HANDLER + increase ML_RESERVED_MEM #96

Closed coon42 closed 1 year ago

coon42 commented 1 year ago

Those changes are required to make CONFIG_CRASH_LOG define work.

reticulatedpines commented 1 year ago

Seems uncontroversial to me. Did you intend to enable crash log in this PR and forgot? Either way is fine.

coon42 commented 1 year ago

Yes, I left it out intentionally in this PR as it doesn't work anyway yet due to a canon bug: Assert Handler calls in RPs 1.6.0 firmware are mostly set to NULL which leads to a crash in Debug_Assert function, as it expects a string with a description here. Thus the assert function crashes before our handler is called so a dump is never written to SD card.

However, this can be fixed by implementing a modified Debug Assert function on our own which checks the first param for being a nullptr and providing a default string in that case. By remapping it via MMU, canon firmware will use our fixed assert function which shouldn't crash anymore. However, this will be done in a future PR.

Once Assert handler is fixed, CONFIG_CRASH_LOG can be enabled.