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 and EMIF on TMDX570LS20SUSB

Other Parts Discussed in Thread: HALCOGEN

Hello everyone,


For a week or so I've been playing around with TMDX570LS20SUSB usb kit and halcogen. Overall it's pretty easy to use software and I was able to pick it up in couple hours. And then it's just the usual. Pretty cool, that I don't have to go through the usual configuration.

However, what I wanted to ask is, whether I can get HALCOGEN to generate code for RTOS and EMIF for this development board TMDX570LS20SUSB?

I tried to generate RTOS for different kit TMS570LS20216SZWT and tried to upload to the board through CCS, but it kept failing, at least I was able to compile.

 

Best Regards

Raivis

  • Hello:

    We have received your post and will provide some feedback soon.

    Regards.

  • Hi Raivis,

    HALCoGen project created using TMS570LS20216SZWT_FreeRTOS, should run on the TMDX570LS20SUSB kit.

    Did you try the Blinky example that comes with HALCoGen?
    Please follow the steps mentioned in help docuement againt the "example_freeRTOSBlinky.c" You can open the document after you created the HALCogen Project, go to Help--> Help Topics, expand the Example section.

  • Hi,


    Thanks for you response. And yes I've tried to follow the example of blinky RTOS.

    Not 100% sure, but I think the instruction are not up to date. At least to get it to compile, I disabled in interrupts "data abort handler", because neither "_data" or "_dabort" would compile as stated in the provided help. It just throws first reference error, like this:

    unresolved symbol _data, first referenced in ./source/sys_intvecs.obj	RTOS2_tests		 	C/C++ Problem
    

    In addition, in VIM RAM section in address 0x0C I wrote "vPortPreemptiveTick" instead of "vPreemptiveTick".

    Otherwise I get the same error stated above, only with the variable "vPreemptiveTick".

    Maybe I'm missing some includes to fully compile. But even if it compiles without "abort error handler" it should be able to upload the firmware to the board shouldn't it?

    When I try to upload the compiled RTOS example I get the following error, and it only happens on this RTOS example, I can get ADC, UART whatever working just fine:

    Error connecting to the target:
    (Error -151 @ 0x0)
    One of the FTDI driver functions used during
    the connect returned bad status or an error.
    The cause may one or more of: invalid emulator serial number,
    blank emulator EEPROM, missing FTDI drivers, faulty USB cable.
    Use the xds100serial command-line utility in the 'common/uscif'
    folder to verify the emulator can be located.
    (Emulation package 5.0.747.0)
    

    Only happens when I try to upload the RTOS example, that's why I asked whether it is possible to use "TMS570LS20216SZWT_FreeRTOS".

    Also, I tried compiling the RTOS like stated in the following thread http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/273970/956755.aspx

    in short, not changing anything just enabling GIO driver. It compiled, but the same error persists when uploading it to the board, about missing fpga.

     

    Update:

    I managed to upload the firmware through nowFlash tool, skipping the CCS. However, when I upload the RTOS example, the error signaling module pops in and show me the ERROR led and my task obviously is on halt.

    When compiling I still get these warning, which could be responsible for the error:

    "../source/sys_link.cmd", line 47: warning #10068-D: no matching section
    "../source/sys_link.cmd", line 53: warning #10068-D: no matching section
    "../source/sys_link.cmd", line 54: warning #10068-D: no matching section
    "../source/sys_link.cmd", line 55: warning #10068-D: no matching section

    Here are the corresponding lines in the sys_link.cmd file:

    47: os_tasks.obj (.const:.string)
    53: -l=rtsv7R4_T_be_v3D16_eabi.lib<icall32.obj> (.text)
    54: -l=rtsv7R4_T_be_v3D16_eabi.lib<memset32.obj> (.text)
    55: -l=rtsv7R4_T_be_v3D16_eabi.lib<memcpy32.obj> (.text)

    So the questions are, why can't I use CCS for uploading firmware, and why does my firmware crash?

    Here is my sys_main.c file:

    /** @file sys_main.c 
    *   @brief Application main file
    *   @date 25.July.2013
    *   @version 03.06.00
    *
    *   This file contains an empty main function,
    *   which can be used for the application.
    */
    
    /* (c) Texas Instruments 2009-2013, All rights reserved. */
    
    /** @mainpage TMS570LS20216SZWT Micro Controller Driver Documentation
    *   @date 25.July.2013
    *
    *   @section sec1 Introduction
    *   This document describes the TMS570 microcontroller peripheral drivers.
    *
    *   @section sec2 Drivers
    *   @subsection sec2sub1 RTI Driver
    *   Real Time Interface Module Driver.
    *   @subsection sec2sub2 GIO Driver
    *   General Purpose Input Output Module Driver.
    *   @subsection sec2sub3 SCI Driver
    *   Serial Communication Interface Module Driver.
    *   @subsection sec2sub4 SPI Driver
    *   Serial Peripheral Interface Module Driver.
    *   @subsection sec2sub5 CAN Driver
    *   Controller Area Network Module Driver.
    *   @subsection sec2sub6 ADC Driver
    *   Analog to Digital Converter Module Driver.
    *   @subsection sec2sub7 LIN Driver
    *   Local Interconnect Network Module Driver.
    *   @subsection sec2sub8 HET Driver
    *   High End Timer Module Driver.
    */
    
    /* USER CODE BEGIN (0) */
    /* USER CODE END */
    
    
    /* Include Files */
    
    #include "sys_common.h"
    #include "system.h"
    
    /* USER CODE BEGIN (1) */
    #include "FreeRTOS.h"
    #include "os_task.h"
    
    /* Include HET header file - types, definitions and function declarations for system driver */
    #include "het.h"
    
    
    /* Define Task Handles */
    xTaskHandle xTask1Handle;
    /* Task1 */
    void vTask1(void *pvParameters)
    {
    	for(;;)
    	{
    		/* Taggle HET[1] with timer tick */
    		gioSetBit(hetPORT, 1, gioGetBit(hetPORT, 1) ^ 1);
    		vTaskDelay(1);
    	}
    }
    /* USER CODE END */
    
    
    /** @fn void main(void)
    *   @brief Application main function
    *   @note This function is empty by default.
    *
    *   This function is called after startup.
    *   The user can use this function to implement the application.
    */
    
    /* USER CODE BEGIN (2) */
    /* USER CODE END */
    
    void main(void)
    {
    /* USER CODE BEGIN (3) */
    	 gioSetDirection(hetPORT, 0xFFFFFFFF);
    	 gioSetBit(hetPORT, 2, 1);
    	 if (xTaskCreate(vTask1, (const signed char *)"Task1", configMINIMAL_STACK_SIZE, NULL, 1, &xTask1Handle) != pdTRUE)
    	 {
    		 /* Task could not be created */
    		 while(1);
    	 }
    
    	 /* Start Scheduler */
    	 vTaskStartScheduler();
    	 /* Run forever */
    	 while(1);
    /* USER CODE END */
    }
    
    
    /* USER CODE BEGIN (4) */
    /* USER CODE END */
    

     


     

    I hope I was descriptive enough.

    Kind Regards

    Raivis

  • So any ideas, what could be going wrong? Is it really that tough of a problem to solve?

  • Hi Raivis,

    Hope you have the latest HALCogen ( V 3.06.00), else please download from, http://www.ti.com/tool/halcogen
    Could you please try recreating the HALCoGen project fresh on v3.06.00, or you can use the one I have attached. ( LS2x_USB.hcg).

    I did a quick run of the RTOS Blinky choosing TMS570LS20216SZWT_FREERTOS in HALCoGen and following the help document, it worked fine on the USB stick. I am attaching the complete project for your reference. Only change I made was to make the vTaskDelay(1); to vTaskDelay(1000); just to have the LED toggle visible.

    Complete Project --> 0844.LS2x_USB.zip