Default Stack Size too small on project

A project log for Stepmotor Driver Board for TI Tiva Launchpad

Three axis stepmotor driver, limit switch conditioning and power supplies.

BharbourBharbour 10/27/2015 at 01:100 Comments

Testing the limit switches with simple firmware in a loop was crashing the MCU. After some digging, I determined that calls to snprintf() were what triggered the crash. After some web searching on the vendors web site, I found references to the default stack size needing to be increased to use snprintf. When I looked at the setting in the project, it was 512 bytes which seems ridiculously small for that MCU with 256K of flash and 32K of RAM. Upped the stack size to 4K and all the problems went away. When the real firmware gets closer to done, I will check the stack high water mark and adjust it from there.

Fun with a new tool chain...