cancel
Showing results for 
Search instead for 
Did you mean: 

Flash programming alignment error, STM32L433CC, TrueStudio

Moritz Diller
Associate II
Posted on July 08, 2018 at 12:58

I'm trying to debug a project in TrueStudio, but get this error message during flashing:

0690X0000060LgyQAE.png

... which is the ''load'' instruction of the startup script.

I think the cause of this error is, that the flash size of my program can't be divided by 4 without remainder:

Print size information

text          data    bss       dec          hex

132474    640    38232    171346    29d52

If I modify the project by inserting a while(1) before the use of the library, which makes the flash size not a multiple of 4 bytes, it can be flashed.

Console output:

Flash write: Address= 0x800d0a8, Length=70

Programming flash..

STM32 device: flash programming successful 0x800d0a8

Flash write completed in 0.085000 seconds, 0.804228kB/s

Flash write: Address= 0x800d0ee, Length=126

Programming flash..

Flash programming alignment error

I ported this project from an F3 MCU to the L4 MCU. The F3 project could be flashed by TrueStudio without any problem and had a flash size which was not a multiple of 4 bytes, too.

I can program the hex-file with ST-Link-Utility and debug with TrueStudio by removing the load-instruction from the startup file, but of course that's not convenient.

1 ACCEPTED SOLUTION

Accepted Solutions
Wellington Santos
Associate

I had the same problem.

Update to the new Atollic version 9.1.0. This solved the question to me.

View solution in original post

2 REPLIES 2

@AtollicSupport

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

I had the same problem.

Update to the new Atollic version 9.1.0. This solved the question to me.