Hi All,
I'm working on a project using a Texas Instruments MSP430G2432IPW20R. One of my main challenges with this project will be low data memory. One way I'm trying to save memory is by declaring bit fields in my structures. However, if I compile it with or without the bit field definition, the memory allocation comes out the same (see code below). I tried turning on optimization, but that didn't help. Any ideas?
Thanks in advance,
John
or
I'm working on a project using a Texas Instruments MSP430G2432IPW20R. One of my main challenges with this project will be low data memory. One way I'm trying to save memory is by declaring bit fields in my structures. However, if I compile it with or without the bit field definition, the memory allocation comes out the same (see code below). I tried turning on optimization, but that didn't help. Any ideas?
Thanks in advance,
John
Code:
typedef struct {
timer_base_e time_base;
uint8_t is_running : 1;
uint8_t expired : 1;
uint16_t ticks_remaining;
uint16_t reset_value;
} timer_s;
Code:
typedef struct {
timer_base_e time_base;
uint8_t is_running;
uint8_t expired;
uint16_t ticks_remaining;
uint16_t reset_value;
} timer_s;