Today I was testing the UART example from Microchip https://github.com/MicrochipTech... and it didn't work. After some debug I realize that the micro-controller ignore what is inside " ". So if I create a c string as a global variable it works:
char test[6] = "Hello"; int main(void) { ... USART0_sendString(test); ... }
However if I declare the variable as local variable it doesn't work:
int main(void) { char test[6] = "Hello"; ... USART0_sendString(test); ... }
It fills test with '\0' and strlen return 0.
void USART0_sendString(char *str) { for(size_t i = 0; i < strlen(str); i++) { USART0_sendChar(str[i]); } }
I'm using AVR GCC 5.4.0.