cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to decice the memory area to download on uC and QSPI?

MPast.1
Senior II

Hi,

is it possibile to decide what area of microcontroller to program (the range) while debugging?

I would like to remove QSPI memory update (via loader) because it take too much time.

1 ACCEPTED SOLUTION

Accepted Solutions

Sincerely, I appreciate all kind of hints from everyone!

Then I start to experiment and to filter the varoius answer on web.

The result is that objcopy --remove-section command syntax is right . is it also possibile to create a queue:

objcopy --remove-section=ExtFlashSection --remove-section=FontFlashSection --remove-section=TextFlashSection

instead themost important missing code is the first part of the command:

arm-none-eabi-objcopy.exe

writing :

arm-none-eabi-objcopy.exe --remove-section=ExtFlashSection --remove-section=FontFlashSection --remove-section=TextFlashSection "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}.elf"

 Everything works.

I checked inside the "*.elf" file the ExtFlashSection, FontFlashSection and TextFlashSection and i discovered that these sections are not even presents.

Thank you so much.

Obviously compiler doesn't generate any errors, but only one warning witch tomorrow I will check:

22:14:44 **** Incremental Build of configuration Debug for project AlgoTouch ****
make -j12 all 
arm-none-eabi-size   AlgoTouch.elf 
   text	   data	    bss	    dec	    hex	filename
 380828	 261800	 164644	 807272	  c5168	AlgoTouch.elf
Finished building: default.size.stdout
 
arm-none-eabi-objcopy.exe --remove-section=ExtFlashSection --remove-section=FontFlashSection --remove-section=TextFlashSection "AlgoTouch.elf" "AlgoTouch.elf"
arm-none-eabi-objcopy.exe: AlgoTouch.elf: warning: empty loadable segment detected at vaddr=0x90365ae0, is this intentional?
 
 
22:14:51 Build Finished. 0 errors, 0 warnings. (took 7s.88ms)

Stay tuned!!!

View solution in original post

12 REPLIES 12
Uwe Bonnes
Principal III

Set up your linker to use flash. The decision is done at link time, not upload time.

MPast.1
Senior II

changing

 FLASH    (rx)    : ORIGIN = 0x8000000,  LENGTH = 2048K

to

 FLASH    (rx)    : ORIGIN = 0x8000000,  LENGTH = 512K

allow to reduce flash programming time. Right?

Instead, How can I block qspi write without blocking qspi reading?

The scope is not update external graphic contents during programming and debug: graphic design, text and pictures are not changed.

Uwe Bonnes
Principal III

No. This only declares less flash is available to the linker. But in both cases upload is to on-chip flash. QSPI is not at 0x08000000.

MPast.1
Senior II

so isn't there no way to exclude QSPI update?

I want to fast the debug process: i don't want to wait 2 minutes waiting QSPI is update

( I use these setting on my linker:

FLASH    (rx)    : ORIGIN = 0x8000000,  LENGTH = 2048K

QUADSPI  (rx)    : ORIGIN = 0x90000000,  LENGTH = 8M,

I thinking that if I remove QUADSPI section, Touchgfx stack cant load data from external memory)

Post link, can't you use objcopy --remove-section= ?

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

For example when you use CubeIDE in debug config turn off DOWNLOAD at all and create flash only code script without reflash QSPI.

Scritp you can place to run after build part in config.

Can you help me with this instruction?

I never use it. Have you got an example?

Must I insert the script in this section, right?

0693W000007EEe6QAG.jpg

These aren't things I use day-to-day, and I'm not a CubeIDE user, think of me as the guy on the street giving directions, not the taxi driver.

There is documentation, check what sections you have in your linker script (.LD), check those which have content via (.MAP), or dumping the .ELF file

Here with typical naming from TouchGFX, pick those contributing to your QUADSPI foot print

objcopy --remove-section=ExtFlashSection --remove-section=FontFlashSection --remove-section=TextFlashSection target.elf

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

Sincerely, I appreciate all kind of hints from everyone!

Then I start to experiment and to filter the varoius answer on web.

The result is that objcopy --remove-section command syntax is right . is it also possibile to create a queue:

objcopy --remove-section=ExtFlashSection --remove-section=FontFlashSection --remove-section=TextFlashSection

instead themost important missing code is the first part of the command:

arm-none-eabi-objcopy.exe

writing :

arm-none-eabi-objcopy.exe --remove-section=ExtFlashSection --remove-section=FontFlashSection --remove-section=TextFlashSection "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}.elf"

 Everything works.

I checked inside the "*.elf" file the ExtFlashSection, FontFlashSection and TextFlashSection and i discovered that these sections are not even presents.

Thank you so much.

Obviously compiler doesn't generate any errors, but only one warning witch tomorrow I will check:

22:14:44 **** Incremental Build of configuration Debug for project AlgoTouch ****
make -j12 all 
arm-none-eabi-size   AlgoTouch.elf 
   text	   data	    bss	    dec	    hex	filename
 380828	 261800	 164644	 807272	  c5168	AlgoTouch.elf
Finished building: default.size.stdout
 
arm-none-eabi-objcopy.exe --remove-section=ExtFlashSection --remove-section=FontFlashSection --remove-section=TextFlashSection "AlgoTouch.elf" "AlgoTouch.elf"
arm-none-eabi-objcopy.exe: AlgoTouch.elf: warning: empty loadable segment detected at vaddr=0x90365ae0, is this intentional?
 
 
22:14:51 Build Finished. 0 errors, 0 warnings. (took 7s.88ms)

Stay tuned!!!