0

In the project this scatter file:

APP  0x90309000 0x000B0000
{
  APPCFG +0
  { 
      * (APP_CFG)
  }

  APP0 +0
  { 
    main.o* (APPENTRY)
  }
  APP1 +0
  {
    main.o* (+RO)
    *.o*    (+RO)
  }

  APP_RAM   0xF0380000 0x00060000
  {
    main.o  (+RW,+ZI)
    *.o     (+RW,+ZI)
  }  
}

modify to:

APP  0x90309000 0x00030000
{
  APPCFG +0
  { 
      * (APP_CFG)
  }

  APP0 +0
  { 
    main.o* (APPENTRY)
  }
  APP1 +0
  {
    main.o* (+RO)
    *.o*    (+RO)
  }

  APP_RAM   0xF0380000 0x00060000
  {
    main.o  (+RW,+ZI)
    *.o     (+RW,+ZI)
  }  
}

In the project it changed and change allowable maximum size of proggram and linker given bellow error:

armlink : error L6220: Load region APP size (197016 bytes) exceeds limit (196608 bytes).

Alan Birtles
  • 32,622
  • 4
  • 31
  • 60
Hossein
  • 24
  • 5

1 Answers1

0

The only difference is that the size of the APP region in memory (the second APP parameter) was lowered from 0x000B0000 (decimal 720896) to 0x00030000 (decimal 196608).

The two APP parameters are:

  • 0x90309000: The start address of the APP region in memory.
  • 0x00030000: The size of the APP region in memory.

The new size constraint is the reason why you see

armlink : error L6220: Load region APP size (197016 bytes) exceeds limit (196608 bytes).

You may be able to raise the size limit to 0x00030198 (or perhaps even 0x00030200) to make it accept the 197016 bytes required - but after looking at your other question, I assume that's not an option because the EEP region starts at 0x30000 bytes after the APP region:

/*********************SIM808 EAT Flash Map****************************/
//  APP1 = 192K @ 0X90309000
//  EEP = 8K    @ 0X90339000

So:

  • You need to make your compiled program smaller by at least 408 bytes.
Ted Lyngmo
  • 93,841
  • 5
  • 60
  • 108
  • What does mean the APP parameter? – Hossein Jun 19 '23 at 11:13
  • The APP parameter is on the first parameter in your scatter file. It was previously `0x000B0000` and is now `0x00030000`. Which scatter file documentation are you reading? If you give me a link to it, I can add references to the answer. – Ted Lyngmo Jun 19 '23 at 11:17
  • I don't have a proper document for it. Can you suggest a document for it? – Hossein Jun 19 '23 at 11:27
  • @Hossein No, unfortunately. I pieced it together by clicking around at [ARM Compiler armlink User Guide Version 5.06](https://developer.arm.com/documentation/dui0474/m/scatter-file-syntax). Perhaps that's the correct one. Anyway, did my answer answer what the difference is between the two scatter files you asked about? – Ted Lyngmo Jun 20 '23 at 15:59
  • yeah, your answer was right, I reduce the volume of the program and it became ok. Thanks Ted. – Hossein Jun 21 '23 at 05:58
  • Now I have a new quick question. – Hossein Jun 21 '23 at 06:01
  • @Hossein Great! You're welcome! Ok, post a new question and if I know the answer, I will try to answer it. – Ted Lyngmo Jun 21 '23 at 06:02
  • What APP_RAM is it used for? – Hossein Jun 21 '23 at 06:04
  • @Hossein I'm guessing that it's following the same pattern as for `APP`. `0xF0380000` means the start address of the random access memory and `0x00060000` is the size (393216 bytes). I could however find even less information about that region online so it's a best guess. – Ted Lyngmo Jun 21 '23 at 06:14