Skip to content

[NCS36510] Reduce default heap size allocated by IAR to 1/4 of RAM #4187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2017
Merged

[NCS36510] Reduce default heap size allocated by IAR to 1/4 of RAM #4187

merged 1 commit into from
Apr 24, 2017

Conversation

maclobdell
Copy link
Contributor

Description

The IAR linker file allocates the heap size by default to 0x4000, which for this target is causing the mbed-os-example-mesh-minimal application not to be able to fit into the RAM. It has been changed to 0x3000 (12K, which is 1/4 of the total 48K RAM). This change both passes all mbed OS tests and allows the mesh minimal example to compile with IAR and run.

helps fix ARMmbed/mbed-os-example-mesh-minimal#63

cc: @pradeep-gr @radhika-raghavendran @danclement @jacobjohnson-ON
please review and confirm this looks good to you.

Status

READY

Migrations

NO

Related PRs

None

branch PR
n/a

Todos

none

Deploy notes

none

Steps to test or reproduce

n/a

…RAM.

Allows mesh minimal example to compile with IAR.
@danclement
Copy link
Contributor

@maclobdell no issues from me. The networking team will find any possible issues as they add the device to large networks as a router (routing tables = more RAM I'm assuming)

@radhika-raghavendran
Copy link
Contributor

@maclobdell
This change is ok with me.
I remember this being changed to be a larger size in order to pass the stack and heap tests at the beginning mbed-os porting for our platform, now we can change it to a smaller size.
However, I would like to know if there is a recommended heap size for mbed-os? I can see that the heap size is configured to 0x400(1K) for GCC_ARM, and there is not fixed size for ARMCC compiler. Please let us know if we need to change the heap sizes for other compilers too.

Adding @danish-iftikhar

@bulislaw
Copy link
Member

Heap should be set dynamically to 'remaining memory' for GCC and ARM, as far as i know it's impossible to do that for IAR. So it's more or less per platform exercise to maintain balance and don't waste too much memory. @0xc0170

@bulislaw
Copy link
Member

Actually a lot of platforms hard code it to 1/4 of RAM not only for IAR.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 18, 2017

/morph test

1 similar comment
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 20, 2017

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 48

All builds and test passed!

@theotherjimmy theotherjimmy merged commit 39061b0 into ARMmbed:master Apr 24, 2017
exmachina-auto-deployer pushed a commit to exmachina-dev/mbed-os that referenced this pull request May 16, 2017
…lwip_broadcast

Release mbed OS 5.4.5 and mbed lib v142

Ports for Upcoming Targets

Fixes and Changes

4059: [Silicon Labs] Rename targets ARMmbed#4059
4115: Support for Qt Creator Generic project export and associated Makefile ARMmbed#4115
3915: Feature vscode ARMmbed#3915
4205: tests: race test - add not supported for single threaded env ARMmbed#4205
4187: [NCS36510] Reduce default heap size allocated by IAR to 1/4 of RAM ARMmbed#4187
4145: test - add nanostack to examples.json file ARMmbed#4145
4093: Update.py: New feature - update a branch instead of a fork, plus general improvements. ARMmbed#4093
4225: fixed missing device_name for xDot and removed progen ARMmbed#4225
4243: Config: config header file should contain new line ARMmbed#4243
4251: Fix C++11 build error w/ u-blox EVK-ODIN-W2 ARMmbed#4251
4236: STM32 Fixed warning related to __packed redefinition ARMmbed#4236
4224: Add `mbed new .` output to export ARMmbed#4224
4190: LPC4088: Enable LWIP feature ARMmbed#4190
4136: Error when bootloader is specified but does not exist ARMmbed#4136
3881: Remove debug links to printf/exit in NDEBUG builds ARMmbed#3881
4260: Inherit Xadow M0 target from LPC11U35_501 ARMmbed#4260
4249: Add consistent button names across targets ARMmbed#4249
4254: Removed unused variable in TARGET_NXP/lpc17_emac.c ARMmbed#4254
aisair pushed a commit to aisair/mbed that referenced this pull request Apr 30, 2024
Ports for Upcoming Targets


Fixes and Changes

4059: [Silicon Labs] Rename targets ARMmbed/mbed-os#4059
4187: [NCS36510] Reduce default heap size allocated by IAR to 1/4 of RAM ARMmbed/mbed-os#4187
4225: fixed missing device_name for xDot and removed progen ARMmbed/mbed-os#4225
4251: Fix C++11 build error w/ u-blox EVK-ODIN-W2 ARMmbed/mbed-os#4251
4236: STM32 Fixed warning related to __packed redefinition ARMmbed/mbed-os#4236
4190: LPC4088: Enable LWIP feature ARMmbed/mbed-os#4190
4260: Inherit Xadow M0 target from LPC11U35_501 ARMmbed/mbed-os#4260
4249: Add consistent button names across targets ARMmbed/mbed-os#4249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thread sleepy end device configuration not able to fit in 320K flash, 48K ram
7 participants