cancel
Showing results for 
Search instead for 
Did you mean: 

How can I have several external sections?

MTora.1
Associate III

Hi dears

How can I have several external sections in cuneIDE?

0693W00000Y7V5lQAF.pngand how can learn to touchGFX that separates Images?

for example, 3 images place in ExtSection1 and the rest in ExtSection2.

 0693W00000Y7V7IQAV.png here we have only two sections.

7 REPLIES 7
MM..1
Chief III

I mean in designer now cant, but you can define all this in linker script.

I will make two sections in the linker script.

So, what about code? how can I categorize them?

after categorization, does the simulator still work?

In code you do nothink if files to place have own object files.

Images is generated as separate object files then in linker you can place it as you choice.

can you give me an AppNote or example?

Part of LD script

  ExtSection2 :
  {
    *(.gnu.linkonce.r.*)
    *image_Blue_Clocks_Backgrounds_clock_standard_background.o
    . = ALIGN(0x4);
  } >SPI_FLASH
 
  ExtFlashSection :
  {
    *(ExtFlashSection ExtFlashSection.*)
    *(.gnu.linkonce.r.*)
    . = ALIGN(0x4);
  } >SPI_FLASH
 
  FontFlashSection :
  {
    *(FontFlashSection FontFlashSection.*)
    *(.gnu.linkonce.r.*)
    . = ALIGN(0x4);
  } >SPI_FLASH

resut in list

14 ExtSection2   0003ad18  90000000  90000000  00040000  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 15 ExtFlashSection 000029c0  9003ad18  9003ad18  0007ad18  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 16 FontFlashSection 000001a8  9003d6d8  9003d6d8  0007d6d8  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA

Thank you in advance MM.1

but my main problem is in TouchGFX.

image in have some data including some fonts and some images.

I want to make three sections that automatically generate and categorize by touchGFX.

1- EXflashSectionFount

2- EXflashSectionImageA

3- EXflashSectionImageB

and as you see in this code all data is labeled by ExtFlashSection.

in cases where I have lots of images, it will be useful.

I guess touch gfx is unable to categorize data into different sections.

#include <touchgfx/hal/Config.hpp>
 
LOCATION_PRAGMA("ExtFlashSection")
KEEP extern const unsigned char image_concitroen[] LOCATION_ATTRIBUTE("ExtFlashSection") = { // 300x240 RGB565 pixels.
    0xfc, 0xe6, 0x1c, 0xe7, 0xfb, 0xe6, 0xfc, 0xe6, 0xfc, 0xe6, 0xfc, 0xe6,
    0x1c, 0xe7, 0xfc, 0xe6, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7,
    0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7, 0x1c, 0xe7,
...

??? if you place image_concitroen.o in linker file to other section , code pragma is ignored.

And normal project have FontSection, IntSection and ExtSection

you in linker file can use IntSection as ExtSectionB and in TochGFX every image assign into ... open images and scroll to right.