Page 1 of 1

Compiling problem in ERIKA for TMS570LS3137

Posted: Sun Aug 16, 2015 12:24 pm
by ddpd
I am following the tutorial as given in the link http://erika.tuxfamily.org/wiki/index.p ... _Cortex_RX

I have taken a example template as mentioned in the ERIKA SVN Porting Examples wiki page.

I have set the compiler in the Eclipse -->WIndow-->Preferences-->RTDruid-->Oil-->Cortex-->CCS Compiler Path to C:\ti\ccsv6\tools..

I have even set the environment variables to the same path C:\ti\ccsv6\tools

Now when I try building the project It displays "No Compiler found! Please check CCS installation and CCS_INSTALL_ROOT".

Even tried with the compiler paths C:\ti\ccsv6\tools\compiler\ti-cgt-arm_5.2.2.

Should i modify any changes in the makefile?? Where is the macro CCS_INSTALL_ROOT defined and how to change it??

Doubt: While creating a new project, which compiler to choose?? I do not see any compiler related to CCS as mentioned in the preferences.

Please provide the support.
Thanks in advance.

Re: Compiling problem in ERIKA for TMS570LS3137

Posted: Sun Aug 16, 2015 2:21 pm
by paolo.gai
If you did not do a SVN checkout, the ERIKA sources are installed with Eclipse inside the plugins. something like:

C:\Evidence\eclipse_2.4.64bit\plugins\com.eu.evidence.ee_2.5.0.20150528_0935

CCS_INSTALL_ROOT is used into the file: pkg/cfg/arch/cc_cortex_r4_ccs.mk (I have just did a search).

The wiki says a path like
CCS_INSTALL_ROOT = C:\ti\ccsv6
...that is without the "tools".

I hope this helps.

PJ

Re: Compiling problem in ERIKA for TMS570LS3137

Posted: Sun Aug 16, 2015 4:18 pm
by ddpd
Thanks. The path to CCS_INSTALL_ROOT was configured.
I did update the file with the latest compiler of CCS and the example template built successfully.

flash.bat file was successfully created in the Debug folder.

In order to flash the the code, as per wiki flash.bat file has to be executed.

But when I tried the same a command window opened and closed immediately. Could you please help me out with this issue.

Your response for the previous query is really appreciated.

Re: Compiling problem in ERIKA for TMS570LS3137

Posted: Mon Aug 17, 2015 7:46 am
by paolo.gai
try to run flash.bat from the shell, and see if it gives an error.

PJ

Re: Compiling problem in ERIKA for TMS570LS3137

Posted: Fri Aug 28, 2015 5:13 pm
by ddpd
Thanks. I was able to flash using Uniflash as given in the link above..
But I have one strange question.. Even though the code is building successfully, I have some errors under Problems window..

Its like Type "EE_TYPEASSERTVALUE" could not be resolved
Symbol "TRUE" could not be resolved
Symbol Task1 could not be resolved
Symbol EE_SREG could not be resolved

I am unable to rectify those errors even though all the necessary files are created.
Please help me.

Sorry for the late reply

Re: Compiling problem in ERIKA for TMS570LS3137

Posted: Mon Aug 31, 2015 7:48 am
by paolo.gai
I guess this is related to a known problem related to the fact that Eclipse CDT does not know the location of all the source code...
Thus it marks all the unknown symbols with an error, although the system is able to build correctly.

PJ

Re: Compiling problem in ERIKA for TMS570LS3137

Posted: Mon Aug 31, 2015 9:37 am
by ddpd
Is there any way how could I solve it. Some parameters like EE_TYPEASSERTVALUE etc are already directed from the header files but still the error.
Also but I don't understand why the Task1 defined in conf.oil file throws up error in code.c file when ActivateTask(Task1) is called.

I am using TI Hercules TMS570LS3137 Development board. But the porting for TMS5570 MCU was provided for Kiel Development Board.
How do I go forward ? What changes should I make??

Thanks in advance

Re: Compiling problem in ERIKA for TMS570LS3137

Posted: Mon Aug 31, 2015 12:54 pm
by paolo.gai
The errors are there because CDT is not able to get all paths of the generated code and of the plugins code...

You can ignore those errors in the Problem window as long as it compiled correctly.

Ciao,

PJ

Re: Compiling problem in ERIKA for TMS570LS3137

Posted: Mon Aug 31, 2015 5:50 pm
by ddpd
Even if those problems are ignored, I am still unable to get the result ie I am trying to glow some LEDs..

Can I debug execution in this ERIKA ? could you please mention how to debug this ?
This is a simple test file to glow led. I have added conf.oil file and code.c file. I have not added anything in the Task1 as of now. I tried even that but still the result is same. Could you please help

Code: Select all

CPU test_application {

	OS EE {

		//EE_OPT = "DEBUG";
		//EE_OPT = "__ASSERT__";
		
		CPU_DATA = CORTEX_RX {
			MODEL = R4;
			APP_SRC = "code.c";
			COMPILER_TYPE = CCS;
			MULTI_STACK = FALSE;
		};
		

		MCU_DATA = TI {
			MODEL = TMS570;
		};

		EE_OPT = "__TI_DRIVER_LIB__";
		//EE_OPT = "__USE_USER_LED__";
		EE_OPT = "__USE_LEDS__";
		EE_OPT = "__USE_CAN__";
		
	/*	 
		STATUS 				= EXTENDED;
		STARTUPHOOK 		= FALSE;
		ERRORHOOK 			= FALSE;
		SHUTDOWNHOOK 		= FALSE;
		PRETASKHOOK 		= FALSE;
		POSTTASKHOOK 		= FALSE;
		USEGETSERVICEID 	= FALSE;
		USEPARAMETERACCESS 	= FALSE;
		USERESSCHEDULER 	= FALSE;
 */
		KERNEL_TYPE = FP;
		
	};

	/* this is the OIL part for the task */
	TASK Task1 {
		PRIORITY = 0x01;   /* Low priority */
		SCHEDULE = FULL;
		AUTOSTART = FALSE;
		ACTIVATION = 1;    /* only one pending activation */
		STACK = SHARED;
	};

};
Code.c is

Code: Select all

int main(void)
{

	int i;
  /*Initializes Erika related stuffs*/
  //EE_system_init();
	EE_mcu_init();

  /* Forever loop: background activities (if any) should go here */
  //for (;result == 1;)
  //while(1)
  {
    //EE_LED_Toggle(0);
	    //EE_LED_Toggle(0);

	    EE_LED_On(1);
	    for(i = 0; i < 10000000; i++);
	    EE_LED_Toggle(1);
	    for(i = 0; i < 10000000; i++);
	    EE_LED_Toggle(2);
	    for(i = 0; i < 10000000; i++);
	    EE_LED_Toggle(3);
	    for(i = 0; i < 10000000; i++);
	    EE_LED_Toggle(4);
	    for(i = 0; i < 10000000; i++);
	    //EE_LED_Toggle(5);

  }

}

Re: Compiling problem in ERIKA for TMS570LS3137

Posted: Thu Sep 03, 2015 7:46 am
by paolo.gai
This application has basically no tasks, and just a main loop that blinks a led. You can debug it with standard debuggers for the platform you are using...

... and if the led does not blink, it means that probably the outputs pins have not been configured properly.

PJ

Re: Compiling problem in ERIKA for TMS570LS3137

Posted: Sun Apr 17, 2016 4:31 pm
by taok
Hi, I have got the same trouble like you guy. there some many problem occurs.
"Type "******" could not be resolved."
Especially in the "start12.c", almost all asm code have problem.
Have you already solve this problem ?

Best regard~
taok