尊敬的工程师您好:
我现在使用c5517 通过emif能够对nor flash的读、写、擦除都可以了,就是不知道如何的用ccs5.5 写好的程序写进入flash?需要注意哪些事项?
望您给予详细的讲解。
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.
尊敬的工程师您好:
我现在使用c5517 通过emif能够对nor flash的读、写、擦除都可以了,就是不知道如何的用ccs5.5 写好的程序写进入flash?需要注意哪些事项?
望您给予详细的讲解。
参考文档sprabp1. Using the C5517 bootloader: http://www.ti.com/lit/an/sprabp1/sprabp1.pdf
#1. hex55将.out转换成boot table的bin文件。文档3.1.1节:Creating an Unencrypted Boot Image
建立一个文件boottable.cmd把下面内存拷贝进去。然后在命令行下调用:hex55.exe boottable.cmd xxx.out, hex55.exe在编译器的安装目录下,比如:C:\ti\ccsv6\tools\compiler\c5500_4.4.1\bin\hex55.exe
-boot ;option to create a boot table
-v5505 ;use C55x boot table format for TMS320C5517
-parallel16 ;boot mode is 16-bit parallel interface boot table
-b ;desired output format is binary format
-o my_app.bin ;specify the output filename
#2. 将my_app.bin文件写入flash. CSL包里有烧写工程:http://software-dl.ti.com/dsps/dsps_public_sw/dsps_swops_houston/C55X/latest/index_FDS.html
我前面也说了CSL安装目录下有烧写工程,打开工程看就知道了。 C:\ti\c55_lp\c55_csl_3.06\ccs_v6.x_examples\programmer
void main(void)
{
/* Function pointers to the init and read/write n words functions */
UInt16 (*READ_N_WORDS)(UInt32 address, UInt16 *buffer, UInt16 count);
UInt16 (*WRITE_N_WORDS)(UInt32 address, UInt16 *buffer, UInt16 count);
char buf[120];
int InputIndex=0;
int DeviceTypeIndex;
int ChipSelectIndex;
int OperationIndex;
char *filename;
Uint16 ChipSelect;
Uint16 id[3];
/* Get the user's requested device to program */
printf("Choose the device...\n");
printf("1x - NAND Flash [CSx: 2,3,4,5]\n");
printf("2x - NOR Flash [CSx: 2,3,4,5]\n");
#ifdef C5515_EVM
printf("3 - SPI EEPROM (16 bit address)\n");
#endif
printf("4 - IIC EEPROM\n");
printf("5 - MMC\n");
printf("6 - SD\n");
#ifndef C5515_EVM
printf("7x - SPI Serial Flash (24 bit address) [PinMap x: 1=MODE5,2=MODE6]\n");
printf("8 - MCSPI Serial Flash\n");
#endif
scanf("%s", buf);
InputIndex = 0;
DeviceTypeIndex = InputIndex;
InputIndex++;
if ((buf[DeviceTypeIndex] < '0') || (buf[DeviceTypeIndex] > '8'))
{
printf("ERROR: Invalid device\n");
exit(1);
}