阿哲
发表于: 2016-9-29 11:52:10 | 显示全部楼层

最近项目中用到了NXP公司的LPC11E68芯片。该MCU基于ARM Cortex-M0+内核,最高运行频率可达50MHz。下面介绍一下如何搭建Keil开发环境以及在调试过程中的问题总结。


1. 首先打开Keil MDK,在Pack Installer中选择并安装LPC11E68对应的设备开发包LPC1100_DFP。

2. 新建工程,在Select Device for Target1…对话框中选择LPC11E68FBD48,然后在运行环境设置中选择包含CMSIS-CORE和Device-Startup文件。

3. 选择使用的仿真器型号为ULINK。由于LPC11E68仅支持SWD模式,不支持JTAG模式,因此在Setting的Port组合框中选择SW,并勾选SWJ。


调试过程中发现,使用默认的调试配置时,LPC11E68在启动后PC指针会跳转到0x1000000地址,也就是RAM的首地址,不能进行正常的仿真操作。

1566.jpg

按照Keil官方的帮助文件中的介绍,Debug->Reset Option共有四种选项,分别是:

Reset controls the RESET operations.

•    Reset — HW RESET performs a hardware reset by asserting the hardware reset (HW RESET) signal.

•    Reset — SYSRESETREQ performs a software reset by setting the SYSRESETREQ bit. The Cortex-M core and on-chip peripherals are reset.

•    Reset — VECTRESET performs a software reset by setting the VECTRESET bit. Only the Cortex-M core is reset. The on-chip peripherals are not affected. For some Cortex-M devices, VECTRESET is the only way to reset the core. VECTRESET is not supported on Cortex-M0 and Cortex-M1 cores.

•    Reset — Autodetect selects one of the above reset methods based on the target device. The SYSRESETREQ method is used if an unknown device is detected.


选择SYSRESETREQ,正常跳转到main函数。

156.jpg


注意:工程包含的头文件是LPC11E6x.h,不是LPC11Exx.h

跳转到指定楼层
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题 53 | 回复: 76



手机版|

GMT+8, 2024-4-25 03:20 , Processed in 0.106128 second(s), 7 queries , Gzip On, MemCache On. Powered by Discuz! X3.5

YiBoard一板网 © 2015-2022 地址:河北省石家庄市长安区高营大街 ( 冀ICP备18020117号 )

快速回复 返回顶部 返回列表