STM32F030用IAR+JLINK在线调试无法下载FLASH问题

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/jiang__jiang/article/details/54960184

今天遇到STM32 下载问题,百度半天没找到解决办法;在此记录一笔:

环境: IAR 7.2

开发板: STM32F103C8T6

下载方式: SWD


下载失败的log大概如下:

Fri Nov 14, 2014 17:22:59: ST-Link firmware too old
Fri Nov 14, 2014 17:22:59: Connected to ST-Link/V2  Firmware V2.J21.S4 (Probe no: D1A2B612)
Fri Nov 14, 2014 17:22:59: Selecting SWD as current target interface.
Fri Nov 14, 2014 17:22:59: ELF/DWARF Error: Unknown
Fri Nov 14, 2014 17:22:59: 0 bytes with download suppressed
Fri Nov 14, 2014 17:22:59: Failed to load debugee: D:\project\stm32\program\STM32F10x_StdPeriph_Lib_V3.6.1\Project\STM32F10x_StdPeriph_Template\EWARM\STM3210E-EVAL_XL\Exe\Project.out


我是这样弄的:

右击工程->Options->Debugger->Download; 如下

在下面的Override default board file 中选择你的版子的型号即可


展开阅读全文

关于IAR用JLINK调试的疑问

03-19

这几天在用IAR和JLINK调试ARM9的一个测试程序,刚接触ARM一个月了,还没有吃透如何下载程序,以及程序在目标板执行的过程,一下是我IAR调试过程中出现的调试信息:rnrnMon Mar 19 20:34:55 2012: DLL version: V3.92a, compiled Oct 6 2008 19:58:36rnMon Mar 19 20:34:55 2012: Firmware: J-Link ARM V8 compiled Jan 31 2011 18:34:52rnMon Mar 19 20:34:55 2012: JTAG speed is initially set to: 32 kHzrnMon Mar 19 20:34:55 2012: Initial reset was performedrnMon Mar 19 20:34:55 2012: TotalIRLen = 4, IRPrint = 0x01rnMon Mar 19 20:34:55 2012: CP15.0.0: 0x41129200: ARM, Architecure 4TrnMon Mar 19 20:34:55 2012: CP15.0.1: 0x0D172172: ICache: 16kB (64*8*32), DCache: 16kB (64*8*32)rnMon Mar 19 20:34:55 2012: Cache type: Separate, Write-back, Format ArnMon Mar 19 20:34:55 2012: J-Link found 1 JTAG device(s). ARM core Id: 32409D ARM9rnMon Mar 19 20:34:55 2012: Device at TAP0 selectedrnMon Mar 19 20:34:55 2012: JLINK command: ProjectFile = C:\Users\Ruan\Documents\IAR for arm\settings\test1_Debug.jlink, return = 0rnMon Mar 19 20:34:55 2012: JLINK command: device = S3C2440A, return = 0rnMon Mar 19 20:34:55 2012: RTCK is not connectedrnMon Mar 19 20:34:55 2012: Auto JTAG speed: 8000 kHzrnMon Mar 19 20:34:55 2012: 572 bytes downloaded (1.43 Kbytes/sec)rnMon Mar 19 20:34:55 2012: Loaded debugee: C:\Users\Ruan\Documents\IAR for arm\Debug\Exe\test1.outrnMon Mar 19 20:34:55 2012: Target resetrnMon Mar 19 20:35:01 2012: Failed to read one or more register values (busy).rn想请问一下大家,当中出现的RTCK is not connected是怎么回事呢?以及最后一句Failed to read one or more register values (busy).也不知道是什么原因,我的linker的配置文件中的内容如下:rn/*###ICF### Section handled by ICF editor, don't touch! ****/rn/*-Editor annotation file-*/rn/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */rn/*-Specials-*/rndefine symbol __ICFEDIT_intvec_start__ = 0x00000000;rn/*-Memory Regions-*/rndefine symbol __ICFEDIT_region_ROM_start__ = 0x0;rndefine symbol __ICFEDIT_region_ROM_end__ = 0x1000;rndefine symbol __ICFEDIT_region_RAM_start__ = 0x30000000;rndefine symbol __ICFEDIT_region_RAM_end__ = 0x34000000;rn/*-Sizes-*/rndefine symbol __ICFEDIT_size_cstack__ = 0x2000;rndefine symbol __ICFEDIT_size_svcstack__ = 0x100;rndefine symbol __ICFEDIT_size_irqstack__ = 0x100;rndefine symbol __ICFEDIT_size_fiqstack__ = 0x100;rndefine symbol __ICFEDIT_size_undstack__ = 0x100;rndefine symbol __ICFEDIT_size_abtstack__ = 0x100;rndefine symbol __ICFEDIT_size_heap__ = 0x8000;rn/**** End of ICF editor section. ###ICF###*/rnrnrndefine memory mem with size = 4G;rndefine region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];rndefine region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];rnrndefine block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ ;rndefine block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ ;rndefine block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ ;rndefine block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ ;rndefine block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ ;rndefine block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ ;rndefine block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ ;rnrninitialize by copy readwrite ;rndo not initialize section .noinit ;rnrnplace at address mem:__ICFEDIT_intvec_start__ readonly section .intvec ;rnrnplace in ROM_region readonly ;rnplace in RAM_region readwrite,rn block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK,rn block UND_STACK, block ABT_STACK, block HEAP ;rn主程序如下:rn#include "Def.h"rn#include "Option.h"rn#include "2440addr.h" rn#include "2440lib.h"rn#include "2440slib.h" rn#define led0_on (rGPBDAT &= ~0x01)rn#define led0_off (rGPBDAT |= 0x01)rn//================================rnvoid delay(U32 tt)rnrn U32 i;rn for(;tt>0;tt--)rn rn for(i=0;i<10000;i++)rn rnrn rnint main(int argc, char **argv)rnrn //mpll_val = (92<<12)|(1<<4)|(1);rn //init FCLK=400M, so change MPLL firstrn //ChangeMPllValue((mpll_val>>12)&0xff, (mpll_val>>4)&0x3f, mpll_val&3);rn //ChangeClockDivider(key, 12);rnrn //ChangeClockDivider(1,1); // 1:2:4 FCLK:HCLK:PCLKrn // rCLKDIVN=0x4; // 1:4:4rn //ChangeMPllValue(82,2,1); //FCLK=135.0Mhzrn //ChangeMPllValue(82,1,1); //FCLK=180.0Mhzrn //ChangeMPllValue(161,3,1); //FCLK=202.8Mhzrn //ChangeMPllValue(117,1,1); //FCLK=250.0Mhzrn //ChangeMPllValue(122,1,1); //FCLK=260.0Mhzrn //ChangeMPllValue(125,1,1); //FCLK=266.0Mhzrn //ChangeMPllValue(127,1,1); //FCLK=270.0Mhzrn rn //MMU_EnableICache();rn //MMU_EnableDCache();rn //MMU_DisableICache();rn //MMU_DisableDCache();rn //rGPBCON = 0x155555;rn rGPBUP=0XFFF;rn rGPBCON=0X05;rn while(1)rn rn led0_on;rn delay(0xfffff);rn led0_off;rn delay(0xfffff);rn rn 希望大家能多给些建议及指导! 论坛

没有更多推荐了,返回首页