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.

FreeRTOS TCB over written during TI FEE initialization

Other Parts Discussed in Thread: HALCOGEN, TMS570LS0332

Hi,

I am using CCS6.1, Halcogen 4.4 and Flash API 2.1.

 

My project is set up using FreeRTOS.  I create a task, start the scheduler (so that task runs) and then I do a bunch of initialization (for spi, het, etc) including FEE.  However, during the FEE initialization, part of the FreeRTOS TCB data is overwritten, including the task priority, which is being changed from 2 to 0x43410289..which causes some issues :)  How can I prevent this from happening?


 

 

See screen shots below.

 

Thanks,

David

 

 

  • Hi David,

    Could you provide following information?

    -Is this happening when the FEE bank does not have any data or is it happening when data is already available in FEE bank.

    -Can you send ti_fee_cfg.c and ti_fee_cfg.h files?

    -If possible, also send dump of FEE bank data.

  • I have seen it under both situations, when there is data there and when there is not data there.  I have a bootloader that normally runs on power up and puts some information there.  For not though I am just debugging running only the main app, and the FEE area is all F's, which you can see in the memory dump, assuming I did it correctly.

     

    Thanks,
    David

     

    7080.FeeMemory.dat4263.ti_fee_cfg.c7343.ti_fee_Cfg.h

  • Hi David,

    Could you attach your project too?
  • Hi,

    I can send the project through a private message, but can't post it because it contains proprietary code. It also may be too big for a private message.

    Thanks,
    David
  • Hi David,

    Can you send me a HALCogen DIL and HCG files with your project settings? I will check at my end if I can reproduce the issue.

    From the data you sent, it seems like you are using a device with 16K FEE memory.

  • 16K FEE memory sounds right. Below are the .hcg and .dil files.

     Below is also my linker file, in case it matters.  I noticed for projects in Halcogen that can configure FreeRTOS, the generates sections in the linker for the kernel, etc.  I didn't originally have these set up when I saw this issue.  Since then I have tried adding them, but I am seeing an abort on startup that I haven't tracked down.  I don't know if it is all related, or if the changes to the linker file are needed or not.  I haven't pursued it further and went back to my original linker file so I am only chasing one issue at a time.  If the linker should be changed to properly incorporate FreeRTOS please let me know.

    Thanks,

    David

    MEMORY
    {
        VECTORS (X)  : origin=0x00000000 length=0x00000020
        FLASH0  (RX) : origin=0x00000020 length=0x0003FFE0
        STACKS  (RW) : origin=0x08000000 length=0x00001500
        RAM     (RW) : origin=0x08001500 length=0x00006B00
    }
    
    
    
    
    /*----------------------------------------------------------------------------*/
    /* Section Configuration                                                      */
    
    SECTIONS
    {
        .intvecs : {} > VECTORS
        .text    : {} > FLASH0
        .const   : {} > FLASH0
        .cinit   : {} > FLASH0
        .pinit   : {} > FLASH0
        FEE_TEXT_SECTION : {} > FLASH0
        FEE_CONST_SECTION : {} > FLASH0
        .bss     : {} > RAM
        .data    : {} > RAM
        .sysmem  : {} > RAM
        FEE_DATA_SECTION : {} > RAM
    
    }
    

     

    2541.Halcogen.zip

     

     

  • Hi David,
    I generated code with the files you have sent. I got compiler error saying vPortYieldProcessor and vPortYieldWithinAPI were not available. I commented them and noticed that TI_Fee_GlobalVairables is at 0x8001500. Can you check in your map file where is TI_Fee_GlobalVairables located?
  • Hi,

    They are probably not available because the FreeRTOS code is not part of the Halcogen generated code.  I don't think the TMS570LS0332 supports FreeRTOS generation in Halcogen.

    TI_Fee_GlobalVariables is located at 0x08004334, which is the start of the defined FEE_DATA_SECTION,.

    I have attached my map file for your reference.

    Thanks,

    David

    6082.SRB_RT.zip

  • Hi,

    I figured out the issue. The task that was initializing the FEE module didn't have enough stack space to handle the FEE init call. Increasing the task stack size solved it.

    Thanks,
    David