AnsweredAssumed Answered

STM32 ST-Link Utility crashes if CCM code segment used

Question asked by southeren.craig on Feb 13, 2013
Latest reply on Feb 13, 2013 by Clive One
I'm adding a code segment to my gcc linker script to allow the placement of objects in the Close Coupled Memory (CCM) memory block.

The additions to the linker script are as follows:


MEMORY
{
    boot_flash : org = 0x08000000, len = 1024k
    flash  : org = 0x08000000, len = 256k   // restrict to 256k
    ram    : org = 0x20000000, len = 112k
    ethram : org = 0x2001C000, len = 16k
    ccm    : org = 0x10000000, len = 64k
}

...deleted

.ccm :
   {
       PROVIDE(_ccm_start = .);
       . = ALIGN(4);
       *(.ccm)
       . = ALIGN(4);
       *(.ccm.*)
       . = ALIGN(4);
 
       _ccmend = .;
   } > ccm

This compiles fine, and the .map file shows that any objects with the following attribute are located correctly.

     __attribute__ ((section (".ccm")))

However, the resultant .bin file cannot be loaded onto the board using the Windows STM32 ST-Link Utility because the load operation does finish. The load progress bar never shifts from zero, and if I leave the program running for several hours, it will consume more and more memory until the system locks up.

I can program and run the .bin file using my own in-application-programmer, so I know the file is OK. Removing the new CCM code segment allows the STM32 ST-Link to load the file OK.

I'm using the latest version of the ST-Link utility on Windows 7. The version information is reported at:

      STM32 DT-Link Utility.exe  v2.3.0
      STLinkUSBDriver.dll      v4.2.3.0
      ST-LINK_CLI.exe           v1.3.0

I'm using the CodeSourcery toolkit:

    arm-none-eabi-gcc (Sourcery CodeBench Lite 2012.03-56) 4.6.3

Has anyone else been able to make this work?

     Craig
  

Outcomes