Creating RT-Druid project with Virtual Machine

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
bjackman
Newbie
Posts: 5
Joined: Thu Jun 09, 2016 8:03 pm

Creating RT-Druid project with Virtual Machine

Post by bjackman » Tue Oct 24, 2017 1:43 pm

Hi,
I've been using the Erika Virtual Machine installation to successfully build and debug the demo projects. However, I have a problem trying to create my own new projects from scratch. If I use a demo template (e.g. Mamba MPC5674 VM demo) and modify the OIL and code.c for my own application I cannot build it because the eecfg.c/.h files still contain objects from the demo projects (Task1, Task2 etc). If I create a new RT-Druid project without a template I cannot build it because it cannot find a make file for "Build All".

I presumed that RT-Druid would create the Debug directory contents each time based on the current OIL file contents? It looks like it is not doing this for me. Am I doing something wrong or misunderstanding something? Thanks.
-Brendan

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: Creating RT-Druid project with Virtual Machine

Post by paolo.gai » Tue Oct 24, 2017 5:43 pm

Correct, the Debug directory is created when you build the project, with the makefile, eecfg.c and eecfg.h generated from the OIL file.

The issue could be related to to the fact that you have an error in the OIL file. If there is one, it is printed in the "RT-Druid console" (to view it just select it bottom right among the various consoles available in Eclipse).

If the OIL file is correct, try removing the Debug directory and rebuild.

Ciao,

PJ

bjackman
Newbie
Posts: 5
Joined: Thu Jun 09, 2016 8:03 pm

Re: Creating RT-Druid project with Virtual Machine

Post by bjackman » Tue Oct 24, 2017 11:22 pm

Thank you so much! That worked! I had a small problem with the OIL file syntax but it's okay now.

The next problem now is when I run the Trace32 debugger. None of the trace windows, ORTI views etc are displayed, just a blank window. The program is loaded and runs but I have to manually view all the trace and source windows. It seems like a Trace32 configuration item is missing. Any ideas? Thanks again for your prompt assistance. Much appreciated.
Regards,
Brendan

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: Creating RT-Druid project with Virtual Machine

Post by paolo.gai » Wed Oct 25, 2017 5:29 am

This is strange... which architecture are you using?

PJ

bjackman
Newbie
Posts: 5
Joined: Thu Jun 09, 2016 8:03 pm

Re: Creating RT-Druid project with Virtual Machine

Post by bjackman » Wed Oct 25, 2017 10:06 am

I'm using the PPC architecture. Here's a copy of the OIL file, modified from the VM demo example.


CPU test_application {

OS EE {
EE_OPT = "DEBUG";
EE_OPT = "__USE_LEDS__";
EE_OPT = "__USE_BUTTONS__";
EE_OPT = "__E200ZX_EXECUTE_FROM_RAM__";
EE_OPT = "EE_ISR_DYNAMIC_TABLE";
EE_OPT = "EE_LAUTERBACH_DEMO_SIM";

CFLAGS = "";
ASFLAGS = "";
LDFLAGS = "";

CPU_DATA = PPCE200ZX {
MODEL = E200Z7;
APP_SRC = "code.c";
MULTI_STACK = TRUE {
IRQ_STACK = TRUE {
SYS_SIZE=512;
};
};
/* VLE = TRUE; */
COMPILER_TYPE = GNU;
};

MCU_DATA = PPCE200ZX {
MODEL = MPC5674F;
};

STATUS = EXTENDED;
STARTUPHOOK = TRUE; // this demo is using the StartupHook!
ERRORHOOK = TRUE;
SHUTDOWNHOOK = FALSE;
PRETASKHOOK = FALSE;
POSTTASKHOOK = FALSE;
USEGETSERVICEID = FALSE;
USEPARAMETERACCESS = FALSE;
USERESSCHEDULER = TRUE;

KERNEL_TYPE = BCC1;

/* This generates the ORTI File used by lauterbach Trace32! */

ORTI_SECTIONS = ALL;
};

TASK PollTemp {
PRIORITY = 0x04;
ACTIVATION = 1;
SCHEDULE = FULL;
AUTOSTART = FALSE;
STACK = PRIVATE {
SYS_SIZE = 1024;
};
};

TASK ShutdownSystem {
PRIORITY = 0x01;
ACTIVATION = 1;
SCHEDULE = FULL;
AUTOSTART = FALSE;
STACK = SHARED;
};



COUNTER Counter1 {
MINCYCLE = 2;
MAXALLOWEDVALUE = 0xFFFF ;
TICKSPERBASE = 1;
};

COUNTER faultCtr {
MINCYCLE = 2;
MAXALLOWEDVALUE = 0xFFFF ;
TICKSPERBASE = 1;
};

ALARM AlarmPoll {
COUNTER = Counter1;
ACTION = ACTIVATETASK { TASK = PollTemp; };
AUTOSTART = TRUE { ALARMTIME = 250; CYCLETIME = 250; };
};

ALARM AlarmTask2 {
COUNTER = faultCtr;
ACTION = ACTIVATETASK { TASK = ShutdownSystem; };
AUTOSTART = FALSE;
};
};




Thanks!
- Brendan

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: Creating RT-Druid project with Virtual Machine

Post by paolo.gai » Wed Oct 25, 2017 10:20 am

Dear Brendan,
I see noting wrong in your OIL file.

Are the other demos with ORTI support working fine on your setup?

Ciao,
Paolo

bjackman
Newbie
Posts: 5
Joined: Thu Jun 09, 2016 8:03 pm

Re: Creating RT-Druid project with Virtual Machine

Post by bjackman » Wed Oct 25, 2017 11:25 am

Yes, the demos work fine. Trace32 finds the t32.cmm file so I don't understand why the views don't come up. The ORTI menu options don't appear but when I type "do orti" it appears and I can work normally. It looks like everything is working fine behind the scenes since I can run and debug the program fine. But I have to manually view all of the windows (source, symbols, etc ) before I can see anything.
Thanks,
Brendan

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: Creating RT-Druid project with Virtual Machine

Post by paolo.gai » Wed Oct 25, 2017 11:53 am

It could be related to the fact that the demo is adding additional scripts (when the OIL contains EEOPT=EE_LAUTERBACH_DEMO_SIM) which work with the simulator. maybe these scripts do not work with the real debugger...

Ciao,

PJ

Post Reply