On arm targets (in my case, thumbv6m-none-eabi), compilation fails due to
|
14 | #[naked_function::naked]
| ^^^^^^^^^^^^^^^^^^^^^^^^ could not find `__asm_type` in `$crate`
|
= note: this error originates in the macro `::naked_function::__asm_function_begin` which comes from the expansion of the attribute macro `naked_function::naked` (in Nightly builds, run with -Z macro-backtrace for more info)
This resolves the compile error by updating the unused __asm_function_type macro to have the same name as the non-arm macro __asm_type.
Thumb targets should probably also have a .thumb_func directive, but I wasn't able to get it to generate above the label. Even by replacing naked_function with the equivalent global_asm! -- it was always placed after the label. According to the as documentation, thumb_func isn't necessary for eabi targets, so I left that for now.
On arm targets (in my case, thumbv6m-none-eabi), compilation fails due to
This resolves the compile error by updating the unused
__asm_function_type
macro to have the same name as the non-arm macro__asm_type
.Thumb targets should probably also have a
.thumb_func
directive, but I wasn't able to get it to generate above the label. Even by replacingnaked_function
with the equivalentglobal_asm!
-- it was always placed after the label. According to the as documentation,thumb_func
isn't necessary for eabi targets, so I left that for now.