打印
[MCU]

买的LM3S8962开发板用IAR+JLINK无法调试下载

[复制链接]
440|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
elephant00|  楼主 | 2020-12-3 10:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
非常简单的实例主程序

#define HWREG(x) (*((volatile unsigned long *)(x)))
#define SYSCTL_BASE 0x400FE000
#define RCGC2 (SYSCTL_BASE + 0x108)
#define GPIOA_BASE 0x40004000
#define GPIOA_DATA (GPIOA_BASE + 0x000)
#define GPIOA_DIR (GPIOA_BASE + 0x400)
#define GPIOA_AFSEL (GPIOA_BASE + 0x420)
#define GPIOA_DR2R (GPIOA_BASE + 0x500)
#define GPIOA_DR4R (GPIOA_BASE + 0x504)
#define GPIOA_DR8R (GPIOA_BASE + 0x508)
#define GPIOA_ODR (GPIOA_BASE + 0x50C)
#define GPIOA_PUR (GPIOA_BASE + 0x510)
#define GPIOA_PDR (GPIOA_BASE + 0x514)
#define GPIOA_SLR (GPIOA_BASE + 0x518)
#define GPIOA_DEN (GPIOA_BASE + 0x51C)



int main(void)
{
  //void jtagWait(void)
//jtagWait( );
   
  HWREG(RCGC2) |= 0x01; /* 使能GPIOA端口 */

HWREG(GPIOA_DIR) |= 0x08; /* 设置方向和模式 */
HWREG(GPIOA_AFSEL) &= ~0x08;
HWREG(GPIOA_DR2R) |= 0x08; /* 设置驱动强度 */
HWREG(GPIOA_DR4R) &= ~0x08;
HWREG(GPIOA_DR8R) &= ~0x08;
HWREG(GPIOA_SLR) &= ~0x08;
HWREG(GPIOA_ODR) &= ~0x08; /* 设置管脚类型 */
HWREG(GPIOA_PUR) &= ~0x08;
HWREG(GPIOA_PDR) &= ~0x08;
HWREG(GPIOA_DEN) |= 0x08;
HWREG(GPIOA_DATA+ (0x08 << 2)) = 0x00; /* PA3输出低电平 */
for (;;);
}

compile和make都没有错误
下载时出错
提示:Could not power up debug port :Control/Status register reads 000000F0
继而出现:
Fatal error:Incalid core ID. Session aborted!
debug框中显示:
Tue Jul 20 16:27:33 2010: DLL version: V4.10i, compiled Jan 25 2010 14:43:57  
Tue Jul 20 16:27:33 2010: Firmware: J-Link ARM V7 compiled Jun 30 2009 11:05:27  
Tue Jul 20 16:27:33 2010: JTAG speed is initially set to: 32 kHz  
Tue Jul 20 16:27:33 2010: TotalIRLen = 4, IRPrint = 0x01  
Tue Jul 20 16:29:20 2010: Hardware reset with strategy 0 was performed  
Tue Jul 20 16:29:20 2010: Initial reset was performed  
Tue Jul 20 16:29:20 2010: Fatal error: Invalid core Id. (0)   
  
Session aborted!  

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

960

主题

2914

帖子

7

粉丝