tms320c6000价格_tms320c6000_tm320c6000网盘(6)

电脑杂谈  发布时间:2017-02-24 08:23:17  来源:网络整理

我使用的Flash_Writem函数按每次16位(2字节)烧写,主程序main中的烧写代码是

#include <c6x.h>
#include <csl.h>
#include <stdio.h>
#include <stdlib.h>
#include "Flash.h"
#include "BSP.h"
#include "boot.h"
#include "text.h"

main()
{
    /* Init PLL EMIF ... */
    BSP_init();

    /* Fetch data from file */

    /* Erase flash memory. */
    Flash_Erase(0x90000000,0x10);
    printf("\nErase Flash ok.");

    /* Write flash memory. */
    Flash_Writem(0x90000000, (uint16_t *)boot, sizeof(boot)<<1);   
    printf("\nWrite .boot ok.");

    Flash_Writem(0x90000000&#43;(0x200<<1), (uint16_t *)text, sizeof(text)<<1);
    printf("\nWrite .text ok.");

    printf("\nBurn to flash ok.");
}

注意上面的Flash_Writem调用&#26684;式,二级boot_loader被烧写到Flash起始地址为0x90000000的地址空间,用户应用程序被烧写到Flash起始地址为0x90000400的地址空间。

烧写成功,请看下文,

更多烧写内容请参考[2],里面是我烧写程序用的CCS工程,烧写不同的应用程序只需要替换里面的text.h和boot.h即可。

后注:烧写Flash要注意以上的任何一个细节,某个细节出错都可能造成烧写不成功!

5 参考

[1] Creating a Second-Level Bootloader for FLASH Bootloading on TMS320C6000 Platform With Code Composer Studio

[2] My Flash burn CCS project


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-34190-6.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...