Skip to main content
carmine
Associate III
September 26, 2015
Question

Suspected error in STM32F334X8_FLASH.ld in STM32CubeF3 1.3

  • September 26, 2015
  • 2 replies
  • 784 views
Posted on September 26, 2015 at 08:02

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-fault

    This topic has been closed for replies.

    2 replies

    Nesrine M_O
    Associate
    September 28, 2015
    Posted on September 28, 2015 at 12:05

    Hi cnoviello,

    I will check this problem with our development team & come back to you.Sorry for the inconvenience that it may bring.

    -Syrine-

    Nesrine M_O
    Associate
    September 28, 2015
    Posted on September 28, 2015 at 16:30

    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-