Author Topic: Force 4 byte alignment  (Read 253 times)

blieber

  • RFduino Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Force 4 byte alignment
« on: April 13, 2017, 01:47:42 PM »
It seems the default Simblee compiler (under tools in install package - arm-none-eabi-g++, mac OSX, Simblee board version 1.1.0) is 8-byte aligned. Is there a way to force 4-byte alignment instead (e.g. such as "-m32" flag). This would be convenient for memory compaction purposes.

Thanks,
Ben

blieber

  • RFduino Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Force 4 byte alignment
« Reply #1 on: April 13, 2017, 02:06:45 PM »
Using __attribute__((packed)) seems to work as suggested here https://forum.arduino.cc/index.php?topic=78026.0