OT arm-gcc hadanka

Jan Waclawek konfera na efton.sk
Pondělí Prosinec 29 13:34:51 CET 2014


arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.8.3 20131129
(release) [ARM/embedded-4_8-branch revision 205641]

c:/PROGRA~1/ARMTools/launchpad.net_gcc-arm-embedded/bin/arm-none-eabi-gcc
-c -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb  -I.
-Wpadded -MD -MP -MF .dep/ch.o.d ch.c -o objdir/ch.o


Aka je vysledna hodnota a a b?

wek


#include <stdint.h>

  typedef struct __attribute__((packed, aligned(1))) {
    uint16_t a;
    union {
      uint32_t b;
      uint16_t c[3];
    };
  } TBar;

  typedef struct __attribute__((packed)) {
    TBar a;
    TBar b;
  } TFoo;


const uint32_t a = sizeof(TBar);
const uint32_t b = sizeof(TFoo);

int main(void) {
}




Další informace o konferenci Hw-list