完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我有一个“PIC32 MX1/2/5启动工具包”,一个“启动工具包I/O扩展板”和一个J-Link探测器。我在Windows 10上使用MPLAB X和V2Y02Y0B。我正在用一个Bootloader来创建一个Bootloader。我有一个关于启动板的问题:当我用USB链接(启动器套件)编程我的板时,所有的工作都很好。但是,当我用JTAG链接编程我的板时,代码N即使在动力循环之后也会自动启动。我必须做一个“重置”和“运行”命令到SEGGER实用程序。在一个电源周期之后,当我在软件“SEGGER指挥官”中发送一个命令“停止”时,代码会转到地址0x480(O.dBGGExpPtiAdADDR)。当我用MPLAX调试时,所有的工作都很好。有人知道吗?我遇到问题的根源是什么?我该怎么做才能继续调查呢?最好的问候
以上来自于百度翻译 以下为原文 Hi, I have a "PIC32MX1/2/5 Starter Kit", a "Starter Kit I/O Expansion Board" and a J-link probe. I'm using MPLAB X with HARMony v2_02_00b on Windows 10. I'm flashing a Bootloader that I generated with Harmony. I have a matter regarding the start up of the board: - When I program my board using the USB link (starter kit), all works fine. - But when I program my board using the JTAG link, the code never start automatically even after a power cycle. (I have to do a “reset” and a “run” commands into the Segger utility.) After a power cycle, when I send a command “halt” in the software "Segger commander", the code goes at the address 0x480 (_DBG_EXCPT_ADDR). When I'm debugging with MPLAX all works fine again. Does anyone have any idea of the origin of the problem I encounter? What can I do to continue investigating? Best regards Attached Image(s) Attachment(s) btl_mx.txt (13.88 KB) - downloaded 121 times |
|
相关推荐
11个回答
|
|
听起来你总是在调试模式下编程芯片,从不释放模式。这意味着没有调试器连接就不能运行。
以上来自于百度翻译 以下为原文 It sounds like you are always programming the chip in debug mode, never release mode. That means it won't run without the debugger connected. |
|
|
|
调试模式或发布模式……MPLAB X如何更改这些模式??
以上来自于百度翻译 以下为原文 debug mode OR release mode... How change these mode in MPLAB X ?? |
|
|
|
你好,请使用这个网站:HTTP://www. McCHIPPrimeRe.com有非常详细的教程关于MPLAB XONE
以上来自于百度翻译 以下为原文 Hi, Please use this website : http://www.microchipdeveloper.com It has very detailed tutorials about MPLAB X Regards |
|
|
|
感谢QHB。我已经在发布模式编译了。我使用按钮“制作和编程设备主项目”。
以上来自于百度翻译 以下为原文 Thanks qhb. I'm already compiling in release mode. I use the button "Make and programm device main project". |
|
|
|
您是否确定在配置设置中没有设置调试位?微芯片工具将在释放模式下关闭它,但SEGGER实用程序可能不会。
以上来自于百度翻译 以下为原文 Have you made sure you don't have the debug bit set in your CONFIG settings? The Microchip tools will force it off in release mode, but the Segger utility probably doesn't. |
|
|
|
首先,我认为我的配置设置是正确的,因为我在我的代码中设置了调试。但是因为我同意当你说它总是在调试模式下时,我做了进一步的调查。我在“发布”模式和我的RealDeFrg0寄存器(通过UART将它发送到我的PC)中闪现了我的应用程序。我观察到,位1被设置为1,这意味着调试器被禁用。此后,我在“调试”模式中闪烁了我的应用程序,并且再次读取了ReDeVCFG0。我读取与“释放”模式相同的值,这意味着调试器被禁用。调试模式下如何调试禁用?我很困惑。我使用MPLABX和Sigger-JLink插件。当你说Microchip工具会强制它时,你知道它是在编译时生成的二进制文件还是使用MPLABX闪存代码?感谢QHB的帮助。
以上来自于百度翻译 以下为原文 First of all, I think my CONFIG settings are right because I set debug to off in my code. #pragma config DEBUG = OFF // Background Debugger Enable (Debugger is disabled) But since I agree when you say it seems always in debug mode, I made further investigation. I flashed my application in "release" mode and I read DEVCFG0 register (by sending it to my PC by UART). I observed that bit 1 is set to 1, which means debugger is disabled. After that, I flashed my application in "debug" mode and I read DEVCFG0 again. I read the same value as in "release" mode, which means debugger is disabled. How can debug be disabled in debug mode ? I am puzzled. I’m using MPLABX with SEGGER JLINK plugin. When you say that Microchip tools will force it, do you know if it is in the binary file generated at compilation or when you flash the code using MPLABX? Thanks qhb for your help. |
|
|
|
当代码闪现到芯片中时,微芯片工具将调试位强制到所需状态。我不知道Siggver插件是否做同样的事情。
以上来自于百度翻译 以下为原文 When the code is flashed into the chip, the Microchip tools force the debug bit to the required state. I have no idea if the Segger plugin does the same thing. |
|
|
|
当代码闪现到芯片中时,微芯片工具将调试位强制到所需状态。我不知道Siggver插件是否做同样的事情。
以上来自于百度翻译 以下为原文 When the code is flashed into the chip, the Microchip tools force the debug bit to the required state. I have no idea if the Segger plugin does the same thing. |
|
|
|
如何知道调试位的状态?我认为它是DEVCFG0位1,但它似乎总是在1(调试关闭)。要联系SEGGER,我需要一个证据。
以上来自于百度翻译 以下为原文 How can I know the state of the debug bit ? I think it is DEVCFG0 bit 1 but it seems to be always at 1 (debug off). To contact SEGGER, I will need a proof. |
|
|
|
QHB是正确的。调试位不在所需的状态。我在第一次尝试时没有发现它,因为它似乎是一个微芯片数据表上的错误:在数据表PIC32 MX1XX/2XX/5XX 64 /100-PIN系列中,DeVCFG0调试和lt;1:0gt;被描述为:DATCFATE PIC32 MX系列参考手册,DeVCFG0调试& lt;描述为:正确的数据表是“家庭参考手册”,我在看“64 /100引脚族”。这解释了为什么我认为我的PIC32总是处于调试模式。作为结论,DeVCFG0调试位总是处于“启用调试器”状态。这就是为什么PIC不会自行启动的原因。我将联系SEGGER,了解如何设置调试位。
以上来自于百度翻译 以下为原文 qhb is right. The debug bits aren't in the required state. I didn't find it at first try because it seems to be an error on a Microchip datasheet : On datasheet PIC32MX1XX/2XX/5XX 64/100-PIN FAMILY, DEVCFG0 DEBUG<1:0> is described as : On datatsheet PIC32MX Family Reference Manual, DEVCFG0 DEBUG<1:0> is described as : The correct datasheet is "Family Reference Manual" and I was looking at "64/100-PIN Family". That explains why I thought my PIC32 was always in debug mode. As a conclusion, DEVCFG0 DEBUG bits are always in state "debugger enabled". That's the reason why the PIC doesn't start by itself. I will contact SEGGER to have more détails on how debug bits are set. |
|
|
|
下面是SEGGER支持的答案。我将联系Microchip支持。但是,我找到了解决这个问题的方法。将手动调试配置位设置为0B11(而不是打开或关闭)解决问题。
以上来自于百度翻译 以下为原文 Here is the answer of SEGGER support. I will take contact with Microchip support. However, I found a workaround to this problem. Setting manually DEBUG config bits to 0b11 (instead of ON or OFF) solve the problem. #pragma config DEBUG = 3 |
|
|
|
只有小组成员才能发言,加入小组>>
5248 浏览 9 评论
2036 浏览 8 评论
1956 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3217 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2264 浏览 5 评论
786浏览 1评论
677浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
602浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
684浏览 0评论
581浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-26 23:56 , Processed in 1.495586 second(s), Total 99, Slave 82 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号