This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Can Hello World pcie demo be run in debugger?

I am attempting to run the hello world pcie program through the debugger.  It steps through fine until it attempts to write to the uart (for DNUM 0).  At that point, it appears to loop forever.

When I pause it, I get this stack:

 

CSL_chipReadTSCL() at csl_chipAux.h:420 0x80000010  
platform_delaycycles(unsigned int)() at platform.c:719 0x80000E14  
UartWriteData(unsigned char)() at evmc66x_uart.c:226 0x800087FC  
platform_uart_write(unsigned char)() at platform.c:640 0x80000CE0  
write_uart(char *)() at pcieboot_helloworld.c:114 0x80009CEC  
main() at pcieboot_helloworld.c:148 0x80009D80  
_c_int00() 0x8000CC48  (the entry point was reached) 

 

I looked at the value of TSCL, and it appears to be 0 and stays 0, which is why the loop never exits.

 

I have already tried the bootloader demo, where insmodding causes the hello world program to be loaded on all 8 cores and executed, and that works.  That displays messages out the uart.

  • I just ran the platform test example program in ccsv5, and it ran fine.  So it seems there must be some kind of initialization that the platform test does that the hello world pcie example doesn't?

  • Rob,

    There's no reason why it would not be able to run with the debugger.  It sounds like the TSC clock isn't getting kicked off.  Have you removed some of the code functionality/initialization from the demo?

    Best Regards,

    Chad

  • No, this is from a fresh install.

     

  • Ok, I'll ping one of the MCSDK owners to take look at this, as I'm not familiar with the code itself. 

    Best Regards,

    Chad

  • To clarify, all I'm doing is opening the project from existing source (the hello world pcie project), cleaning, and building.  Then I launch the configuration, connect to core 0, run General Init script, and then load that compiled .out.  It starts and steps fine until it gets to the write_uart line.

     

  • Chad,

    I was looking at the .h file for the TSCL call, and in the comments it said that an arbitrary write to CSL_chipWriteTSCL() had to be accomlished before the TSCL would work. So, I added a call to that, along with the required .h and CSL libraries, and now it works.

    I'm guessing that when executed as part of the boot loader demo, something else must already make that call.

    This is just an FYI, then, that the hello world pcie example cannot be run by itself as-is (unless I still did something wrong).  Maybe it never was meant to be, but it was a stumbling block that it couldn't be when it seemed like a self-contained example program.

     

    Thanks

    Rob