HardFault on attempt to perform unaligned access on ldr.w and blx.w instructions
I am getting UNALIGNED HardFault (attempt to perform an unaligned access) on ldr.w and blx.w instructions (as seen in disassembly when debugging). I am using STM32CubeIDE with the standard toolchain for stm32 (arm gcc, Thumb2).
I am importing a library (which I am also building with the same toolchain), in which the errors are occuring.
Can I tell the compiler to not create unaligned addresses? Or do I have to change the source code of the library?
I have tried compiling with -mno-unaligned-access.
