Disable external flash programming
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-08 8:04 PM
Hello dear engineers,
How can I instruct the STM32cubeIDE to neglect programming of the exteranl flash parts?
This parts have been placed in an external ram memory which is to be read and programmed in runtime.
In Keil ide, it simply says since no flashing algorithm for the specified parts is available, I will not take these sections into account for programming.
The _flash.ld file has been changed as follows.
/* Memories definition */
MEMORY
{
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K
ExtFlashSection (xrw) : ORIGIN = 0xC00F0000, LENGTH = 0x1f10000
}
Any help would be appreciated.
- Labels:
-
STM32CubeIDE
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-08 11:48 PM
Mark sections located in extflash as noload.
.section (NOLOAD) :
{
.....
} > ExtFlashSection AT > ExtFlashSection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-09 6:07 AM
Which file should I add that, to the RAM or the Flash?
And then, I have this post build script, they have conflict
arm-none-eabi-objcopy.exe --dump-section ExtFlashSection=images.bin tester.elf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-09 6:12 AM
i answered to your question, but now you need to specify much more, when you wanna have something loaded from flash to ram on start up, then
.section (NOLOAD) :
{
.....
} > RAM AT > FLASH, and in *.ld but also this requires modify startup file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-09 6:19 AM
I sincerly appreciate your help. I have some image code from Touchgfx, I have supposed to load them from sd card to external RAM since the image size is larger than microcontroller built in flash memory. I want to have the data to be in one single file and the order of files has been managed by the IDE. The above post build script export the mentioned data from the specified sectoin. Now I have to tell the programmer (Jlink or stlink) to skip these parts. So they are neither implemented in internal ram nor internal flash.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-09 6:27 AM
--set-section-flags for this section, noload flag is what you wanna. in objcopy tool.
but you also can try if dum will work correcly for noload sections.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-09 6:42 AM
Dear @Rados?aw​
Thank you for your participation.
Now I have changed *.ld linker file as follows.
MEMORY
{
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
ExtRAM (xrw) : ORIGIN = 0xC00F0000, LENGTH = 0x1f10000
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K
}
And next part,
ExtFlashSection (NOLOAD):
{
*(ExtFlashSection ExtFlashSection.*)
. = ALIGN(0x4);
} >ExtRAM AT> ExtRAM
And the post build script as
arm-none-eabi-objcopy.exe --set-section-flags sectionpattern=noload --dump-section ExtFlashSection=images.bin tester.elf
But the massage I get is:
arm-none-eabi-objcopy.exe --set-section-flags sectionpattern=noload --dump-section ExtFlashSection=images.bin tester.elf
arm-none-eabi-objcopy.exe: tester.elf[ExtFlashSection]: can't dump section - it has no contents: file format not recognized
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-09 6:46 AM
1few options to try:
- remove : (NOLOAD) from ld file,
- split obj operation first create flash image next set flag
- remove set flag but leave (NOLOAD).
I never do this, but maybe you remove some important flag for this sections.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-09 7:00 AM
@Rados?aw​ There should exist an automated method. Otherwise all these efforts for building compilers and linker script and ... for large embeded systems are useless. I said there is no problem with Keil.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-09 7:32 AM
I understand you, but still you want to do something unusual. Did you try this options? Later maybe i will find some time to test this.
​
About keil a can't say anything, i hate it.
​
​
