How to set malloc heap size on ModusToolbox 2.0.0?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KiOk_2981821
Level 1
Level 1
First question asked First reply posted

How to set malloc heap size on ModusToolbox 2.0.0?

Sometime I would like to use small heap or large one.

I'm using ModusToolbox Version:  2.0.0 Build ID: 1703 and CY8CPROTO-062-4343W PSoC 6.

0 Likes
1 Solution
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi KiOk_2981821​,

In the Project Explorer in ModusToolbox 2.0, go to libs > TARGET_CY8CPROTO-062-4343W > startup > TOOLCHAIN_GCC_ARM > startup_psoc6_02_cm4.S

Please find the following code -

#ifdef __HEAP_SIZE

    .equ    Heap_Size, __HEAP_SIZE

#else

    .equ    Heap_Size, 0x00000400

You can change the heap size here.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
1 Reply
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi KiOk_2981821​,

In the Project Explorer in ModusToolbox 2.0, go to libs > TARGET_CY8CPROTO-062-4343W > startup > TOOLCHAIN_GCC_ARM > startup_psoc6_02_cm4.S

Please find the following code -

#ifdef __HEAP_SIZE

    .equ    Heap_Size, __HEAP_SIZE

#else

    .equ    Heap_Size, 0x00000400

You can change the heap size here.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes