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.

关于2806x的bootloader

Other Parts Discussed in Thread: CONTROLSUITE

ControlSUITE中关于boot_rom的例程中,在"Shared_Boot.c"中有如下代码:

//#################################################
// void CopyData(void)
//-----------------------------------------------------
// This routine copies multiple blocks of data from the host
// to the specified RAM locations. There is no error
// checking on any of the destination addresses.
// That is it is assumed all addresses and block size
// values are correct.
//
// Multiple blocks of data are copied until a block
// size of 00 00 is encountered.
//
//-----------------------------------------------------

void CopyData()
{

  struct HEADER {
  Uint16 BlockSize;
  Uint32 DestAddr;
  } BlockHeader;

  Uint16 wordData;
  Uint16 i;

  // Get the size in words of the first block
  BlockHeader.BlockSize = (*GetWordData)();

  // While the block size is > 0 copy the data
  // to the DestAddr. There is no error checking
  // as it is assumed the DestAddr is a valid
  // memory location

  while(BlockHeader.BlockSize != (Uint16)0x0000)
  {
    BlockHeader.DestAddr = GetLongData();
    for(i = 1; i <= BlockHeader.BlockSize; i++)
    {
      wordData = (*GetWordData)();
      *(Uint16 *)BlockHeader.DestAddr++ = wordData;
    }

  // Get the size of the next block
  BlockHeader.BlockSize = (*GetWordData)();
  }
  return;
}

其中,用红色标记的一行,将接收到的数据直接存到目标地址了。

问题是,固化在ROM里的bootloader接收的升级数据不是要存到FLASH里面吗?

如是,为什么不需要调用FLASH的API呢?FLASH在什么情况下可以直接写呢?