# Note: extracts of a FreeRTOS project memory map for a NUCLEO-F411RE

#******************************************************************************
#l22
Discarded input sections

#l85-86
 .text.vApplicationStackOverflowHook
                0x0000000000000000       0x28 ./Core/Src/freertos.o

#l141-144
 .bss.defaultTaskHandle
                0x0000000000000000        0x4 ./Core/Src/main.o
 .text.StartDefaultTask
                0x0000000000000000       0x10 ./Core/Src/main.o
                
#l671-674
 .text.ENSI_UART_GetChar
                0x0000000000000000       0x64 ./Drivers/ENSI/Src/ensi_uart.o
 .text.ENSI_UART_GetString
                0x0000000000000000       0x3c ./Drivers/ENSI/Src/ensi_uart.o

#l1654-1655
 .text.HAL_GPIO_TogglePin
                0x0000000000000000       0x34 ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o

#l2829-2830
 .text.xTaskGetTickCount
                0x0000000000000000       0x20 ./Middlewares/Third_Party/FreeRTOS/Source/tasks.o
                
#******************************************************************************

#l3167-3172
Memory Configuration

Name             Origin             Length             Attributes
RAM              0x0000000020000000 0x0000000000020000 xrw
FLASH            0x0000000008000000 0x0000000000080000 xr
*default*        0x0000000000000000 0xffffffffffffffff


#******************************************************************************

#l3174
Linker script and memory map

#l3176-3210 (des "LOAD" en pagaille, quelques exemples)
LOAD /opt/st/stm32cubeide_1.11.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.linux64_1.0.100.202210260954/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v7e-m+fp/hard/crti.o
LOAD /opt/st/stm32cubeide_1.11.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.linux64_1.0.100.202210260954/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v7e-m+fp/hard/crtbegin.o
LOAD /opt/st/stm32cubeide_1.11.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.linux64_1.0.100.202210260954/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o
LOAD ./Core/Src/freertos.o
LOAD ./Core/Src/main.o
_[...]_
LOAD ./Drivers/ENSI/Src/ensi_uart.o
LOAD ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o
_[...]_
LOAD ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o
_[...]_
LOAD ./Middlewares/Third_Party/FreeRTOS/Source/tasks.o
LOAD ./Middlewares/Third_Party/FreeRTOS/Source/timers.o
LOAD ./Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o
LOAD ./Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.o


#******************************************************************************
#l3231-3233
                0x0000000020020000                _estack = (ORIGIN (RAM) + LENGTH (RAM))
                0x0000000000000200                _Min_Heap_Size = 0x200
                0x0000000000000400                _Min_Stack_Size = 0x400

#l3235
.isr_vector     0x0000000008000000      0x198

#l3242
.text           0x00000000080001a0     0x2d24

#l3253-3266
 *(.text*)
 .text.app_init
                0x00000000080004e4       0x60 ./Core/Src/freertos.o
                0x00000000080004e4                app_init
 .text.growth   0x0000000008000544       0x12 ./Core/Src/freertos.o
 .text.task1    0x0000000008000556       0x14 ./Core/Src/freertos.o
 .text.task2    0x000000000800056a       0x10 ./Core/Src/freertos.o
 .text.task3    0x000000000800057a       0x10 ./Core/Src/freertos.o
 *fill*         0x000000000800058a        0x2 
 .text.vApplicationMallocFailedHook
                0x000000000800058c       0x10 ./Core/Src/freertos.o
                0x000000000800058c                vApplicationMallocFailedHook
 .text.main     0x000000000800059c       0x28 ./Core/Src/main.o
                0x000000000800059c                main
 
#l3367-3378
 .text.ENSI_UART_Init
                0x00000000080008c0      0x388 ./Drivers/ENSI/Src/ensi_uart.o
                0x00000000080008c0                ENSI_UART_Init
 .text.ENSI_UART_PutChar
                0x0000000008000c48       0x30 ./Drivers/ENSI/Src/ensi_uart.o
                0x0000000008000c48                ENSI_UART_PutChar
 .text.ENSI_UART_PutString
                0x0000000008000c78       0x2a ./Drivers/ENSI/Src/ensi_uart.o
                0x0000000008000c78                ENSI_UART_PutString
 .text.USART2_IRQHandler
                0x0000000008000ca2        0xc ./Drivers/ENSI/Src/ensi_uart.o
                0x0000000008000ca2                USART2_IRQHandler
                
#l3468-3473
 .text.vTaskDelay
                0x000000000800203c       0x68 ./Middlewares/Third_Party/FreeRTOS/Source/tasks.o
                0x000000000800203c                vTaskDelay
 .text.vTaskStartScheduler
                0x00000000080020a4       0x90 ./Middlewares/Third_Party/FreeRTOS/Source/tasks.o
                0x00000000080020a4                vTaskStartScheduler
                                
#l3575-3577 (note : la taille de 0x13 dans main.o correspond au "\r\nEt z'est partiii" envoyé par à UART)
 *(.rodata)
 .rodata        0x0000000008002ec4       0x74 ./Core/Src/freertos.o
 .rodata        0x0000000008002f38       0x13 ./Core/Src/main.o
 
#l3632
.data           0x0000000020000000       0x10 load address 0x0000000008002f7c

#l3658
.bss            0x0000000020000010     0x3e54 load address 0x0000000008002f8c

#l3664-3665 (note : la taille de 0x10c = 268o = 256*1o (buffer[256]) + 4o (writeIndex) + 4o (readIndex) + 4o (numberOfElements))
 .bss.uartRxCircularBuffer
                0x000000002000002c      0x10c ./Drivers/ENSI/Src/ensi_uart.o

#l3710-3712 (note : la taille de ucHeap 0x3c00 = 15360 = la valeur de configTOTAL_HEAP_SIZE
 .bss.ucHeap    0x0000000020000244     0x3c00 ./Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.o
 .bss.xStart    0x0000000020003e44        0x8 ./Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.o
 .bss.pxEnd     0x0000000020003e4c        0x4 ./Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.o
