The issue lies in my use of uC/OS. I called OSStatInit(), but if I call this function, I can only declare one task in main, and then declare other tasks within the first task. However, I have declared two tasks in main.