2023-10-16 04:06 AM - edited 2023-10-16 04:32 AM
I'm creating a new project for STM32G030F6P6 in STM32CubeMX. It says 32 kBytes flash.
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?
Solved! Go to Solution.
2023-10-17 03:05 AM - edited 2023-10-17 03:07 AM
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.
2023-10-16 04:11 AM - edited 2023-10-16 04:14 AM
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.
2023-10-16 04:14 AM
But is is a bit strange that STM32CubeMX generates a linker script to use the whole 64K when it isn't guarantied to work.
2023-10-16 07:09 AM
The linker script generated for CubeIDE shows 32kB here. Probably an IAR-specific issue.
2023-10-16 07:18 AM
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.
2023-10-17 03:05 AM - edited 2023-10-17 03:07 AM
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.