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.

Problem running my application without GEL

Hi,

I had developed one application with DSP/BIOS 5.41. In this app, I have one UART device, a main() and a GPSInit() task. I removed the EVM6747_dsp.gel from my CCS 3.3 and then connect to my target. I have duplicated the functions in the GEL in my application to take care of the Setup_System_Config(), Setup_PLL(), Setup_Psc_All_On(), Setup_EMIFA() and Setup_EMIFB().

Here is my problem. When I run my app within the CCS, I realised that the UART device is created and hence its init function, UartGPSInit(), is executed automatically. I expected the main() would be run next, then the GPSInit() task. However, both main() and GPSInit() tasks were not executed at all. Instead, after UartGPSInit() finished, the app is terminated without any error messages whatsoever.

My questions are:

1. Why both main() and GPSInit() tasks are not executed. I am sure I had GPSInit() task setup properly in the TCF. Is it something to do with my GEL replacement codes?

2. Can you explain what are the memory mapping functions in the GEL? I didn't have them in my GEL replacement codes. Is the the source of my problem?

For your information, my GEL replacement codes are nothing more than just copy-and-paste, plus modify to C syntax. I called these Setup_xxx() codes from GPSInit() task. Below are the snapshot of my app.

 

/////////////////////////////////////////////////////////// Uart device driver will call the codes below.///////////////////////////////////////////////////////////

void GPSUartInit()

{

    Uart_init();

    uartParams = Uart_PARAMS;

    uartParams.baudRate = Uart_BaudRate_9_6K; // Baud rate 9600.

    uartParams.hwiNumber = 9; // Use INT9.

    uartParams.opMode = Uart_OpMode_INTERRUPT; // Use interrupt mode.

 

    // Enable the UART instance in the PSC module

    Psc_ModuleClkCtrl(Psc_DevId_1, CSL_PSC_UART1, TRUE);

}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////// This is a task scheduled in the TCF /////////////////////////////////////////////////////////

void GPSInit(void)

{

    :

    :

    //  The initialisation is intended to replace the GEL

     initSysCfg();                           // Setup pinmux

     initPll();                                   // Setup PLL

     initPSCOn();                          // Setup PSC

     initEMIFA();                            // Setup External Memory Interface A

     initEMIFB();                            // Setup External Memory Interface B

    :

    :

}

Thank you so much for your help. Truly appreciate it.

Chee-Beng

 

  • Chee-Beng,

    Chee-Beng Ang said:

    1. Why both main() and GPSInit() tasks are not executed. I am sure I had GPSInit() task setup properly in the TCF. Is it something to do with my GEL replacement codes?

    Since the GEL script modifies several device registers to properly configure all its subsystems, I would make sure that:

    - The initialization code is loaded to the internal L2RAM (to avoid any issues with the EMIF clock)

    - Everything inside the GEL function OnTargetConnect() runs before BIOS completes its initalization. Inside the TCF file, go to System --> Global Settings --> check the box Call User Init Function and put the name of the function in the box.

    The idea is to keep the same sequence of events: once the target is connected the GEL function OnTargetConnect() performs the configuration of all its clocks, EMIFs and subsystems. When the program is loaded and your code starts running, it expects that all the configuration performed by the GEL function is finished and it only modifies whatever it needs.

    In your case you should not use the function GPSInit() as a task but instead as the User Init Function. The BIOS commands are shown above, but don't forget to name the function with a leading underscore: _GPSInit 

    Chee-Beng Ang said:

    2. Can you explain what are the memory mapping functions in the GEL? I didn't have them in my GEL replacement codes. Is the the source of my problem?

    The memory mapping functions are for emulation/debugging purposes only; they do not need to be added to your code.

    Hope this helps,

    Rafael