mc9s08ac60自写FLASH例程

上传者: JJJ_SUN | 上传时间: 2023-04-03 16:18:08 | 文件大小: 145KB | 文件类型: RAR
该程序移植注意事项:1.注意时钟的配置 2.PRM文件的配置 //========================================================== FLASH时钟配置: 文件“S08_Flash.h”中 “#define BUS_CLOCK 20000000”这句要根据自己所用的总线频率设定 //========================================================== PRM文件配置注意如下: SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */ Z_RAM = READ_WRITE 0x0070 TO 0x00FF; RAM = READ_WRITE 0x0170 TO 0x086F; ROM = READ_ONLY 0x18D0 TO 0xFFAF; ROM1 = READ_ONLY 0x0870 TO 0x17FF; ROM2 = READ_ONLY 0xFFC0 TO 0xFFC5; FLASH_TO_RAM = READ_ONLY 0x1860 TO 0x18CF RELOCATE_TO 0x0100;//!!! /* INTVECTS = READ_ONLY 0xFFC6 TO 0xFFFF; Reserved for Interrupt Vectors */ END //注:RAM地址0x0100 to 0x016F预留,用于存放擦写FLASH的程序; //========================================================== 在移植时由于新建工程所以经常忘记下面这3段的调整 1 Z_RAM = READ_WRITE 0x0070 TO 0x00FF; RAM = READ_WRITE 0x0170 TO 0x086F; 2 ROM = READ_ONLY 0x18D0 TO 0xFFAF; ROM1 = READ_ONLY 0x0870 TO 0x17FF; FLASH_TO_RAM = READ_ONLY 0x1860 TO 0x18CF RELOCATE_TO 0x0100; 3 FLASH_ROUTINES INTO FLASH_TO_RAM; //========================================================== 在移植过程中有可能出现下面的编译报错: Link Error:L1102 Out allocation space in segment FLASH_TO_RAM at address 0xXXXX 这是因为 FLASH_TO_RAM = READ_ONLY 0x1860 TO 0x18CF RELOCATE_TO 0x0100; 这里分配的空间不够,适当扩大就可以了 注:这个例程的缺点在于直接分配了RAM给擦写FLASH的程序,使这写RAM大部分时间浪费掉而不能用于其他用途 参考文献中介绍了一种较好的实现方式。 参考文献: “在HCS08微控制器上使用FLASH存储器模拟EEPROM”和 “HCS08系列单片机FLASH模拟EEPROM的应用”(请自行在网上搜所这些文档) 免责声明: 这段程序并非本人所写,也是摘自别处。 这段程序只是经过MC9S08AC60demo板简单的测试,未经过大批量和长时间的验证,所以若用在产品当中应谨慎,若出现因引用本程序而出现任何问题本人将不承担任何责任! jjj_sun 2009-3-28 23:24

文件下载

资源详情

[{"title":"( 32 个子文件 145KB ) mc9s08ac60自写FLASH例程","children":[{"title":"AC60_Flash","children":[{"title":"BDM_P&E_Multilink_CyclonePro.ini <span style='color:#111;'> 2.34KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Project.abs <span style='color:#111;'> 58.28KB </span>","children":null,"spread":false},{"title":"Project.old0.map <span style='color:#111;'> 29.26KB </span>","children":null,"spread":false},{"title":"Project.old2.map <span style='color:#111;'> 47.03KB </span>","children":null,"spread":false},{"title":"Project.map <span style='color:#111;'> 105B </span>","children":null,"spread":false},{"title":"Project.abs.s19 <span style='color:#111;'> 1.44KB </span>","children":null,"spread":false},{"title":"Project.old1.map <span style='color:#111;'> 31.13KB </span>","children":null,"spread":false}],"spread":true},{"title":"Sources","children":[{"title":"main.c <span style='color:#111;'> 1.79KB </span>","children":null,"spread":false},{"title":"S08_Flash.c <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false},{"title":"Start08.c <span style='color:#111;'> 10.09KB </span>","children":null,"spread":false},{"title":"derivative.h <span style='color:#111;'> 423B </span>","children":null,"spread":false},{"title":"S08_Flash.h <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false}],"spread":true},{"title":"AC60_Flash.mcp <span style='color:#111;'> 66.33KB </span>","children":null,"spread":false},{"title":"AC60_Flash_Data","children":[{"title":"Standard","children":[{"title":"ObjectCode","children":[{"title":"main.c.o <span style='color:#111;'> 9.36KB </span>","children":null,"spread":false},{"title":"S08_Flash.c.o <span style='color:#111;'> 7.22KB </span>","children":null,"spread":false},{"title":"MC9S08AC60.C.o <span style='color:#111;'> 53.29KB </span>","children":null,"spread":false},{"title":"Start08.c.o <span style='color:#111;'> 6.75KB </span>","children":null,"spread":false}],"spread":true},{"title":"TargetDataWindows.tdt <span style='color:#111;'> 208.79KB </span>","children":null,"spread":false}],"spread":true},{"title":"CWSettingsWindows.stg <span style='color:#111;'> 4.10KB </span>","children":null,"spread":false}],"spread":true},{"title":"C_Layout.hwl <span style='color:#111;'> 856B </span>","children":null,"spread":false},{"title":"prm","children":[{"title":"Project.prm <span style='color:#111;'> 1.86KB </span>","children":null,"spread":false},{"title":"burner.bbl <span style='color:#111;'> 140B </span>","children":null,"spread":false}],"spread":true},{"title":"AC60_Flash.mcp_0_backup.zip <span style='color:#111;'> 45.85KB </span>","children":null,"spread":false},{"title":"readme.txt <span style='color:#111;'> 2.32KB </span>","children":null,"spread":false},{"title":"cmd","children":[{"title":"BDM_P&E_Multilink_CyclonePro_Startup.cmd <span style='color:#111;'> 59B </span>","children":null,"spread":false},{"title":"BDM_P&E_Multilink_CyclonePro_Reset.cmd <span style='color:#111;'> 60B </span>","children":null,"spread":false},{"title":"SofTec_HCS08_Preload.cmd <span style='color:#111;'> 60B </span>","children":null,"spread":false},{"title":"BDM_P&E_Multilink_CyclonePro_Preload.cmd <span style='color:#111;'> 60B </span>","children":null,"spread":false},{"title":"SofTec_HCS08_Startup.cmd <span style='color:#111;'> 59B </span>","children":null,"spread":false},{"title":"SofTec_HCS08_Reset.cmd <span style='color:#111;'> 60B </span>","children":null,"spread":false},{"title":"SofTec_HCS08_Postload.cmd <span style='color:#111;'> 59B </span>","children":null,"spread":false},{"title":"BDM_P&E_Multilink_CyclonePro_Postload.cmd <span style='color:#111;'> 59B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明