• Compiler assumes array addresses are aligned for structs declared with __attribute__((packed))
    If I have a struct declared like the following: volatile struct { uint8_t foo; int16_t bar[1]; } __attribute__((packed)) foobar; The code emitted uses LDRSH to access bar[0] and causes a hardfault...
  • Declaration of global variables in one header file
    Hello everyone, I'm trying to split the C source code of one file into nearly 10 different. It does not work properly due to global variables declared in one header file but used in more than one C...
  • bad structure declaration?
    i'm trying to create an array of structures but when i make more than a handful my robot doesn't work. so in main.h i have typedef struct SPid { int dState; // Last position input int iState;...
  • forward declaration of struct
    is there any possibility to make a forward declaration of a struct? typedef struct { word wMe; mh_ts_me *zsOldMe; } mh_ts_me; Thank you ...Leo
  • Declaring (initializing) array without size
    Hi! I'm having some problems declearing an array. I am trying to make an array that contains messages that I will later display on an LCD display. I am using a 2D char array, but I don't want to specify...