Include problems

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
sergifern
Newbie
Posts: 11
Joined: Thu Sep 23, 2010 1:13 pm

Include problems

Post by sergifern » Mon Sep 27, 2010 5:17 pm

Hello,
I have a lot of problems to includw the libraries, but I get some sample program to compile and it worked, but when I try to compile the example for the PIC24, using MiWi P2P protocol, the compiler does not find some fuctions (for example. EE_miniflex_radio_init). I have all the libraries included (in warning). Can you could help me with this error?

Code: Select all

"C:\WorkspaceEclipse\mini_proba1\Debug\make_launcher.bat" all 
C:\cygwin\bin\bash found!
MAKE_DIRECTORIES

CP crt0.s
CP p24FJ32GA004.inc
GEN ee_pic30regs.inc
DEP   crt0.S
/bin/sh: /opt/mchp/pic30/bin/pic30-coff-gcc: No such file or directory
MAKE_DIRECTORIES (after a clean)
ASM   crt0.s
CP p24FJ32GA004.h
GEN ee_pic30regs.h
CPP   eecfg.c
CPP   code.c
c:\WORKSP~1\MINI_P~1\code.c: In function 'board_init':
c:\WORKSP~1\MINI_P~1\code.c:140: warning: implicit declaration of function 'EE_miniflex_radio_init'
LOC
CPP   ee_miniflex.c
CPP   ee_miniflex_demoboard.c
CPP   ee_hal.S
CPP   ee_hal_c.c
CPP   ee_alcancel.c
CPP   ee_altick.c
CPP   ee_alget.c
CPP   ee_alsetabs.c
CPP   ee_alsetrel.c
CPP   ee_irqsc.c
CPP   ee_rqexchg.c
CPP   ee_rqinsert.c
CPP   ee_schedule.c
CPP   ee_thact.c
CPP   ee_thendin.c
CPP   ee_mutex.c
CPP   ee_uart.c
CPP   ee_spi.c
CPP   conq.c
CPP   console.c
CPP   console_serial.c
CPP   pic30.c
AR  libee.a
LD
obj/code.o(.text+0x2c): In function `FuncTaskMiWiOP':
c:\WORKSP~1\MINI_P~1\code.c:172: undefined reference to `MiApp_MessageAvailable'
obj/code.o(.text+0x3a): In function `FuncTaskInt':
c:\WORKSP~1\MINI_P~1\code.c:178: undefined reference to `mrf24j40_isr'
obj/code.o(.text+0x260): In function `board_init':
c:\WORKSP~1\MINI_P~1\code.c:140: undefined reference to `EE_miniflex_radio_init'
obj/code.o(.text+0x386): In function `FuncTaskRec':
c:\WORKSP~1\MINI_P~1\code.c:192: undefined reference to `rxMessage'
obj/code.o(.text+0x3a2):c:\WORKSP~1\MINI_P~1\code.c:200: undefined reference to `rxMessage'
obj/code.o(.text+0x3d8):c:\WORKSP~1\MINI_P~1\code.c:210: undefined reference to `rxMessage'
obj/code.o(.text+0x3da):c:\WORKSP~1\MINI_P~1\code.c: undefined reference to `PrintChar'
obj/code.o(.text+0x3e0):c:\WORKSP~1\MINI_P~1\code.c:213: undefined reference to `rxMessage'
obj/code.o(.text+0x3fe):c:\WORKSP~1\MINI_P~1\code.c:218: undefined reference to `rxMessage'
obj/code.o(.text+0x406):c:\WORKSP~1\MINI_P~1\code.c:220: undefined reference to `rxMessage'
obj/code.o(.text+0x40a):c:\WORKSP~1\MINI_P~1\code.c: undefined reference to `PrintChar'
obj/code.o(.text+0x40c):c:\WORKSP~1\MINI_P~1\code.c:221: undefined reference to `rxMessage'
obj/code.o(.text+0x410):c:\WORKSP~1\MINI_P~1\code.c: undefined reference to `PrintChar'
obj/code.o(.text+0x41e):c:\WORKSP~1\MINI_P~1\code.c:226: undefined reference to `rxMessage'
obj/code.o(.text+0x422):c:\WORKSP~1\MINI_P~1\code.c: undefined reference to `PrintChar'
obj/code.o(.text+0x468):c:\WORKSP~1\MINI_P~1\code.c:239: undefined reference to `rxMessage'
obj/code.o(.text+0x47c):c:\WORKSP~1\MINI_P~1\code.c: undefined reference to `rxMessage'
obj/code.o(.text+0x49c):c:\WORKSP~1\MINI_P~1\code.c:247: undefined reference to `rxMessage'
obj/code.o(.text+0x4d4):c:\WORKSP~1\MINI_P~1\code.c:254: undefined reference to `rxMessage'
obj/code.o(.text+0x50c):c:\WORKSP~1\MINI_P~1\code.c:260: undefined reference to `rxMessage'
obj/code.o(.text+0x55a):c:\WORKSP~1\MINI_P~1\code.c:267: more undefined references to `rxMessage' follow
obj/code.o(.text+0x65e): In function `FuncTaskRec':
c:\WORKSP~1\MINI_P~1\code.c:299: undefined reference to `MiApp_DiscardMessage'
obj/code.o(.text+0x6c0): In function `FuncTaskSend':
c:\WORKSP~1\MINI_P~1\code.c:337: undefined reference to `TxData'
obj/code.o(.text+0x6cc):c:\WORKSP~1\MINI_P~1\code.c:340: undefined reference to `TxBuffer'
obj/code.o(.text+0x6ea):c:\WORKSP~1\MINI_P~1\code.c:341: undefined reference to `TxBuffer'
obj/code.o(.text+0x6fa):c:\WORKSP~1\MINI_P~1\code.c:344: undefined reference to `TxData'
obj/code.o(.text+0x6fe):c:\WORKSP~1\MINI_P~1\code.c:349: undefined reference to `MiApp_BroadcastPacket'
obj/code.o(.text+0x786): In function `main':
c:\WORKSP~1\MINI_P~1\code.c:406: undefined reference to `MiApp_ProtocolInit'
obj/code.o(.text+0x78a):c:\WORKSP~1\MINI_P~1\code.c:408: undefined reference to `MiApp_SetChannel'
obj/code.o(.text+0x7a2):c:\WORKSP~1\MINI_P~1\code.c:411: undefined reference to `PrintDec'
obj/code.o(.text+0x7b8):c:\WORKSP~1\MINI_P~1\code.c:426: undefined reference to `MiApp_ConnectionMode'
obj/code.o(.text+0x7e6):c:\WORKSP~1\MINI_P~1\code.c:458: undefined reference to `DumpConnection'
make: *** [pic30.cof] Error 1
Thank you,
Sergi

gfranchi
Newbie
Posts: 7
Joined: Thu Sep 20, 2007 5:12 pm

Re: Include problems

Post by gfranchi » Tue Sep 28, 2010 2:07 pm

It seems that you are not including the MiWiP2P library.

Check the conf.oil file of your application.
Is there this statement: EE_OPT = "__EE_MINIFLEX__";?
Is there the folder MiWiP2Pv2 in the contrib directory?

Are you trying to compile the example template available for the new version of the stack?

Both the MiWiP2Pv2 folder and the example template (pic24_miwi_p2p_demo) can be downloaded from the SVN repository:
http://erika.tuxfamily.org/wiki/index.p ... SVN_Access

Regards.

Gianluca.

gfranchi
Newbie
Posts: 7
Joined: Thu Sep 20, 2007 5:12 pm

Re: Include problems

Post by gfranchi » Tue Sep 28, 2010 2:17 pm

In the last post I forgot this question:

Do you have the following statements in your conf.oil file?

LIB = ENABLE {
NAME = "MIWIP2P_V2";
};

EE_OPT = "__USE_MRF24J40MA__";

Gianluca

sergifern
Newbie
Posts: 11
Joined: Thu Sep 23, 2010 1:13 pm

Re: Include problems

Post by sergifern » Tue Sep 28, 2010 6:31 pm

Thanks for your help, Gianluca. I was able to compile the example program.

But I need some help with another question. The purpose of my project is to communicate, through zigbee, a Flex demo2 with Miniflex board. I wanted to know if exist any library/functions for the zigbee comunications of miniflex (pic24FJ32GA004), because I don't have much idea of how to do this. I just want to start by sending messages of the simplest way.

Thanks for your attention,
Sergi

gfranchi
Newbie
Posts: 7
Joined: Thu Sep 20, 2007 5:12 pm

Re: Include problems

Post by gfranchi » Tue Sep 28, 2010 8:40 pm

To date, the MiWiP2Pv2 stack works only with the Miniflex board. If you use that board, to make your application you can start from the example tamplete available here: http://svn.tuxfamily.org/viewvc.cgi/eri ... les/pic30/

For the Flex board we have still to port the stack. It is not a big work, you can try to do it by yourself.

Bye.

Gianluca.

stuntman110
Newbie
Posts: 8
Joined: Tue Mar 19, 2013 10:10 am

Re: Include problems

Post by stuntman110 » Sat Feb 01, 2014 5:57 pm

Hello,
I have problems to use functions from the library "math.h".
I use Erika Enterprise on the "MPC5668G".
It specifically concerns the following functions:

double floor (double x)
double fmod (double numerator, double denominator)

Does the use of the "math.h" library separately specify in the OIL or is this lib by default available?

Eclipse reports: function has no prototype

I would be very grateful if someone can help me.

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

Re: Include problems

Post by paolo.gai » Mon Feb 03, 2014 7:17 pm

Hi,

ERIKA is kind of neutral to liraries like math.h and similar.

to use them, you need to #include them in the C files. Moreover, you need to add the corresponding linker command in the OIL file using in the OS part the command

LDFLAGS = "xxx";

where xxx are the linker commands.

I hope it helps...

Ciao,

PJ

Post Reply