cancel
Showing results for 
Search instead for 
Did you mean: 

When downloading FW on the stm32L476ZGT EVAL,

Jlee.16
Associate

When downloading FW on the stm32L476ZGT EVAL by using CubeIDE1.10.1ver, 

I faced with Error: Failed to download Segment[0], Error: Failed to download the File...,

How can I solve these problems? Even I didn't write any code in there. 

Following is my Console window...

If you guys have any good ideas, please save me...

I uninstalled CubeIDE 1.07ver and installed CubeIDE 1.10ver but it wasn't working.

 
STMicroelectronics ST-LINK GDB server. Version 7.0.0
Copyright (c) 2022, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled
        InitWhile                  : Enabled
 
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.11.0                  
      -------------------------------------------------------------------
 
 
 
Log output file:   C:\Users\Owner\AppData\Local\Temp\STM32CubeProgrammer_a11136.log
ST-LINK SN  : 56FF6C066683565232541987
ST-LINK FW  : V2J40S7
Board       : --
Voltage     : 3.27V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x415
Revision ID : Rev 2
Error: Database: There's no active configuration for this device. All the 5 configurations are disabled!
Error: Database: There's no active configuration for this device. All the 5 configurations are disabled!
Device name : STM32L4x1/STM32L475xx/STM32L476xx/STM32L486xx
Flash size  : 63 KBytes (default)
Device type : MCU
Device CPU  : Cortex-M4
BL Version  : --
 
 
Mass erase ... 
 
Mass erase successfully achieved
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.11.0                  
      -------------------------------------------------------------------
 
 
 
Log output file:   C:\Users\Owner\AppData\Local\Temp\STM32CubeProgrammer_a11136.log
ST-LINK SN  : 56FF6C066683565232541987
ST-LINK FW  : V2J40S7
Board       : --
Voltage     : 3.27V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x415
Revision ID : Rev 2
Error: Database: There's no active configuration for this device. All the 5 configurations are disabled!
Error: Database: There's no active configuration for this device. All the 5 configurations are disabled!
Device name : STM32L4x1/STM32L475xx/STM32L476xx/STM32L486xx
Flash size  : 63 KBytes (default)
Device type : MCU
Device CPU  : Cortex-M4
BL Version  : --
 
 
 
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a11136.srec
  File          : ST-LINK_GDB_server_a11136.srec
  Size          : 11.59 KB 
  Address       : 0x08000000 
 
 
Erasing memory corresponding to segment 0:
Erasing external memory sectors [0 5]
File segment @0x08000000 is not 255-bytes aligned. It will be aligned to @0x07FFFFF8
Download in Progress:
 
 
Error: failed to download Segment[0]
Error: failed to download the File
Shutting down...
Exit.

1 ACCEPTED SOLUTION

Accepted Solutions
MM..1
Chief II

Seems your linker and maybe too install have some issue.

source for trouble is

File segment @0x08000000 is not 255-bytes aligned. It will be aligned to @0x07FFFFF8

load to 7FFFFF8 isnt possible.

View solution in original post

4 REPLIES 4
MM..1
Chief II

Seems your linker and maybe too install have some issue.

source for trouble is

File segment @0x08000000 is not 255-bytes aligned. It will be aligned to @0x07FFFFF8

load to 7FFFFF8 isnt possible.

How do we go about fixing this? I noticed the standalone STM32CubeProgrammer writes to 0x08000000 and works fine, while the programmer bundled in the IDE does this alignment nonsense and throws the same error for me as OP got.

Check the linker script doesn't have any alignment based on 255 vs 256

@Sara BEN HADJ YAHYA​ please check where this file segment warning is coming from.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Fixed by downgrading the IDE.