Skip to content

HardFault in ch9 is out of date #94

@malachid

Description

@malachid

On https://docs.rust-embedded.org/discovery-mb2/09-registers/bad-address.html
it states:

(gdb) list
1040  #[allow(unused_variables)]
1041	#[doc(hidden)]
1042	#[cfg_attr(cortex_m, link_section = ".HardFault.default")]
1043	#[no_mangle]
1044	pub unsafe extern "C" fn HardFault_(ef: &ExceptionFrame) -> ! {
1045	    #[allow(clippy::empty_loop)]
1046	    loop {}
1047	}
1048	
1049	#[doc(hidden)]
1050	#[no_mangle]

When hitting this break point, the signature is:

pub unsafe extern "C" fn HardFault_() -> ! {...}

The rest of the page assumes that the ef ExceptionFrame parameter is there to inspect.
This results in output like:

No symbol 'ef' in current context

This is with rustc 1.93.0 on Ubuntu 24.04.4 LTS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions