Products > Embedded Computing

This is an armclang bug, isn't it? [It wasn't]

(1/1)

emece67:
.

ataradov:
I'd say this is a bug. I see nothing wrong with this code.

Does it do the same if instead of a literal parameter you create a structure on the stack and pass that?

emece67:
.

ataradov:
What MCU/core you are targeting?

According to this https://www.keil.com/support/man/docs/armclang_ref/armclang_ref_sam1444138667173.htm:

--- Quote ----munaligned-access is the default for architectures that support unaligned accesses to data. This default applies to all architectures supported by Arm Compiler 6, except Armv6‑M, and Armv8‑M without the Main Extension.

--- End quote ---

So if you are targeting Cortex-M4/M7, then it will default to unaligned access, so it has to be enabled in the core. Or pass -mno-unaligned-access flag.

emece67:
.

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod