@@ -927,7 +927,6 @@ __asm(".global __use_no_semihosting\n\t");
927
927
// Through weak-reference, we can check if ARM_LIB_HEAP is defined at run-time.
928
928
// If ARM_LIB_HEAP is defined, we can fix heap allocation.
929
929
extern MBED_WEAK uint32_t Image$$ARM_LIB_HEAP$$ZI$$Base[];
930
- extern MBED_WEAK uint32_t Image$$ARM_LIB_HEAP$$ZI$$Length[];
931
930
extern MBED_WEAK uint32_t Image$$ARM_LIB_HEAP$$ZI$$Limit[];
932
931
933
932
// Heap here is considered starting after ZI ends to Stack start
@@ -942,7 +941,7 @@ extern "C" MBED_WEAK __value_in_regs struct __initial_stackheap _mbed_user_setup
942
941
struct __initial_stackheap r;
943
942
944
943
// Fix heap if ARM_LIB_HEAP is defined
945
- if (Image$$ARM_LIB_HEAP$$ZI$$Length ) {
944
+ if (Image$$ARM_LIB_HEAP$$ZI$$Base != Image$$ARM_LIB_HEAP$$ZI$$Limit ) {
946
945
heap_base = (uint32_t ) Image$$ARM_LIB_HEAP$$ZI$$Base;
947
946
heap_limit = (uint32_t ) Image$$ARM_LIB_HEAP$$ZI$$Limit;
948
947
}
@@ -965,7 +964,7 @@ extern "C" __value_in_regs struct __argc_argv $Sub$$__rt_lib_init(unsigned heapb
965
964
uint32_t heap_limit = (uint32_t )Image$$ARM_LIB_STACK$$ZI$$Base;
966
965
967
966
// Fix heap if ARM_LIB_HEAP is defined
968
- if (Image$$ARM_LIB_HEAP$$ZI$$Length ) {
967
+ if (Image$$ARM_LIB_HEAP$$ZI$$Base != Image$$ARM_LIB_HEAP$$ZI$$Limit ) {
969
968
heap_base = (uint32_t ) Image$$ARM_LIB_HEAP$$ZI$$Base;
970
969
heap_limit = (uint32_t ) Image$$ARM_LIB_HEAP$$ZI$$Limit;
971
970
}
0 commit comments