MCU_DATA custom model failed

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Locked
tgm

MCU_DATA custom model failed

Post by tgm »

Hi!

I have a Microstick board from Microchip http://www.microchip.com/microstick
that supports only dsPIC33FJ64MC802.
In my OIL file I defined the MCU_DATA as follows:

Code: Select all

MCU_DATA = PIC30 {
  MODEL = CUSTOM {
     LINKERSCRIPT = "p33FJ64MC802.gld";
     DEV_LIB = "libp33FJ64MC802-elf.a";
     INCLUDE_C = "p33FJ64MC802.h";
     INCLUDE_S = "p33FJ64MC802.inc";
  };
};
I get an error when building the project:
pic30-coff-cc1.exe: error: Invalid -mcpu option. CPU null not recognized.
I checked the makefile and found PIC30_MODEL := null

I have tried to use a compiler option using CFLAGS = "-mcpu=PIC33FJ64MC802";
but I get the same error because my option is first in the command line and it gets
overwritten.

Thank you,
TGM
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: MCU_DATA custom model failed

Post by paolo.gai »

Hi TGM!

You missed the MODEL specification... I have just checked in the PIC30 manual and the model is not cited in the example. I have just updated also the manual.

The following code works for me.

Code: Select all

MCU_DATA = PIC30 {
  MODEL = CUSTOM {
     MODEL = "33FJ64MC802";
     LINKERSCRIPT = "p33FJ64MC802.gld";
     DEV_LIB = "libp33FJ64MC802-elf.a";
     INCLUDE_C = "p33FJ64MC802.h";
     INCLUDE_S = "p33FJ64MC802.inc";
  };
};
If you are going to make some demos for the Microchip Microstick, let us know... It will be nice to include them in the standard distribution of ERIKA!

Ciao,

PJ
tgm

Re: MCU_DATA custom model failed

Post by tgm »

Hi!

Thanks, I am one step forward.
Still I didn't succeed to build my project.

It stops at the eecfg.c compilation with an abnormal failure:

printf "CPP eecfg.c\\n"; /cygdrive/e/Work/RCB_MA~1/01_Tools/01_INS~1/mplabc30/v3.25/bin/bin/pic30-coff-gcc -O2 -Wall -Winline -v -Q -mcpu=33FJ64MC802 -I"C:\Evidence\eclipse\plugins\COMEUE~2.201\ee_base\pkg\\." -I"E:\Work\Eclipse\WORKSP~1\RCB_MA~1\\\." -I. -I"`cygpath -w /cygdrive/e/Work/RCB_MA~1/01_Tools/01_INS~1/mplabc30/v3.25/include`" -DVERBOSE -DNO_DEP -D__RTD_CYGWIN__ -D__PIC30__ -D__MICROCHIP_DSPIC30__ -D__PIC30_ICD2__ -D__PIC30_SPLIM__ -D__33FJ64MC802__ -D__FP__ -D__MONO__ -D__ALARMS__ -D__OO_AUTOSTART_ALARM__ -D__ALLOW_NESTED_IRQ__ -D__ERIKA__ -D__PIC30_INCLUDE_REGS__ -c "`cygpath -w ../Debug/eecfg.c`" -o `cygpath -w obj/Debug/eecfg.o`
CPP eecfg.c


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Using built-in specs.
Target: pic30-coff
Configured with: /Users/cawilkie/dev/builds/build_20101011/src/gcc-4.0.2/gcc-4.0.2/configure --target=pic30-coff --build=i386-darwin --host=i386-mingw32 --program-prefix=pic30-coff- --enable-languages=c --with-included-gettext
Thread model: single
gcc version 4.0.3 (dsPIC30, Microchip v3_25) Build date: Oct 11 2010
make: *** [obj/Debug/eecfg.o] Error 3


I used -v and -Q for the compilation process but I got no useful information.

Regarding your question about the demos for Microstick. I'm just trying to get the RTOS running
on the Microstick board as a first step. Next step will be to make drivers for USART, SPI, PWMs
and ADC, the goal being to have the SW platform for a Remote Control Boat project.

If you think these demos could be included in the ERIKA distribution I'm more than happy to cooperate.

Cheers,
TGM
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: MCU_DATA custom model failed

Post by paolo.gai »

Hi,

could you please send to my e-mail (pj "at" evidence "dot" eu "dot" com) a zip file with all the sources of the project, so that I can try to compile it on my machine?

Note I'm using C30 v 3.23 and not C30 v 3.25 . It could be a problem with the compiler...

About the demos: Sure! We'll go to accept demos and put them in the standard distribution. When you have something ready, I can give you the SVN access so that you can commit a board. If the microstick has some special peripheral, we could also think to make a specific BOARD section in the OIl file. To do this, we could use the XSLT transformation support added recently, described here:
http://erika.tuxfamily.org/wiki/index.p ... formations
Let me know if you are interested...

Ciao,

PJ
tgm

Re: MCU_DATA custom model failed

Post by tgm »

Hi!

I have tried on my Windows XP machine and the build was successful.
Though, I can't start my tasks. Still checking, in case I can't figure it out
I'll ask for help.

Regarding the Microstick board, there are not two many things to do with
only the board itself (two LEDs). But, I'll send you my files as soon I as have
something running.

Thank you!

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

Re: MCU_DATA custom model failed

Post by paolo.gai »

what do you mean "I cannot start the tasks? did you activate them?

just try changing one of the existing examples (for example, I suggest the demoboard/OO/task demo you can find in the templates...

Ciao,

PJ
Locked