Convert GCC Linker file to IAR config file

Running the STM32F4 demo for FreeRTOS+TCP on a STM3240G Eval board. The GCC project comes with a linker file that defines a few things including __bss_end__ and _estack which are then used in the prvInitialiseHeap function in main. Is there a way to declare these in the IAR linker config file (.icf) to allow this project to be build with IAR?

Convert GCC Linker file to IAR config file

Newly started freeRTOS. I don’t know how to make it work.but I wanna learn freeRTOS so please guide me. how you are building and running the sample apps on STM3240G Eval board. so please let me know hoe to build and run.

Convert GCC Linker file to IAR config file

https://sourceforge.net/p/freertos/discussion/382005/thread/7399998f/?limit=25#0dee/1e98

Convert GCC Linker file to IAR config file

These are linker variables, you would have to check the IAR manual to see if IAR provides an equivalent – but probably the simplest method would be to #define them to constants within the C code, rather than in the linker script. The important thing is to ensure that the memory areas used by the heap are not used to store any variables – so you would have to check the linker script, and update the memory it defines if needed, to make sure the memory allocated to the heap and the memory allocated by the linker do not overlap.

Convert GCC Linker file to IAR config file

Thank you very much! I can definitely see how to do that for _estack as that is defined as an address. However, _bss_end__ is less clear, what I can see in the linker file ~~~ /* This is used by the startup in order to initialize the .bss secion / _sbss = .; / define a global symbol at bss start / bss_start = _sbss; *(.bss) *(.bss) *(COMMON)
. = ALIGN(4);
_ebss = .;         /* define a global symbol at bss end */
__bss_end__ = _ebss;
~~~ How would I find the address to set this to?

Convert GCC Linker file to IAR config file

I’ve added these lines at the strat of my main file and now the code compiles ~~~

pragma section=”.bss”

uint32t *bsssection_end = __section_end(“.bss”);

pragma section=”CSTACK”

uint32t *stackblock_end = __section_end(“CSTACK”); ~~~