Sorry, I forgot to say that for use the SDRAM on Imote2 you have to use this 
(like a global variable):

int *variable __attribute__((section(".sdram")));

Thanks

David
From: [email protected]
To: [email protected]
Date: Wed, 11 Nov 2009 17:59:52 +0000
Subject: [Tinyos-help] FW:  Question about SDRAM and malloc








HiThanks. I found that on Imote2 malloc only allocates memory from SRAM. I need 
some help with something:I
have a function where I call malloc some times and I create objets I
need. I want to create them into SDRAM and not into SRAM. This function
is like this (it is an example):

#define SIZE 3333

//GLOBAL VARIABLE
int * variable;

...
//I call the function
object_1 = App.call function(variable);
object_2 = App.call function(variable);
object_3 = App.call
 function(variable);

...

//and the function is this:  
command int *App.function(int *n){
    n = (int *) malloc(SIZE*sizeof(int));
    return n;
}

}//end of implementation


Please, I need help!Thanks a lot David

Date: Tue, 10 Nov 2009 16:28:42 -0600
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [Tinyos-help] Question about SDRAM and malloc






  


I'm not intimately familiar with the pxa27x  architecture, but in
general, when you call malloc(),  you have no control over where the
memory is allocated from.  The memory should be automatically allocated
in either the local SRAM or SDRAM (depending on how the memory
controller operates).  It depends on how the SRAM(local) memory is set
up (if it attempts to cache the external  SDRAM or not, etc). 
Unfortunately that is the best information I can give you as I don't
have the hardware, and all the information I have provided you I found
through searching.  If you have further questions about the imote2,
there does exist a mailing list: 



http://enl.usc.edu/pipermail/t2-imote2/



where you can ask your questions.  Probably the person you want to
contact about tinyos specific to imote2 is Robbie Adler (his contact
information should be available in the list archives).  It seems like
he has been making significant contributions to the imote2 in Tinyos
2.x.



-Paul





David Rodenas Herráiz wrote:

  

Hi

  

Sorry, I did not make my question well.

  

I'm using SDRAM memory on Imote2 and I want to ask something:

  

If we define a variable like this

  

unsigned int *variable __attribute__((section(".sdram")));

  

and if I make the following, 

  

#define SIZE 33023 

  

 variable = (unsigned int*)malloc(SIZE);

 

Where is that memory stored? in the SRAM or SDRAM?

  

Thanks

  

David 

  ¡Windows Phone ya está aquí! Mucho más que un teléfono. ¡Hazte
con uno! 

  Hasta las ovejas de Sietes son expertas en Windows 7.  ¡Conócelas!
  
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
                                          
¡Nuevo Canal Mujer! Moda, belleza, sexo, dietas, embarazo. más fácil y a tu 
alcance. Si quieres estar a la última, no puedes perdértelo.                    
                      
¡Windows Phone ya está aquí! Mucho más que un teléfono. ¡Hazte con uno!         
                                  
_________________________________________________________________
Sólo hay un loro experto en Windows 7 en todo el mundo. Y vive en Sietes 
¡Cónocelo!
http://www.sietesunpueblodeexpertos.com/
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to