Hello!
I'm woring with CW v6.3 and MCF51QE128. I have project that was working fine, and I recently added an SD Card (via SPI) to log data. According to the owner of the SD library, I need to set 'struct aligment' to be byte, else it wouldn't work properly.
Now I'm having some bizarre behavior (on other routines not the SD ones)... Could it be related to the struct aligment? What does this setting change?
Thanks in advance!
SebaS
Solved! Go to Solution.
When I change the option CW force me to re-compile the whole project.
Now I move that option back and I'm having the same problem, so it wasn't related to it. I'm reviewing my code now. Thanks!!!
When structures are compiled, alignment may not be as expected, in that byte may be placed on word boundaries for example, to optimize performance.
When you specify byte alignment, the structure is "packed" as much as possible. One reason I can think of that other things might not work is that perhap they have not been compiled/re-compiled with that option.
In any event, that should answer your question.
When I change the option CW force me to re-compile the whole project.
Now I move that option back and I'm having the same problem, so it wasn't related to it. I'm reviewing my code now. Thanks!!!