The reason you get the errors is that you define the __nesc* functions
with calls to MACROs that are msp430 specific. You need to figure out
how these functions should be implemented for your specific platform.
Kevin
On Dec 2, 2007 5:44 PM, mejda chouaieb <[EMAIL PROTECTED]> wrote:
> Hello
> I tried to define these functions in my hardware.h files :
> ______________________________________
>
> typedef bool __nesc_atomic_t;
> __nesc_atomic_t __nesc_atomic_start(void);
> void __nesc_atomic_end(__nesc_atomic_t reenable_interrupts);
> #ifndef NESC_BUILD_BINARY
> /* @spontaneous() functions should not be included when NESC_BUILD_BINARY
> is #defined, to avoid duplicate functions definitions wheb binary
> components are used. Such functions do need a prototype in all cases,
> though. */
> __nesc_atomic_t __nesc_atomic_start(void) @spontaneous()
> {
> __nesc_atomic_t result = ((READ_SR & SR_GIE) != 0);
> __nesc_disable_interrupt();
> asm volatile("" : : : "memory"); /* ensure atomic section effect visibility
> */
> return result;
> }
> void __nesc_atomic_end(__nesc_atomic_t reenable_interrupts) @spontaneous()
> {
> asm volatile("" : : : "memory"); /* ensure atomic section effect visibility
> */
> if( reenable_interrupts )
> __nesc_enable_interrupt();
> }
> #endif
> ______________________________________
>
> But I still have errors :
> _____________________________________
>
> In file included from /opt/tinyos-2.x/tos/system/SchedulerBasicP.nc:41,
> from /opt/tinyos-2.x/tos/system/TinySchedulerC.nc:40:
> /opt/tinyos-2.x/tos/platforms/isense/hardware.h: In function
> `__nesc_atomic_star
> t':
> /opt/tinyos-2.x/tos/platforms/isense/hardware.h:29: `READ_SR' undeclared
> (first
> use in this function)
> /opt/tinyos-2.x/tos/platforms/isense/hardware.h:29: (Each undeclared
> identifier
> is reported only once
> /opt/tinyos-2.x/tos/platforms/isense/hardware.h:29: for each function it
> appears
> in.)
> /opt/tinyos-2.x/tos/platforms/isense/hardware.h:29: `SR_GIE' undeclared
> (first u
> se in this function)
> /opt/tinyos-2.x/tos/platforms/isense/hardware.h:30: warning: implicit
> declaratio
> n of function `__nesc_disable_interrupt'
> make: *** [exe0] Error 1
>
> _____________________________________
>
> I don't know if something is missing in my definition
>
> Thank you for helping me.
> ----- Message d'origine ----
> De : Kevin Klues <[EMAIL PROTECTED]>
> À : mejda chouaieb <[EMAIL PROTECTED]>
> Envoyé le : Dimanche, 2 Décembre 2007, 20h26mn 34s
> Objet : Re: [Tinyos-help] Hardware Abstraction Architecture errors !!!
>
>
> DId you define these functions in the hardware.h for your chip? Take
> a look at the way they are implemented for the msp430 in
> tos/chips/msp430/msp430hardware.h and for the amega128 in
> tos/chips/atm128/atm128hardware.h
>
> Kevin
>
> On Dec 2, 2007 5:06 AM, mejda chouaieb <[EMAIL PROTECTED]> wrote:
> > Hello All,
> > I'm porting TinyOS to jennic, and when I compile the Null application for
> > my new platform I have these errors:
> > _____________________________________________________
> > [EMAIL PROTECTED] /cygdrive/c/jennic/cygwin/opt/tinyos-2.x/apps/Null
> > $ make isense
> > mkdir -p build/isense
> > compiling NullAppC to a isense binary
> > ncc -o build/isense/main.exe -Os -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d
> > -Wnesc-a
> > ll -target=isense -fnesc-cfile=build/isense/app.c -board=
> > -DIDENT_PROGRAM_NAME=\
> > "NullAppC\" -DIDENT_USER_ID=\"Mejda\" -DIDENT_HOSTNAME=\"MEJDA\"
> > -DIDENT_USER_HA
> > SH=0x9dac3aceL -DIDENT_UNIX_TIME=0x4752adbbL -DIDENT_UID_HASH=0x45ba5cbaL
> > -I. -D
> > OR1K -g -Os -Wall -fomit-frame-pointer -msibcall -mno-entri -mno-multi
> > -mno-setc
> > c -mno-cmov -mno-carry -mno-subb -mno-sext -mno-ror -mno-ff1 -mno-hard-div
> > -mhar
> > d-mul -mbranch-cost=3 -msimple-mul -mabi=1 -march=ba1 -mredzone-size=4
> > -DPCB_DEV
> > KIT2 -DEMBEDDED -DLEAN_N_MEAN -DSINGLE_CONTEXT -DCHIP_RELEASE_5131
> > -Iinclude -I/
> > opt/tinyos-2.x/tos/chips/JN5139R1/Platform/DK2/Include -I./Source
> > -I/opt/tinyos-
> > 2.x/tos/chips/JN5139R1/Common/Include
> > -I/opt/tinyos-2.x/tos/chips/JN5139R1/Chip/
> > JN513xR1/Include -I
> > -I/opt/tinyos-2.x/tos/chips/JN5139R1/Chip/Common/Include Nu
> > llAppC.nc -lm
> > /opt/tinyos-2.x/tos/system/SchedulerBasicP.nc: In function
> > 'SchedulerBasicP$Sche
> > duler$taskLoop':
> > /opt/tinyos-2.x/tos/system/SchedulerBasicP.nc:144: error: '__nesc_atomic_t'
> > unde
> > clared (first use in this function)
> > /opt/tinyos-2.x/tos/system/SchedulerBasicP.nc:144: error: (Each undeclared
> > ident
> > ifier is reported only once
> > /opt/tinyos-2.x/tos/system/SchedulerBasicP.nc:144: error: for each function
> > it a
> > ppears in.)
> > /opt/tinyos-2.x/tos/system/SchedulerBasicP.nc:144: error: expected ';'
> > before '_
> > _nesc_atomic'
> > /opt/tinyos-2.x/tos/system/SchedulerBasicP.nc:150: warning: implicit
> > declaration
> > of function '__nesc_atomic_end'
> > /opt/tinyos-2.x/tos/system/SchedulerBasicP.nc:150: error: '__nesc_atomic'
> > undecl
> > ared (first use in this function)
> > /opt/tinyos-2.x/tos/system/RealMainP.nc: In function 'main':
> > /opt/tinyos-2.x/tos/system/RealMainP.nc:53: error: '__nesc_atomic_t'
> > undeclared
> > (first use in this function)
> > /opt/tinyos-2.x/tos/system/RealMainP.nc:53: error: expected ';' before
> > '__nesc_a
> > tomic'
> > /opt/tinyos-2.x/tos/system/RealMainP.nc:77: error: '__nesc_atomic'
> > undeclared (f
> > irst use in this function)
> > /opt/tinyos-2.x/tos/system/RealMainP.nc:80: warning: implicit declaration
> > of fun
> > ction '__nesc_enable_interrupt'
> > make: *** [exe0] Error 1
> > [EMAIL PROTECTED] /cygdrive/c/jennic/cygwin/opt/tinyos-2.x/apps/Null
> > $
> >
> > _____________________________________________________
> >
> > I think that these errors are related to the Hardware Abstraction
> > Architecture.
> > But I don't know how to fix them, can someone help me please ?
> >
> >
> >
> > ____________________________________________________________________________________________
> > Yahoo! Mail innove : interface hyper pratique, messenger intégré, couleurs
> > - http://mail.yahoo.fr
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > [email protected]
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
>
>
>
> --
> ~Kevin
>
>
>
> ______________________________________________________________________________
> Yahoo! Mail : un mail innovant avec Messenger compatible Windows Live +
> stockage illimité. http://mail.yahoo.fr
>
--
~Kevin
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help