Forum related to ERIKA Enterprise and RT-Druid version 2
	Moderator:  paolo.gai 
			
		
		
			
				
																			
								markintosh  							 
									
						
		
						
						
		 
		
						
						
													
							
						
									
						Post 
					 
								by markintosh   »  Thu Nov 06, 2008 4:04 pm 
			
			
			
			
			Hi guys,
I\'d like to use the dinamic memory assignment function (malloc, realloc) on the dsPIC33FJ256MC710 and when I use them I get a compile error: 
Code: Select all 
A heap is required, but has not been specified
I think I\'ve to redefine the .oil file adding the heap properties but I\'nt know how. Can someone give me some help? 
Cheers, MARCO
 
			
			
									
									
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								chris  							 
									
						
		
						
						
		 
		
						
						
													
							
						
									
						Post 
					 
								by chris   »  Thu Nov 06, 2008 6:51 pm 
			
			
			
			
			It\'s easy.
As you said you have to specify the heap using the C30 option 
--heap=  and this can me done in the .oil adding the 
LDFLAGS  attribute as described below.
Code: Select all 
CPU mySystem {
	OS myOs {
		EE_OPT = \"DEBUG\";		
		CFLAGS = \"\";
                LDFLAGS = \"--heap=1024\"
                
	};
        
};
This should help you.
Regards,
Chris.
 
			
			
									
									
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								markintosh  							 
									
						
		
						
						
		 
		
						
						
													
							
						
									
						Post 
					 
								by markintosh   »  Fri Nov 07, 2008 11:55 am 
			
			
			
			
			Thank you for the help!It works fine. 
Cheers MARCO