I am having an issue with the Tiva C Tm4c129. I understand globals are considered bad practice, but I am porting code that is presently working without issue on a lesser equipped m3 Stellaris mcu.
I looked at the document for migration from Stellarisware to Tivaware.
I'm using GPIO, Uart, SSI, Systick and I2C peripherals without any issues and the code functions as expected.
The problem I am having is variables being overwritten.
Everything appears to be fine but then within a function I find a function local array uses a RAM location already occupied by a global variable.
No matter what changes I make to stack size the problem persists. I make other changes to reduce call stack depth and it just moves the problem to a new place.
I started with IAR 7.5, now am using IAR 8.32 for ARM. I have tried using the default linker file, changing the stack size. I've used linker and startup_ewarm from Tiva example folder.
At first I was having problems with strtok. I would call it and after leaving would find a file global variable now had the same value as the pointer which was assigned by strtok to my token pointer.
Considering the migration from Stellaris, is using data types like unsigned int going to cause problems? I looked at the map file and the size look correct.
What other things could cause this sort of behavior? Any expert advice would be extremely appreciative!
Thank You.