两个下面的散列文件在CPP编译器和链接器之间有什么区别?

huangapple go评论73阅读模式
英文:

what differences between two bellow scatter files for CPP compiler and linker?

问题

在该项目中,散布文件已被修改如下:

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)
  }  
}

在该项目中进行更改并改变了程序的允许最大大小,链接器产生以下错误:

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

英文:

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).

答案1

得分: 0

唯一的区别是内存中APP区域的大小(第二个APP参数)从0x000B0000(十进制720896)降低到0x00030000(十进制196608)。

这两个APP参数是:

  • 0x90309000APP区域在内存中的起始地址。
  • 0x00030000APP区域在内存中的大小。

新的大小限制是导致你看到以下错误的原因:

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

你可以尝试将大小限制提高到0x00030198(或甚至是0x00030200),以便接受所需的197016字节 - 但在查看你的另一个问题后,我假设这不是一个选项,因为EEP区域从APP区域之后的0x30000字节开始:

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

所以:

  • 你需要将你编译的程序大小减小至少408字节。
英文:

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.

huangapple
  • 本文由 发表于 2023年6月19日 18:27:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76505754.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定