How do I use malloc in HCS(08) CW?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How do I use malloc in HCS(08) CW?

ソリューションへジャンプ
1,935件の閲覧回数
PhilG
Contributor I
Hi,
I have set up a new project in CW for HCS(08). When I use malloc(60) it appears to want allocate all the RAM to the project. How do I manage the heap allocation in the linker etc. This does not appear to be set up in the project wizard?
Regards
Phil Green
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,021件の閲覧回数
CrasyCat
Specialist III
Hello
 
The heap size is per default 2000 bytes.
If you want to use a smaller heap:
 - Open project hc08_lib.mcp from {Install}\lib\hc08c directory
 - Edit file libdefs.h (from {Install}lib\hc08c\include directory
 - Change the LIBDEF_HEAPSIZE to something smaller
 - save the changes
  - Rebuild the libraries (or at least the one you need.
 
This should do it :smileywink:.
 
CrasyCat
 

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,022件の閲覧回数
CrasyCat
Specialist III
Hello
 
The heap size is per default 2000 bytes.
If you want to use a smaller heap:
 - Open project hc08_lib.mcp from {Install}\lib\hc08c directory
 - Edit file libdefs.h (from {Install}lib\hc08c\include directory
 - Change the LIBDEF_HEAPSIZE to something smaller
 - save the changes
  - Rebuild the libraries (or at least the one you need.
 
This should do it :smileywink:.
 
CrasyCat
 
0 件の賞賛
返信