This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于CMD文件中的疑惑



ramfuncs:

LOAD = FLASHD,

RUN   = RAML0,                   LOAD_START(_RamfuncsLoadStart),

LOAD_END(_RamfuncsLoadEnd),

RUN_START(_RamfuncsRunStart),

PAGE = 0

      请教,这段代码,应该是定义一个段,段被定位到FLASH存储器的FLASHD位置,并从RAML0位置运行。

  那么,下面三行表示的是什么意思啊?  还有括号中的_RamfuncsLoadStart

_RamfuncsLoadEnd

_RamfuncsRunStart

表示的是个什么东西?

  • 要实现Flash上指定的段可以在RAM上运行,就需要将对应的代码copy到RAM上去,那它们就是实现这个copy功能的,三个变量分别表示了被copy代码的起始地址,结束地址,以及运行的起始地址。

  • 我理解二楼的意思:

     _RamfuncsLoadStart     这个地址是FLASH中的,需要拷贝代码的起始地址。

     _RamfuncsLoadEnd      这个地址是FLASH中的,需要拷贝代码的结束地址

     _RamfuncsRunStart      这个地址是RAM中的,程序运行的起始地址

    但是这几个变量都只是声明了,并没有指定具体地址:

    extern Uint16 RamfuncsLoadStart;

     extern Uint16 RamfuncsLoadEnd;

     extern Uint16 RamfuncsRunStart;

     

    那究竟是从哪里加载/结束/运行的呢?