[FluidNC Issue#1579] Problem: Pin::write and Pin::synchronousWrite need to be in IRAM

未分类 bolang 4个月前 (10-14) 36次浏览

Issue #1579 | 状态: 已关闭 | 作者: MitchBradley | 创建时间: 2025-09-30


Wiki Search Terms

crash

Controller Board

any

Machine Description

any

Input Circuits


Configuration file

any

Startup Messages

N/A

User Interface Software

any

What happened?

A Discord user reported a crash <https://discord.com/channels/780079161460916227/1422346350145830933> whose backtrace suggested a FLASH cache instruction fetch failure during an ISR. The symbol was _ZNK3Pin16synchronousWriteEb, i.e. Pin::synchronousWrite(), and the address was in FLASH. Instructions accessed from an ISR must be in RAM. Pin::synchronousWrite() is declared as an inline method which would normally be okay since the code would be inlined in the calling context which would be in IRAM, but for some reason the compiler (as is its privilege) chooses to disregard the inline hint, creating a routine that ends up in FLASH.

The solution is to add IRAM_ATTR to both Pin::synchronousWrite() and Pin::write(), forcing the routine into IRAM should the compiler disregard the inline hint.

GCode File

No response

Other Information

No response

原始Issue: https://github.com/bdring/FluidNC/issues/1579

喜欢 (0)