Is there a document explaining how the optimiser works.
The reason I ask, is it is optimising out code completely at level 4. Can anyone explain why?
eg
void start_send(char ch){
bit_tx_state = 1;
TBCTL = SW_UART_TIMER_START_TBCTL;
byte_being_sent = ch;
gpio_LD1_off(); // expands to P4OUT &= ~(0x0010)
gpio_LD1_on(); //
}
creates the assembly
d310: 43D2 056C MOV.B #1,&bit_tx_state
53 TBCTL = SW_UART_TIMER_START_TBCTL;
d314: 40B2 0216 0180 MOV.W #0x0216,&Timer_B3_TBCTL
54 byte_being_sent = ch;
d31a: 4CC2 04D2 MOV.B R12,&byte_being_sent
102 while(txbob >= (TXBUFSIZE-1));
d31e: 3C0E JMP ($C$L640)