-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Increase HEAP size for UBLOX_EVK_ODIN_W2 and NUCLEO_F429ZI #3871
Conversation
cc @andreaslarssonublox @bcostm @adustm @LMESTM @jeromecoutant - please review |
Hello, |
@mazimkhan What do you think? |
@adustm Do we have a use case where it can cause issue. Actually mbed-os-example-tls takes between 48K to 64K. Problem is IAR has a fixed heap. It is easy to find a specific value for an app. But mbed-os is a lib and future tests/examples (relevant to this board) may again break 64K barrier. |
Hello, |
@JanneKiiskila I agree. Should this be described in a document like the below since it's the same for all targets or are there better places? |
@andreaslarssonublox - yes, it should be a in a common document, this is not UBLOX specific issue - it's common. All IoT boards will run out of memory rather easily, so we should give common guidance. |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
After this change, our CI jobs have started to fail builds on IAR to platforms NUCLEO_F429ZI and Ublox EVK ODIN W2. See: https://jenkins-internal.mbed.com/job/ARMmbed/job/mbed-os-example-mesh-minimal/job/master/ However, on my local machine all seems to work. What IAR version are we supposed to use? I have V7.70.2 |
7.8
why |
I think this failure is only on applications using enough memory. |
What we can do is just either revert it back to the value, or decrease it by some margin that would enable our apps to work and any further changes are disallowed. After this, any failure in apps is a known-issue that is limitation of IAR. Playing ping-pong with HEAP size value is not a solution, we cant find a value that serves all apps. @mazimkhan will send a patch where we can discuss this further
they could be in CI? |
However, for mbed-os to support different platforms and apps there should be a strategy on use of global/static variable and heap to avoid fiddling with heap sizes. Large variations between data and heap size requirements across apps may cause this type situation. |
Targets NUCLEO_F429ZI and UBLOX_EVK_ODIN_W2 have 192K RAM. Heap size in PR ARMmbed#3871 was increased from 48K to 96K as tls-client example failed with 48K heap. But this resulted in compilation failures in mbed-client that requires 71K for global/static data. Hence this PR reduces heap to 64K that minimum required by tls-client to work. This also meets mbed-client data segment requirements.
Targets NUCLEO_F429ZI and UBLOX_EVK_ODIN_W2 have 192K RAM. Heap size in PR #3871 was increased from 48K to 96K as tls-client example failed with 48K heap. But this resulted in compilation failures in mbed-client that requires 71K for global/static data. Hence this PR reduces heap to 64K that minimum required by tls-client to work. This also meets mbed-client data segment requirements.
Targets NUCLEO_F429ZI and UBLOX_EVK_ODIN_W2 have 192K RAM. Heap size in PR #3871 was increased from 48K to 96K as tls-client example failed with 48K heap. But this resulted in compilation failures in mbed-client that requires 71K for global/static data. Hence this PR reduces heap to 64K that minimum required by tls-client to work. This also meets mbed-client data segment requirements.
Hi Team, I am getting same issue. Can you help me on this. This is my Logs ..\Middlewares\Third_Party\mbedTLS\library\ssl_tls.c:3161: handshake message: msglen = 5021, type = 11, hslen = 5021 Last error was: -10368 - X509 - Allocation of memory failed ..\Middlewares\Third_Party\mbedTLS\library\ssl_tls.c:7542: => free |
Notes:
Description
mbed-os-example-tls/tls-client example fails on UBLOX_EVK_ODIN_W2 and NUCLEO_F429ZI for IAR due to out of memory issue.
Both the boards have 191K RAM. But heap size is set to 0xC000 (48K). This is fine with GCC_ARM and ARMCC compilers as heap can grow. But IAR has fixed heap. Since tls-client example runs fine on K64F x IAR. The heap size should atleast be 0x10000 (64K). However, since these boards have good size RAM this PR sets fixed heap size to ~1/2 of RAM that is 0x18000 (96K).
Status
READY/IN DEVELOPMENT/HOLD
Migrations
If this PR changes any APIs or behaviors, give a short description of what API users should do when this PR is merged.
NO
Related PRs
List related PRs against other branches:
Todos
Deploy notes
After merging this PR mbed-os.lib(s) in mbed-os-example-tls should be updated.
Steps to test or reproduce
To reproduce run example mbed-os-example-tls/tls-client it should fail on UBLOX_EVK_ODIN_W2 x IAR and NUCLEO_F429ZI x IAR
To test use this PR version of mbed-os and the example should pass.