static const uint32_t flash_code[] = {
0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
0x4603B510, 0x4C442000, 0x48446020, 0x48446060, 0x46206060, 0xF01069C0, 0xD1080F04, 0x5055F245,
0x60204C40, 0x60602006, 0x70FFF640, 0x200060A0, 0x4601BD10, 0x69004838, 0x0080F040, 0x61104A36,
0x47702000, 0x69004834, 0x0004F040, 0x61084932, 0x69004608, 0x0040F040, 0xE0036108, 0x20AAF64A,
0x60084930, 0x68C0482C, 0x0F01F010, 0x482AD1F6, 0xF0206900, 0x49280004, 0x20006108, 0x46014770,
0x69004825, 0x0002F040, 0x61104A23, 0x61414610, 0xF0406900, 0x61100040, 0xF64AE003, 0x4A2120AA,
0x481D6010, 0xF01068C0, 0xD1F60F01, 0x6900481A, 0x0002F020, 0x61104A18, 0x47702000, 0x4603B510,
0xF0201C48, 0xE0220101, 0x69004813, 0x0001F040, 0x61204C11, 0x80188810, 0x480FBF00, 0xF01068C0,
0xD1FA0F01, 0x6900480C, 0x0001F020, 0x61204C0A, 0x68C04620, 0x0F14F010, 0x4620D006, 0xF04068C0,
0x60E00014, 0xBD102001, 0x1C921C9B, 0x29001E89, 0x2000D1DA, 0x0000E7F7, 0x40022000, 0x45670123,
0xCDEF89AB, 0x40003000, 0x00000000
};
const program_target_t flash_algo = {
0x20000021, // Init
0x20000053, // UnInit
0x20000065, // EraseChip
0x2000009F, // EraseSector
0x200000DD, // ProgramPage
// BKPT : start of blob + 1
// RSB : address to access global/static data
// RSP : stack pointer
{
0x20000001,
0x20000C00,
0x20001000
},
0x20000400, // mem buffer location
0x20000000, // location to write prog_blob in target RAM
sizeof(flash_code), // prog_blob size
flash_code, // address of prog_blob
0x00000400, // ram_to_flash_bytes_to_be_written
};
flash_code[]里面的这些数组是怎么得来的,也不太像是地址。我在另一份代码里面看到过代码生成这串数字,但是还不太懂。如果我要手动去写,该怎么找呢
for(cnt=0;cnt<Flash_Algo_Length;cnt++)
{
f_lseek(&file,60+cnt*4);//设置读取文件数据起始位置
memset(Read_Buff,0x00,4);
f_read(&file,Read_Buff,4,&fnum);//读取数据Flash算法
flash_code[cnt]= (
Read_Buff[0]<<24 | Read_Buff[1]<<16 |
Read_Buff[2]<<8 | Read_Buff[3] );
}
flash_algo 这个结构体里面的数据是手册里面看到的吗?是烧录目标芯片的flash参数数据吗。
我看到好像说是什么flash算法得到的。不太懂,求大佬解答 |