This very question was recently answered extensively on the list, don't have a link right now.
I'll answer your questions > 1. Why the bytes size is so big in ROM memory (Flash)? I know that in ROM > you will have to load the boot loader, but what else is going to be loaded > in ROM ? The program code itself is loaded into flash. This is all of your executable code, and data constants or initializers defined in your code. The RAM is only useful for the stack and for your variables. The program must work after a full power down, so RAM is no good for that. > 2. Other doubt: if you tried to compile an application that requires more > bytes that your memory size, maybe when you compile, it will give you some > errors (overlap sections). The compiler will tell you that you've run out of memory and fail on the compile. This has been reported recently on the list, I believe. > 2.1.How can the compiler control the memory size (every micro has a > different memory size) and know it? > Where is this information? I have tried to look for it, but only I have > find a component related to InternalFlash but anything else. The compiler just keeps track of how much memory it is using, it doesn't control it. It's just doing a translation, and then counts bytes. The compiler tells you the information in the lines that you quoted. > 2.2.And how can I know the mapping that the compiler is doing for both > memories? what has been loaded in every segment of the memory? Can I control > this mapping? You can't really control this except if you make something a constant, it's going to be in flash. If there is a variable, it will be in RAM. You can store data on the external flash, that will reduce your flash usage on the chip. It will be more work. Eric On Thu, May 29, 2008 at 12:00 PM, Gracinda García Lago <[EMAIL PROTECTED]> wrote: > Hi! > I have some doubts about RAM and flash memory size and how the compiler > "control" them, I have tried to find the answer in posted messages but > without any success. > > I am using a msp4030 micro, flash memory size is 48KB and RAM memory size is > 10240B. > When you compile an application for instance Oscilloscope, using "make > tmote" it gives you back information about bytes in RAM and bytes in ROM. > 10614 bytes in ROM > 380 bytes in RAM > _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
