2015-09-25 11:02 PM
Hi,
After struggling trying to make a Nucleo-F334R8 working with the latest HAL, I reached to the conclusion that the linker script shipped with the HAL is wrong. The memory sections are defined as follow:/* Highest address of the user mode stack */
_estack = 0x20003FFF; /* end of RAM */ /* Generate a link error if heap and stack don't fit into RAM */ _Min_Heap_Size = 0x200; /* required amount of heap */ _Min_Stack_Size = 0x400; /* required amount of stack */ /* Specify the memory areas */ MEMORY { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 4K } But this script lead to a BusFault error, as STM32F334R8 has 12KB SRAM + 4KB CCM. So, changing the linker script in the following way solves the problem:/* Entry Point */
ENTRY(Reset_Handler) /* Highest address of the user mode stack */ _estack = 0x20003000; /* end of RAM */ /* Generate a link error if heap and stack don't fit into RAM */ _Min_Heap_Size = 0x200; /* required amount of heap */ _Min_Stack_Size = 0x400; /* required amount of stack */ /* Specify the memory areas */ MEMORY { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 12K CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 4K } If I'm wrong, please explain me why the second link script works :) #stm32f334-nucleo-bus-fault2015-09-28 03:05 AM
Hi cnoviello,
I will check this problem with our development team & come back to you.Sorry for the inconvenience that it may bring.-Syrine-2015-09-28 07:30 AM
Hi cnoviello,
You are right. Thank you for bringing this issue to our attention.It is noted and will be fixed in coming release of the STM32cubeF3 package.-Syrine-