cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G030F6P6 says 32kBytes flash but linker script says 64kByte. Practical test says 64kB

MSipo
Senior II

I'm creating a new project for STM32G030F6P6 in STM32CubeMX. It says 32 kBytes flash.

MSipo_0-1697454240004.png

 

But when I look at the generated project in the file stm32g030xx_flash.icf it says:

 

 

 

 

 

/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
define symbol __ICFEDIT_region_ROM_end__   = 0x0800FFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_RAM_end__   = 0x20001FFF;

 

 

 

So it says to the linker that the flash memory is 0x08000000 - 0x0800FFFF (this is 64 kBytes flash).

I have tested saving data on address 0x0800f800. This works. And STM32CubeProgrammer is also able to read the data.

 

The data sheet says this MCU shall have 32kByte flash but it works as a 64kByte. What is going on?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

Hello @MSipo ,

Thank you for bringing this issue to our attention.

I reported internally.

Internal ticket number: 163997 (This is an internal tracking number and is not accessible or usable by customers).

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
AScha.3
Chief III

its always the same chip - maybe 64k version.

but if you buy cheaper 32k version, only 32k are tested and 100% working. (testing time is part of the production cost).

so 32k more are "free gift", but no warranty to work.

If you feel a post has answered your question, please click "Accept as Solution".

But is is a bit strange that STM32CubeMX generates a linker script to use the whole 64K when it isn't guarantied to work. 

TDK
Guru

The linker script generated for CubeIDE shows 32kB here. Probably an IAR-specific issue.

TDK_0-1697465169493.png

 

If you feel a post has answered your question, please click "Accept as Solution".

Yes. if I generate an STM32CubeIDE project the STM32G030F6PX_FLASH.ld is correct. But when I select EWARM project the stm32g030xx_flash.icf is incorrect.

I hope ST fixes this. This could suddenly break firmware.

KDJEM.1
ST Employee

Hello @MSipo ,

Thank you for bringing this issue to our attention.

I reported internally.

Internal ticket number: 163997 (This is an internal tracking number and is not accessible or usable by customers).

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.