diff options
Diffstat (limited to 'build-aux/measurestack/app_plugins.py')
-rw-r--r-- | build-aux/measurestack/app_plugins.py | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/build-aux/measurestack/app_plugins.py b/build-aux/measurestack/app_plugins.py index 1eee739..064ea06 100644 --- a/build-aux/measurestack/app_plugins.py +++ b/build-aux/measurestack/app_plugins.py @@ -448,7 +448,7 @@ class LibMiscPlugin: def _skipmodel___assert_msg_fail( self, chain: typing.Sequence[QName], call: QName ) -> bool: - if call.base() in [BaseName("__lm_printf")]: + if call.base() in [BaseName("__lm_printf"), BaseName("__lm_light_printf")]: return any( c.base() == BaseName("__assert_msg_fail") for c in reversed(chain[:-1]) ) @@ -458,14 +458,30 @@ class LibMiscPlugin: class PicoFmtPlugin: known_fct: dict[BaseName, BaseName] - def __init__(self) -> None: + def __init__(self, arg_pico_platform: str) -> None: self.known_fct = { # pico_fmt BaseName("fmt_vsnprintf"): BaseName("_out_buffer"), - # pico_stdio - BaseName("__wrap_vprintf"): BaseName("stdio_buffered_printer"), - BaseName("stdio_vprintf"): BaseName("stdio_buffered_printer"), } + match arg_pico_platform: + case "rp2040": + self.known_fct.update( + { + # pico_stdio + BaseName("__wrap_vprintf"): BaseName("stdio_buffered_printer"), + BaseName("stdio_vprintf"): BaseName("stdio_buffered_printer"), + # libfmt + BaseName("__lm_light_printf"): BaseName("libfmt_light_fct"), + } + ) + case "host": + self.known_fct.update( + { + # libfmt + BaseName("__lm_printf"): BaseName("libfmt_libc_fct"), + BaseName("__lm_light_printf"): BaseName("libfmt_libc_fct"), + } + ) def is_intrhandler(self, name: QName) -> bool: return False |