On Fri, Jul 13, 2012 at 9:40 PM, Ward, Ted <[email protected]> wrote:
> Is there a heap? I'm declaring the array outside of any functions' is this > still stack? > > there isn't a heap per-say. malloc is frowned on in embedded systems... wild pointers etc. If you declare an array outside of a function it comes out of main memory which is shared by the stack. It is not on the stack... If it is overflowing memory are there any customary TinyOS ways of addressing the issue that I'm missing? > > TinyOS is primarily a research vehicle so is missing some things that would be very useful in more industrial settings. I've started to fill in some of the blanks. I've started adding some stack check code as well as a Panic subsystem. But that code is in the TinyProd code and not TinyOS per se. So no you are not missing anything. > Sent from my ASUS Eee Pad > > Eric Decker <[email protected]> wrote: > > > > Take a look at the memory map to see if you'ver overflowed available > space. Most likely you are over running the stack. > > objdump is the native object dumper. You need to use the crosscompiler > tool which I beleive in your case would be avr-objdump. > > > For symbol table I use nm, in your case avr-nm > > On Fri, Jul 13, 2012 at 1:36 PM, Ted Ward <[email protected]> wrote: > >> Hello all. I'm trying to allocate a circular buffer. The element is a >> user defined type containing two timestamps. >> This all works great if my queue (array) size is 100 elements. But if I >> change it to 200 elements, the mote never boots. >> >> typedef struct WhiteSpaceStructure >> { >> uint32_t begin; >> uint32_t end; >> } WhiteSpace; >> >> WhiteSpace spaceQue[QUEUE_SIZE]; >> >> Any suggestions? I've considered using LogStorage (as in PacketParrot), >> but I'm if it is feasible to enque and deque several hundred objects per >> second. >> Is there is a compiler flag that will allow me to user larger arrays. >> >> FYI: I can't run tos-ramsize >> $ tos-ramsize -verbosity=2 micaz ./build/micaz/main.exe >> analyzing elf file './build/micaz/main.exe' for platform 'micaz' >> there are: >> 126 labels >> 7788 instructions >> tos-ramsize FAIL: cannot process raw store to SP at 2616 at >> /usr/local/bin/tos-ramsize line 1347. >> >> I also can't use objdump: >> $ objdump -d build/micaz/main.exe >> build/micaz/main.exe: file format elf32-little >> objdump: can't disassemble for architecture UNKNOWN! >> >> Ted Ward >> >> >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> > > > > -- > Eric B. Decker > Senior (over 50 :-) Researcher > > > -- Eric B. Decker Senior (over 50 :-) Researcher
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
