中级会员
- 积分
- 273
- 金钱
- 273
- 注册时间
- 2013-3-11
- 在线时间
- 72 小时
|
发表于 2018-4-14 09:49:42
|
显示全部楼层
//////////////////////////////////////////////////////////////////////////////////////////////////////
//用户根据自己的需要设置
#define STM32_FLASH_SIZE 64 //所选STM32的FLASH容量大小(单位为K)
#define STM32_FLASH_WREN 1 //使能FLASH写入(0,不是能;1,使能)
//////////////////////////////////////////////////////////////////////////////////////////////////////
//FLASH起始地址
#define STM32_FLASH_BASE 0x08000000 //STM32 FLASH的起始地址
#define USER_FLASH_LAST_PAGE_ADDRESS 0x0800F800
#define USER_FLASH_END_ADDRESS 0x0800FFFF /* 64 KBytes */
#define FLASH_PAGE_SIZE 0x400 /* 1 Kbytes */
/* define the address from where user application will be loaded,
the application address should be a start sector address */
#define APPLICATION_ADDRESS 0x08008000
/* Get the number of Sector from where the user program will be loaded */
#define FLASH_PAGE_NUMBER (uint32_t)((APPLICATION_ADDRESS - 0x08000000) >> 12)
/* Compute the mask to test if the Flash memory, where the user program will be
loaded, is write protected */
#define FLASH_PROTECTED_PAGES ((uint32_t)~((1 << FLASH_PAGE_NUMBER) - 1))
/* define the user application size */
#define USER_FLASH_SIZE 0x08000
//FLASH解锁键值
楼主还在吗,这几个地址这么设置哪里不对了?我的是103C8 64K flash 20K RAM的,终端助手烧录进去一直提示Illegal Address,我把APP用烧录器烧录进去是可以正常jump的,所以估计是上面的地址哪里不对了 |
|