This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cortex: support of unaligned data access

Hi

The Cortex-M3 should support unaligned data access to save RAM space without the lost of performances. Is there a possibility to enable this features for an entire project or do I have to use the __packed attribut for each data structure?

Parents
  • This is simply not true. Of course there will be a loss of performance compared to aligned access to the same type. Each unaligned access causes multiple bus accesses which will prevent other components from using the bus.

    That said, the experienced performance loss will be by far better than not having the option of hardware supported unaligned access.

    > Is there a possibility to enable this features for an
    > entire project or do I have to use the __packed
    > attribut for each data structure?

    You will have to use __packed. I am not aware of any (documented) compiler option that would implicitly apply the __packed attribute.

    Regards
    Marcus
    http://www.doulos.com/arm/

Reply
  • This is simply not true. Of course there will be a loss of performance compared to aligned access to the same type. Each unaligned access causes multiple bus accesses which will prevent other components from using the bus.

    That said, the experienced performance loss will be by far better than not having the option of hardware supported unaligned access.

    > Is there a possibility to enable this features for an
    > entire project or do I have to use the __packed
    > attribut for each data structure?

    You will have to use __packed. I am not aware of any (documented) compiler option that would implicitly apply the __packed attribute.

    Regards
    Marcus
    http://www.doulos.com/arm/

Children
No data