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.

RTOS/TMS320F28069: FLASH API with SysBios

Part Number: TMS320F28069
Other Parts Discussed in Thread: SYSBIOS,

Tool/software: TI-RTOS

Hi

I have a working fine F28069 NonRTOS application with using the FLASH API functions Flash_Program() FLASH_Program() and Flash_Verify().

Then I created a SysBios Application from the NonRTOS application with Interrupts, Mailboxes and Tasks ( I don't use any boot or startup functions from the BIOS. I've got them all from the NonBios Applicaton).

Now, after the application has started it ends in an endless Loop function called BIOS_linkedWithIncorrectBootLibrary().

What does it means? I don't use any Boot functions. I just want to use the FLASH API functions above. 

Regards

Michael

  • Michael,

    Did you make sure rules mentioned in Flash API document is followed?

    Step 10: Rules for Callback, Interrupts, and Watchdog

    Regards,
    Manoj

  • Hi Manoj

    Thank you for your answer. I was a little bit busy. I mean Flash_Program() Flash_Erase() Flash_Verify().

    Yes, I follow the rules in the document TMS320F2806x Flash API. It works fine in my NonRTOS application.

    But when I start the bios (BIOS_start()) it ends into the BIOS_linkedWithIncorrectBootLibrary() WITHOUT using any api calls.

    //-----------------------------------------------------------------------------
    GLOBAL int main(void)
    //-----------------------------------------------------------------------------
    {
        //
        // Remarks:
        // Application main function. Used for initialization and for start the RTOS.
        // input    none
        // return   code
        //
        //--------------------------------------------------------------------------

        //
        // Initialize and define all threads, system and data
        //
        sys_init();          // system init, clocking
        flash_initRam();     // prepare API flash functions for using into SRAM
        flash_initData();    // read customer data from flash
        bu_init();           // init business unit thread and mailbox
        sci_init();          // init uart interface thread and mailbox
        led_init();          // init periodical led thread

        // Start the sys bios
        BIOS_start();    // does not return

        return(0);
    }

    Regards

    Michael

  • Michael,

    I have never worked with SYSBIOS. So, I may not be the right person to answer this question.

    But, I found a post which you may find interesting. Please check
    e2e.ti.com/.../268608

    Regards,
    Manoj
  • Hi Manoj

    Thank you for your answer.

    The post you mentioned is very interesting.

    But my problem appears earlier. I don't even call any FLASH API functions.
    Right after BIOS_start() the program stucks in the BIOS_linkedWithIncorrectBootLibrary() endless loop.

    Void BIOS_linkedWithIncorrectBootLibrary(Void)
    {
        /*
         *  If execution reaches this function, it indicates that the wrong
         *  boot library was linked with and the XDC runtime startup functions
         *  were not called. This can happen if the code gen tool's RTS library
         *  was before SYS/BIOS's generated linker cmd file on the link line.
         */
        while (1);
    }

    I do not understand exactly the comment above. I use the 2806x_BootROM_API_TABLE_Symbols_fpu32.lib.

    Should I use another library ? or a newer?

    Regards

    Michael

  • This library file 2806x_BootROM_API_TABLE_Symbols_fpu32.lib can be used for calling API functions. It does seems to be genuine SYSBIOS related problem. I have pinged someone to help you on this topic.

    Regards,
    Manoj
  • For SYS/BIOS applications to work, you must use the XDC runtime's application entry point rather than that provided by the TI RTS library. Make sure that your linker command file (or command line) places these libraries ahead of the TI provided RTS library in the link order:

        "/ti/catalog/c2800/init/lib/Boot.a28FP"
        "/ti/targets/rts2800/lib/ti.targets.rts2800.a28FP"
        "/ti/targets/rts2800/lib/boot.a28FP"

    Alan

  • Micheal,

    Is this issue resolved?

    Regards,
    Manoj
  • Hi Manoj

    No, it isn't.

    I don't get it. 

    The SysBios created a Linker.cmd with the content:

    -l"C:\Users\mike\Dropbox\BraceEmbeddedWorking\Bmbed_TMDXCNCD28069\F28069AppSysBios\Debug\configPkg\package\cfg\app_p28FP.o28FP"
    -l"C:\Users\mike\Dropbox\BraceEmbeddedWorking\Bmbed_TMDXCNCD28069\F28069AppSysBios\src\sysbios\sysbios.a28FP"
    -l"C:\ti\bios_6_53_01_03\packages\ti\catalog\c2800\init\lib\Boot.a28FP"
    -l"C:\ti\bios_6_53_01_03\packages\ti\targets\rts2800\lib\ti.targets.rts2800.a28FP"
    -l"C:\ti\bios_6_53_01_03\packages\ti\targets\rts2800\lib\boot.a28FP"

    I have additionaly my F28069App.cmd with :

        //
        // FLASH programming routines from RAM
        //
        FlashProgrammingRamSect :  LOAD = Application,    PAGE = 0
               RUN = L8DpSaramMem,     PAGE = 1
               LOAD_START (_FlashProgramming_loadstart),
               LOAD_END   (_FlashProgramming_loadend),
               RUN_START  (_FlashProgramming_runstart)

    - What do I have to do for using the XDC runtime application entry? With the XDC Startup in the cfg file?

    - Generally: Can I use the current FLASH functions from 2806x_BootROM_API_TABLE_Symbols_fpu32.lib?

    - Do I have to define a Special startup entry function in the cfg file? At startup settings user reset function? or a function before C runtime initialization? (but this is readonly)

    - Or similar with the SYS/BIOS startup cfg page? It looks similar to the XDC.

    - Do I have to define a entry function where I initalize the FLASH functions before BIOS initialization ? after but before BIOS start?

    - Does it help when I define a new CCS Project with sysbios template for C28069 and then load my FLASH functions like above?

    - Do I have to load the FLASH functions to a Special space in the Memory? 

    - Do you know a proper documentation where my case is described? I think my use case is Nothing Special. F28069 with SysBios and FLASH programming functions.

    Regrads

    Michael

  • Micheal,

    I'm not the right person to answer this question. Lets wait for Alan reply.

    Regards,
    Manoj
  • The linker command files seem ok. But what does the linker command line look like?

    The generated linker command file must appear before the codegen tools' "libc.a" in the link line. Otherwise, the "c_int00" entry point from libc.a will be pulled in rather than the one from "C:\ti\bios_6_53_01_03\packages\ti\targets\rts2800\lib\boot.a28FP"

    Alan

  • Hi Alan

    Thank you for your answer. Here my linker command line:

    -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 -g --c99 --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on -z -m"F28069AppSysBios.map" --stack_size=0x300 --warn_sections -i"C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.7.LTS/lib" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.7.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="F28069AppSysBios_linkInfo.xml" --rom_model

    Regards

    Michael

  • The final linker command line as shown in the CCS CDT Build Console output should be something like this:

    Invoking: C2000 Linker
    "C:/ti/ccs810/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 -g --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on -z -m"minimal_TMS320F28069.map" --stack_size=0x300 --warn_sections -i"C:/ti/ccs810/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/lib" -i"C:/ti/ccs810/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="F28069AppSysBios_linkInfo.xml" --rom_model -o "F28069AppSysBios.out" "./main.obj" "../TMS320F28069.cmd" -l"configPkg/linker.cmd" -llibc.a.

    Notice that the last 3 items on the link line should be your linker command file, the linker command file generated during the building of the BIOS configuration, and the RTS library's "libc.a".

    The inclusion of the linker command file generated during the building of the BIOS configuration is controlled by Project's C2000 Linker File Search Path options:


     

    I suspect your project is missing the two items highlighted in blue above. Make sure that "libc.a" appears last in the "Include library file or command file as input" list.

    Alan

  • Hi Alan

    Thank you for your answer.

    I've got it.
    The project linked boot28.asm instead boot_bg.asm.

    I wanted to keep all files (libraries, sysbios etc.) local near the project. And so the wrong boot file was used.

    Regards

    Michael