Home     Company     Products     Services     Community     Download     Store
    [Home arrow Community arrow Forum ]
Community
Community
Login Form





Lost Password?
No account yet? Register
Evidence Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Malloc and similar function usage (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Malloc and similar function usage
#281
markintosh (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Malloc and similar function usage 2 Months ago Karma: 0  
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: :

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
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#284
chris (Moderator)
Moderator
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
Re:Malloc and similar function usage 2 Months ago Karma: 0  
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: :

CPU mySystem {     OS myOs {         EE_OPT = "DEBUG";                 CFLAGS = "";                 LDFLAGS = "--heap=1024"                      };          };



This should help you.
Regards,
Chris.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#285
markintosh (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Malloc and similar function usage 1 Month, 4 Weeks ago Karma: 0  
Thank you for the help!It works fine.
Cheers MARCO
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
Evidence S.r.l. - PIVA: 01638690501
Via Carducci 64/A - Ghezzano - Pisa - Italy
Privacy Policy