RAM usage not affected by heap/stack size

Hi,

working with nRF52840 with S140 v7.2.0, not sure about SDK version. VS Code + ARM GCC + LD Gold linker.

I changed stack and heap sizes via __HEAP_SIZE and __STACK_SIZE defines. Change is confirmed by .map file, but RAM usage(reported by linker flag --print-memory-usage) is not affected.

No matter what size I set to defines, RAM usage reported by linker stays the same.

How to fix this?

Parents Reply
  • arm-none-eabi-gcc --version
    arm-none-eabi-gcc (Arm GNU Toolchain 14.2.Rel1 (Build arm-14.52)) 14.2.1 20241119
    Copyright (C) 2024 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    GNU ld (Arm GNU Toolchain 14.2.Rel1 (Build arm-14.52)) 2.43.1.20241119
    Copyright (C) 2024 Free Software Foundation, Inc.
    This program is free software; you may redistribute it under the terms of
    the GNU General Public License version 3 or (at your option) a later version.
    This program has absolutely no warranty.

    I'm using gold. Tried with BFD, same result. 
    Linker command is

    $(DIR_BUILD)/$(BUILD_NAME).elf: $(OBJECTS) $(MAKEFILE)
        $(TC_CC) $(OBJECTS) $(LINKER_FLAGS) -o $@

    Linked with gcc, not ld.
Children
Related