summaryrefslogtreecommitdiff
path: root/build-aux/stack.c.gen
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-03-02 13:32:22 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-03-02 13:32:22 -0700
commit355d7a495b0ca1a622d600427a8c737f3207a803 (patch)
tree02ab6704d2ad5698c45981162cc2c192ebdee9db /build-aux/stack.c.gen
parent255baf6db201dcdf8da017d55c577622f217a888 (diff)
parent8dc86e5ec58ec94f7ea8227ee008ded202c4204f (diff)
Merge branch 'lukeshu/irq'
Diffstat (limited to 'build-aux/stack.c.gen')
-rwxr-xr-xbuild-aux/stack.c.gen46
1 files changed, 28 insertions, 18 deletions
diff --git a/build-aux/stack.c.gen b/build-aux/stack.c.gen
index edc7bae..66d837a 100755
--- a/build-aux/stack.c.gen
+++ b/build-aux/stack.c.gen
@@ -406,12 +406,7 @@ class PluginApplication:
class AppPlugin:
def is_intrhandler(self, name: str) -> bool:
- return name in [
- "rp2040_hwtimer_intrhandler",
- "_cr_gdb_intrhandler",
- "hostclock_handle_sig_alarm",
- "hostnet_handle_sig_io",
- ]
+ return False
def extra_nodes(self) -> typing.Collection[Node]:
return []
@@ -505,7 +500,12 @@ class LibHWPlugin:
self.pico_platform = arg_pico_platform
def is_intrhandler(self, name: str) -> bool:
- return False
+ return name in [
+ "rp2040_hwtimer_intrhandler",
+ "hostclock_handle_sig_alarm",
+ "hostnet_handle_sig_io",
+ "gpioirq_handler",
+ ]
def extra_nodes(self) -> typing.Collection[Node]:
return []
@@ -523,6 +523,26 @@ class LibHWPlugin:
"w5500_udp_alarm_handler",
]
return ret, False
+ if "/rp2040_gpioirq.c:" in loc and "handler->fn" in line:
+ return [
+ "w5500_intrhandler",
+ ], False
+ return None
+
+ def skip_call(self, chain: list[str], call: str) -> bool:
+ return False
+
+
+class LibCRPlugin:
+ def is_intrhandler(self, name: str) -> bool:
+ return name in [
+ "_cr_gdb_intrhandler",
+ ]
+
+ def extra_nodes(self) -> typing.Collection[Node]:
+ return []
+
+ def indirect_callees(self, loc: str, line: str) -> tuple[list[str], bool] | None:
return None
def skip_call(self, chain: list[str], call: str) -> bool:
@@ -696,17 +716,14 @@ class LibMiscPlugin:
class PicoSDKPlugin:
- app_gpio_handlers: typing.Collection[str]
app_init_array: typing.Collection[str]
app_preinit_array: typing.Collection[str]
def __init__(
self,
*,
- app_gpio_handlers: typing.Collection[str],
app_init_array: typing.Collection[str],
) -> None:
- self.app_gpio_handlers = app_gpio_handlers
self.app_init_array = app_init_array
# git grep '^PICO_RUNTIME_INIT_FUNC\S*('
@@ -739,7 +756,6 @@ class PicoSDKPlugin:
def is_intrhandler(self, name: str) -> bool:
return name in [
- "gpio_default_irq_handler",
"isr_invalid",
"isr_nmi",
"isr_hardfault",
@@ -768,8 +784,6 @@ class PicoSDKPlugin:
return ["rom_hword_as_ptr(BOOTROM_TABLE_LOOKUP_OFFSET)"], False
if "/flash.c:" in loc and "boot2_copyout" in line:
return ["_stage2_boot"], False
- if "/gpio.c:" in loc and call == "callback":
- return sorted(self.app_gpio_handlers), False
if "/printf.c:" in loc:
if call == "out":
return [
@@ -1122,10 +1136,6 @@ def main(
lib9p_plugin = Lib9PPlugin(arg_base_dir, arg_c_fnames)
- sbc_gpio_handlers = [
- "w5500_intrhandler",
- ]
-
def sbc_is_thread(name: str) -> int:
if name.endswith("_cr") and name != "lib9p_srv_read_cr":
if "9p" in name:
@@ -1139,6 +1149,7 @@ def main(
AppPlugin(),
LibObjPlugin(arg_c_fnames),
LibHWPlugin(arg_pico_platform),
+ LibCRPlugin(),
LibCRIPCPlugin(),
lib9p_plugin,
LibMiscPlugin(),
@@ -1149,7 +1160,6 @@ def main(
if arg_pico_platform == "rp2040":
plugins += [
PicoSDKPlugin(
- app_gpio_handlers=sbc_gpio_handlers,
app_init_array=["register_fini"],
),
TinyUSBDevicePlugin(arg_c_fnames),