Pleas send messages to the help list.
In this case I know nothing about the Imote,
but I would be surprised if it had that much RAM or ROM.
I've been lead to believe that malloc() does work
on the motes but is neither robust nor efficient.

MS

cg chen wrote:
> hello Michael,
> Thanks first for your reply.
> The total C code in my project is nearly 3000 lines,which include some 
> dynamic memory allocation methods,such as the malloc() function.Is it 
> one of the cause of my problem?
> The RAM & ROM sizes at the last few lines of the compile are below:
> 233020 bytes in ROM
> 9828 bytes in RAM
> 9216 bytes in STACK
> 243100 bytes available in HEAP
> 
> By the way,my experiment mote is Imote2.
> 
> Are there any problems with my project as describe above?
> I am expect to your further reply.
> 
> 
> 2009/5/19 Michael Schippling <[email protected] <mailto:[email protected]>>
> 
>     How big is he C code? Could you be over-running your memory?
>     Look at the last few lines of the compile for RAM and ROM sizes.
> 
>     I would then try gutting the whole thing to stubs just to make
>     sure the linker is working the way you expect.
> 
>     MS
> 
>     cg chen wrote:
> 
>         Hi all,
>          I known that including C files in nesc works fine,but recently
>         when I include the C routes in my nesc project,some problem occurs.
>         My C files are 'transform.h' & 'transform.c'.The transform.h
>         file structure is much the same as:
> 
>         --------transform.h-----------------
>         #include <stdio.h>
>         #include <math.h>
>         .......
>         some macro definition
>         .......
>         some function declaration
>         .......
>         ----------------------------------------
> 
>         And the 'transform.c' file structure is :
> 
>         --------transform.c------------------
>         #include "transform.c"
>         .........
>         some macro definition
>         .........
>         some function definition
>         .........
> 
>         My nesC file structure is as below:
> 
>         module ...{}
>         implementation
>         {
>           #include "transform.h"
>           ......
>           some execution use the C function declared in transform.h and
>         defined in transform.c
>           ......
>         }
> 
>         When I compile the C file and nesc component together,there are
>         some warnings but no error,so that I can successfully compile
>         the whole project into a sensor mote.
>         But the mote did not work because the green indicator did not
>         flash,which I was used to test the code seeing if it can works
>         or not.It seems that it doen't execute the C function part which
>         was writen in the module.When I remove the C function part ,the
>         mote can work normally.
> 
>         The problem described above confused me so much that I can't get
>         access to the solutions.Why the code doesn't work since it can
>         compile correctly?Are there other matters need attention when
>         include C files in nesC?
> 
>         By the way,my Makefile is correct otherwise it may not pass
>         through compilation.
> 
>         Can someone help me?I'm looking forward to your reply
> 
>         best regards
> 
> 
>         
> ------------------------------------------------------------------------
> 
>         _______________________________________________
>         Tinyos-help mailing list
>         [email protected]
>         <mailto:[email protected]>
>         
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 
> 
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to