-
Notifications
You must be signed in to change notification settings - Fork 3k
Non Rtos build fails for ARM compiler #9523
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
Comments
Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-805 |
@adbridge we need this to next patch release, please. |
@mprse Can you please review? |
I'll try to investigate this one and provide the fix. |
I was able to reproduce the failure and tried to adapt heap parameters to be consistent with rtos builds: mbed-os/rtos/TARGET_CORTEX/TOOLCHAIN_ARM_STD/mbed_boot_arm_std.c Lines 30 to 42 in d1b367f
Current version:
It looks like heap parameters should be valid, but I'm still getting hard fault:
@deepikabhavnani Do you maybe have some idea? |
@mprse - Implementation of __rt_lib_init might be needed as well. mbed-os/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/TOOLCHAIN_ARM_STD/sys.cpp Line 84 in d2e9136
More Info: With addition of ARM_LIB_STACK in linker file we are changing the memory model for RTOS-less builds to 2-region memory model. This needs approval from @sg- |
@ARMmbed/mbed-os-maintainers - Please note the versions when adding the fix. Currently it will fail for all targets on master, since 8039 and 9092 are merged on master. #8039 affects K64F and was part of 5.11 release, so local fix for K64F can be part of next patch release. |
@bulislaw ^^^ |
@deepikabhavnani Thanks for link and experimentation of the problem. Fix can be found here: #9571 I checked that blinky example(rtos-less build) works with this patch. I also removed redundant files for targets which have already used 2-region memory model (as it is now common). The only difference is that these targets defines also ARM_LIB_HEAP region. I added exception for these targets. Please review if such solution is acceptable. |
Uh oh!
There was an error while loading. Please reload this page.
Description
Mbed OS example when built without rtos, fails in init for ARM compiler.
++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0x51DB
Error Value: 0x12E6
For more info, visit: https://armmbed.github.io/mbedos-error/?error=0x80FF013D
-- MbedOS Error Info -
++ MbedOS Fault Handler ++
FaultType: HardFault
Context:
R0 : 000073EC
R1 : 00000000
R2 : 000083EC
R3 : 20000104
R4 : 000083EC
R5 : 000073EC
R6 : 000073FC
R7 : 200005DC
R8 : 00000000
R9 : 00000000
R10 : 000071AC
R11 : 000071AC
R12 : 00000000
SP : 2002FFD0
LR : 000012CF
PC : 000012E6
xPSR : 41000000
PSP : 00000000
MSP : 2002FF68
CPUID: 410FC241
HFSR : 40000000
MMFSR: 00000000
BFSR : 00000086
UFSR : 00000000
DFSR : 00000008
AFSR : 00000000
BFAR : 000073EC
Mode : Thread
Priv : Privileged
Stack: MSP
Crash location = __Heap_Initialize
Caller location = _init_alloc
Steps to compile non-rtos version for blinky:
/test/
mbed-os/rtos/*
mbed-os/events/*
mbed-os/features/*
mbed-os/components/*
Linker file was updated to have stack config option and later use it to have unified stack size across all targets.
Solution:
Correct the implementation of
_mbed_user_setup_stackheap
which assumes single stack and heap region of IARM1 is present in linker file.mbed-os/platform/mbed_retarget.cpp
Line 909 in 80c6f5f
We have alternate implementations for few targets, considering stack and heap as separate regions for Mbed 2 as well.
mbed-os/targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/TOOLCHAIN_ARM_STD/sys.cpp
Line 47 in d2e9136
Impact:
#8039 - Affects K64F only and is part of 5.11 release
#9092 - All targets and is for 5,12
Issue request type
The text was updated successfully, but these errors were encountered: