Other Parts Discussed in Thread: TM4C123GH6PM
Part is tm4c123gh6pm
CCS 6.1.0
I have running project that writes chars to Uart 1, that has a serial character display connected.
It runs correctly when I send characters with the code:
UARTCharPut(UART1_BASE, 'H');
UARTCharPut(UART1_BASE, 'e');
UARTCharPut(UART1_BASE, 'l');
UARTCharPut(UART1_BASE, 'l');
UARTCharPut(UART1_BASE, 'o');
Then I declared a buffer:
unsigned char buf2[102];
So far, so good, simply adding this declaration does not crash the uP.
But when I add code that assigns a string to buf2 and then load the code to the uP, the uP does not appear to run at all.
In other words it seems that having buf2 as an lvalue is somehow a problem.
Either of the following 2 lines of code, being present in the code, will cause the uP to not run:
strcpy(buf2, "A");
buf2[0] = 65;
In all of the TM4c123 TI labs, I did not find a single one that uses strings.
In the Peripheral Driver Library document I also did not find any strcpy used in sample code.
In the Peripheral Driver Library document I did find a string being loaded with a for-loop, using the second approach I included above.
Any help is much appreciated !
Thanks,
Rob