I am trying to debug a test project compiled with Linaro v4.9.3. The compilation completes successfully but when I debug the program it never makes it into main().
The source code I am debugging is: (it's one of the the typical templates)
/* * ======== main.c ======== */ #include <xdc/std.h> #include <xdc/runtime/Error.h> #include <xdc/runtime/System.h> #include <ti/sysbios/BIOS.h> #include <ti/sysbios/knl/Task.h> /* * ======== taskFxn ======== */ Void taskFxn(UArg a0, UArg a1) { System_printf("enter taskFxn()\n"); Task_sleep(10); System_printf("exit taskFxn()\n"); System_flush(); /* force SysMin output to console */ } /* * ======== main ======== */ Int main() { Task_Handle task; Error_Block eb; System_printf("enter main()\n"); Error_init(&eb); task = Task_create(taskFxn, NULL, &eb); if (task == NULL) { System_printf("Task_create() failed!\n"); BIOS_exit(0); } BIOS_start(); /* does not return */ return(0); }
When I debug, it never makes it into main, when I pause the execution is stuck at:
UInt64 Timer_getExpiredCounts64(Timer_Object *obj) { ti_catalog_arm_peripherals_timers_TimerRegsM4 *timer; UInt32 count1, count2; UInt32 intr1, intr2; UInt32 wrap; timer = (ti_catalog_arm_peripherals_timers_TimerRegsM4 *) Timer_module->device[obj->id].baseAddr; if (obj->runMode != Timer_RunMode_DYNAMIC) { count1 = timer->GPTMTAR; <----------------- THIS LINE wrap = timer->GPTMRIS & 0x1; /* roll-over occurred */ count2 = timer->GPTMTAR; if ((count1 > count2) && wrap) { return ((UInt64)(obj->period - count1) + (UInt64)obj->period); } else { return ((UInt64)(obj->period - count1)); } }
When I use Linaro v4.7.4 compilation and debug works successfully. I am using the Tiva TM4C129x dev board.
Any help would be appreciated in finding out the reason for this.
Thanks