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.

runtime期间拷贝flash的程序到ram

Other Parts Discussed in Thread: TMS570LS1227

Dear experts

我在用tms570ls1227作bootloader功能,我从网上找到了例程 processors.wiki.ti.com/.../TMS570_Hercules_MCU_Bootloader  

第一个问题是,这个压缩软件的doc文件夹是空的,我找不到关于它这个例程的任何资料。

第二我发现网址上有这句话 After HDK reset, the start-up code copies the Flash API of boot loader from flash to SRAM, and execute the boot loader in Flash. 

将 f021从flash拷贝到 sram里面, 我想问这是必须的嘛? 为何这么做?怎么做? 

第三 我在SPNU501G 里面看到 API functions require execution in privilege mode.  那么问题来了 必须进privilege mode吗?怎么进?

还有这句话:The F021 Flash API library cannot be executed from the same bank as the active bank
selected for the API commands to operate on. On single bank devices, the F021 Flash API
must be executed from RAM.

1227和0432都是flash只有一个bank  bank0  那么F021 Flash API 一定给拷到ram里面了?

Any answer is appreciated,thanks

  • 是的,BOOTLOADER的程序必须copy到RAM里面运行,因为它不能自己在flash运行的同时又擦除或烧写flash

  • Dear Terry

    感谢你的回答,我在E2E上面也问了这个问题,那边回答是仅仅将f021的api部分从flash拷贝到 ram ,而您 的意思貌似是整个bootloader拷贝到ram,但是不管怎么样,我想请教下  将程序段从  flash拷贝到  ram的方法  

    感谢

  • 首先你需要了解on-chip flash操作的一些特性,比如当你从flash里面读取代码并执行的时候,你是没有办法同时对同一个bank进行擦写操作的。由于flash API需要对flash进行读写操作,所以flash API函数必须要copy到RAM里面去执行,或者在不同的bank里面执行。

  • 感谢TI员工的回复,我的问题已经解决。