完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
伙计们,我是一个非常有经验的嵌入式工程师,他们主要从事武器和AVRs,但是已经被要求在PIC24FJ64 GA306上做一点,向一个现存的项目添加一些代码。我在自由模式下使用XC16编译器。我连接了ICD3,可以编程使它运行的代码。但是,当我尝试调试时,我得到了:我在CPU中有以下的语法:有人知道这可能是什么吗?我已经使用了MPLAX X一点,但它是几年前,所以假设我是新手需要手握的乐趣。BTW,我尝试JTAGEN = on,但没有帮助。多谢:
以上来自于百度翻译 以下为原文 Folks, I'm a very experienced embedded engineer who mostly deals in ARMs and AVRs, but have been asked to do a bit on a PIC24FJ64GA306, to add some code to an exsiting project. I'm using the XC16 compiler in free mode. Product Version: MPLAB X IDE v4.01 Java: 1.8.0_141; Java HotSpot(TM) 64-Bit Server VM 25.141-b15 Runtime: Java(TM) SE Runtime Environment 1.8.0_141-b15 System: Windows 7 version 6.1 running on amd64; Cp1252; en_GB (mplab) User directory: C:UsersrjwAppDataRoamingmplab_idedevv4.0 I have the ICD3 connected and can program the code getting it to run. However, when I try to debug I get this: The following memory area(s) will be programmed: program memory: start address = 0x0, end address = 0x37ff configuration memory Debug Executive Address: 800000 Expected Value: 40100 Received Value: 40080 Failed to program device I have the following pragmas in cpu.c: #pragma config DSWDTPS = DSWDTPS1F // deep sleep watchdog: 25.7 days #pragma config DSWDTOSC = LPRC // deep sleep watchdog clock source #pragma config DSBOREN = ON // deep sleep brownout enabled #pragma config DSWDTEN = OFF // deep sleep watchdog disabled #pragma config DSSWEN = OFF // deep sleep disabled #pragma config FWDTEN = WDT_DIS // WDT disabled #pragma config WDTPS = PS32768 // 1:32768 WDT postscaler #pragma config FWPSA = PR32 // 1:32 WDT prescaler #pragma config WDTWIN = PS50_0 // WDT window is 50 percent #pragma config WINDIS = OFF // standard WDT (i.e. not windowed) #pragma config VBTBOR = OFF // Vbat BOR disabled (we use HLVD instead) #pragma config BOREN = OFF // BOR disabled (we use HLVD instead) #pragma config BOREN1 = DIS // BOR disabled (we use HLVD instead) #pragma config GWRP = OFF // general segment write protect disabled #pragma config GCP = ON // general segment code protect enabled #pragma config WPDIS = WPEN // segment write protection enabled #pragma config WPEND = WPSTARTMEM // write protect from page 0 (0x0000)... #pragma config WPFP = WPFP39 // ...to end of page 39 (0x9ffe) #pragma config WPCFG = WPCFGEN // last page and config bits write protected #pragma config POSCMD = NONE // primary oscillator disabled #pragma config SOSCSEL = OFF // no SOSC fitted #pragma config OSCIOFCN = ON // RC15 is gpio #pragma config FCKSM = CSECME // clock switching and failsafe monitor enabled #pragma config FNOSC = FRC // FRC selected initially #pragma config IESO = OFF // internal external switchover disabled #pragma config IOL1WAY = OFF // IOLOCK can be modified #pragma config ALTVREF = DLT_AV_DLT_CV // A9/A10 as Avref, CVref #pragma config ICS = PGx1 // emulator functions shared with PGE[CD]1 #pragma config JTAGEN = OFF // jtag port disabled #pragma config LPCFG = OFF // low power regulator control disabled Does anyone know what this might be please? I have used MPLAB X a little but it was a few years ago, so assume I'm a newbie that needs hand-holding please. BTW, I tried JTagen = on, but that did not help. Many thanks :) |
|
相关推荐
6个回答
|
|
ICS=PGX1是调试器连接到的引脚吗?
以上来自于百度翻译 以下为原文 ICS = PGx1 Is that the pins the debugger is connected to? |
|
|
|
ICSPYLCK连接到RB1/SEG6/PGEC1和ICSPYDAT到RB0/PGED1,所以我认为是的,是的。然而,我很高兴被告知我错过了一些东西。我想如果这是不对的,它甚至不会计划。
以上来自于百度翻译 以下为原文 ICSP_CLK is connected to RB1/SEG6/PGEC1 and ICSP_DAT to RB0/PGED1, so I think so, yes. However, I am happy to be told I have missed something. I'd've thought that if that wasn't right it wouldn't even program? |
|
|
|
排序。我这样做:5000 02081B.PDF是一个有用的文档。
以上来自于百度翻译 以下为原文 Sorted. I did this: #ifdef ICD #pragma config GCP = OFF // general segment code protect enabled #pragma config WPDIS = WPDIS // segment write protection enabled #else #pragma config GCP = ON // general segment code protect enabled #pragma config WPDIS = WPEN // segment write protection enabled #pragma config WPEND = WPSTARTMEM // write protect from page 0 (0x0000)... #pragma config WPFP = WPFP39 // ...to end of page 39 (0x9ffe) #pragma config WPCFG = WPCFGEN // last page and config bits write protected #endif 50002081B.pdf is a useful document. |
|
|
|
是的,它将编程不管:无论是正确的还是不正确的,ICSP编程都将与任何一对PGD和PGC引脚相连。调试取决于在配置位中正确定义的ICS=PGX,因此NK的问题完全相关。振荡器也必须用于调试。ICSP硬件强制它自己的振荡器设置。配置设置显示:FNOSc= FRC内部振荡器,这通常是调试调试的良好设置。JTAG设置不重要。JTAG是一种不同的协议,使用ICSP中的单独的PIN。有一些代码保护和写保护设置被设置为ON,例如:GCP= ON//通用段代码保护EnabelDe: WPDIS= WPEN//段写保护启用和:WPCFG= WPCFGEN//STEP页和配置位写入保护。我会把所有的保护位留给开发调试。MysilEdit:你已经知道了。
以上来自于百度翻译 以下为原文 Yes, It would Program regardless of: #pragma ICS = PGx? beeing correct or not. ICSP programming will function with connection to any pair of PGD and PGC pins. Debugging depend upon ICS = PGx beeing correctly defined in Configuration bits, so the question from NK is entirely relevant. Also Oscillator must function for debugging to take place. For programming, ICSP hardware force it's own settings for oscillator. Configuration settings show: FNOSC = FRC Internal oscillator, that is usually a good setting to get debugging started. JTAG setting should not matter. JTAG is a different protocol, and use separate pins from ICSP. There are some Code Protect and Write Protect settings set to ON, e.g.: GCP = ON // general segment code protect enabled and: WPDIS = WPEN // segment write protection enabled and: WPCFG = WPCFGEN // last page and config bits write protected. I would leave all those protection bits OFF for development debugging. Mysil Edit: As you have found out already. |
|
|
|
HI,JTAG配置位必须始终设置为OFF…否则,某些引脚将不能用作GPIO或任何其他功能。如在ICS选择注释中所写,ICS配置位选择ICS的调试对(不是编程),它将总是以编程方式成功。无论选择哪种ICS对,都要阻止PIC的砖块;=)假设你选择了错误的调试/编程对。然后,你的工具总是连接到同一对,将无法重新编程的PIC…所以实际上,所有的IC对在编程过程中是活跃的;
以上来自于百度翻译 以下为原文 Hi, JTAG configuration bit must always be set to off...otherwise some pins will not be usable as GPIO or any other function. As written in the comments of ICS selection, the ICS configuration bit select the debugging pair (not the programming) For ICS, the fact that it will always succed with programming whatever ICS pair was selected prevent to brick the PIC ;=) Imagine that you select the wrong debugging/programming pair. ..Then your tool which is always connected to the same pair, would not be able to reprogram the PIC... So actually, all ICS pairs are active during programming ;=) Regards |
|
|
|
如果调试会话处于活动状态,则由MPLab添加。
以上来自于百度翻译 以下为原文 __DEBUG is added by MPLab if a Debugging session is active. |
|
|
|
只有小组成员才能发言,加入小组>>
5237 浏览 9 评论
2026 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3201 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
772浏览 1评论
662浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
590浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
672浏览 0评论
572浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 15:10 , Processed in 1.579917 second(s), Total 87, Slave 71 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号