java microchip_MPLAB X 3.45 MDB代码覆盖率Java错误

CodecPLAGE输出似乎很好。我已经试着作为管理员运行,但结果相同。这是MDB中的一个bug,还是我在这里做了什么错事?错误消息:MDB命令

以上来自于百度翻译

以下为原文

Information:

OS: Windows 10

MPLAB X version: v3.45

PIC: PIC24FJ64GA204

I've been trying to get the MDB working with code coverage, but ran into an Java error. See below for the error message.

I'm running the MDB with an configuration file, also shown below. Generating the codecoverage output in MPLAB X (using the simulator's settings) seems to work just fine. I've already tried to run as administrator, but same result.

Is this a bug in the MDB or am I doing something wrong here?

Error message:

Programming target...

Resetting SFRs

Resetting peripherals

Program succeeded.

set codecoverage.enabLED "Enabled/Reset on Run"

set codecoverage.enableoutputtofile true

set codecoverage.outputfile "C:\Users\jdebruijn\Documents\GitHub\VSP\codecoverage.txt"

Reset

Resetting SFRs

Resetting peripherals

Sleep 1500

Run

Running

Sleep 5000

Quit

Simulator halted

Stop at

address:0x1e40

>E0108-SIM: Failed simulator operation: java.lang.NullPointerException

com.microchip.mplab.mdbcore.simulator.Simulator.RunTarget(Simulator.java:342)

com.microchip.mplab.mdbcore.debugger.MCDebugger$1.run(MCDebugger.java:352)

java.lang.Thread.run(Thread.java:745)

Exception in thread "Thread-5" java.lang.NullPointerException

at com.microchip.mplab.mdb.debugapi.CodeCoverageReport.GenerateReport(CodeCoverageReport.java:183)

at com.microchip.mplab.mdb.debugapi.CodeCoverageReport.DoReport(CodeCoverageReport.java:123)

at com.microchip.mplab.mdb.debugapi.CodeCoverageReport.access$000(CodeCoverageReport.java:36)

at com.microchip.mplab.mdb.debugapi.CodeCoverageReport$1.run(CodeCoverageReport.java:71)

at java.lang.Thread.run(Thread.java:745)

MDB commands.txt:

Device PIC24FJ64GA204

Hwtool SIM

set oscillator.frequency 8

set oscillator.frequencyunit Mega

set oscillator.rcfrequency 1

set oscillator.rcfrequencyunit Kilo

Set uart1io.uartioenabled true

Set uart1io.output file

Set uart1io.outputfile "C:\Users\jdebruijn\Documents\GitHub\VSP\out.txt"

Program "C:\Users\jdebruijn\Documents\GitHub\VSP\VSP.X\dist\default\production\VSP.X.production.hex"

set codecoverage.enabled "Enabled/Reset on Run"

set codecoverage.enableoutputtofile true

set codecoverage.outputfile "C:\Users\jdebruijn\Documents\GitHub\VSP\codecoverage.txt"

Reset

Sleep 1500

Run

Sleep 5000

Quit

699ba7046c51816a17b33a7caa85f179.png

0

97b4b3417991aabde46fdac613e34292.png

以上来自于百度翻译

以下为原文

Could you please upload your hex file or a hex file that will duplicate this issue so that we could debug and see whether this is a MDB issue or a Simulator issue?

2019-6-10 09:16:21

d6e83965612547db3ff693951622eb97.png

评论

提交评论

以上来自于百度翻译

以下为原文

Thanks for your response! I've added the (zipped) hex file I used as attachment (it is built using xc-16 v1.26).

For other reasons I have reinstalled Windows 10 and got a slightly different output (note the exception in thread-5 is still the same) for some reason. Does mdb uses java that is included with MPLAB or does it uses the system java? I'm trying to guess why the output I get now is slightly different. (I have java version 8u112 installed at the moment.)

Edit:

I think I've just found an error in my mdb commands. I executed "set codecoverage.outputfile" where it should have been "set codecoverage.outputtofile", it makes no difference to the error I'm getting though. Neither is it when I'm doing the set codecoverage commands (before or after the program.

C:\Program Files (x86)\Microchip\MPLABX\v3.45\mplab_ide\bin>mdb C:\Users\jdebruijn\Documents\Git\VSP\command.txt

Device PIC24FJ64GA204

ERROR: Has EDS, but no

content/mplab/mplab.deviceSupport

content/mplab/PluginBoardSupport.xml

Hwtool SIM

Nov 28, 2016 6:38:24 PM java.util.prefs.WindowsPreferences

WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

set oscillator.frequency 8

set oscillator.frequencyunit Mega

set oscillator.rcfrequency 1

set oscillator.rcfrequencyunit Kilo

Set uart1io.uartioenabled true

Set uart1io.output file

Set uart1io.outputfile "C:\Users\jdebruijn\Documents\Git\VSP\out.txt"

Program "C:\Users\jdebruijn\Documents\Git\VSP\VSP.X\dist\default\production\VSP.X.production.hex"

Programming target...

Resetting SFRs

Resetting peripherals

Program succeeded.

set codecoverage.enabled "Enabled/Reset on Run"

set codecoverage.enableoutputtofile true

set codecoverage.outputfile "C:\Users\jdebruijn\Documents\Git\VSP\codecoverage.txt"

Reset

Resetting SFRs

Resetting peripherals

Sleep 1500

Run

Running

Sleep 5000

Quit

Simulator halted

Stop at

address:0x2390

>Exception in thread "Thread-5" java.lang.NullPointerException

at com.microchip.mplab.mdb.debugapi.CodeCoverageReport.GenerateReport(CodeCoverageReport.java:183)

at com.microchip.mplab.mdb.debugapi.CodeCoverageReport.DoReport(CodeCoverageReport.java:123)

at com.microchip.mplab.mdb.debugapi.CodeCoverageReport.access$000(CodeCoverageReport.java:36)

at com.microchip.mplab.mdb.debugapi.CodeCoverageReport$1.run(CodeCoverageReport.java:71)

at java.lang.Thread.run(Thread.java:745)

Attachment(s)

VSP.X.production.zip (13.12 KB) - downloaded 45 times

2019-6-10 09:32:17

d6e83965612547db3ff693951622eb97.png

评论

提交评论

以上来自于百度翻译

以下为原文

Thank you for reporting this bug. We confirmed that this is a MDB issue in the code coverage function. Yes, it needs to be "set codecoverage.outputtofile". The NullPointerException is thrown during generating code coverage report which is before outputting the report to the file. I already created an SSR to keep track of this issue.

2019-6-10 09:39:17

d6e83965612547db3ff693951622eb97.png

评论

提交评论

以上来自于百度翻译

以下为原文

Thanks! Am I correct to think that this will be fixed in a new (the next?) release of MPLAB X?

2019-6-10 09:47:26

d6e83965612547db3ff693951622eb97.png

评论

提交评论

以上来自于百度翻译

以下为原文

We already branched for the next release MPLAB X v3.50 and we are still working on the fix of this problem, so hopefully the fix will be in MPLAB X v3.55.

2019-6-10 09:58:05

d6e83965612547db3ff693951622eb97.png

评论

提交评论

以上来自于百度翻译

以下为原文

We took a closer look at this issue. We noticed that you were using the hex file. The hex file does not contain debug information, so code coverage does not get the expected information and throws the NullPointerException. Please try again with the elf file (or the cof file if it doesn't generate the elf file) if you need to do code coverage with MDB.

2019-6-10 10:10:58

d6e83965612547db3ff693951622eb97.png

评论

提交评论

以上来自于百度翻译

以下为原文

I'm indeed were using the hex file as I didn't know any better. I've just changed that to the .elf file and it worked like a charm (almost). The code coverage file gets generated as expected, however the simulation is halted and stopped (might just be the normal simulation ending..) with an error and there is still a warning at the top of the simulation.

Although it is working I would still like to know of the warning and error I'm getting are normal to have (or it's some bug or fault I made in the build process or something). FYI: I'm normally compiling the code in MPLAB X using the XC16 compiler, as far as I know, without any particular option for code coverage set.

(Simulation output, .hex and .elf files and the rest of the files are attached, if you'd be so kind to have a look at it.

Another thing, do you have any recommendations for using/visualizing the code coverage output like this? (I haven't, yet, had the time to look on the internet for an good tool to get code coverage in % and visualize, or just print, the parts of the code that were not run. )

Anyhow thanks a lot for pointing me out to (my stupid) using the .elf file instead of the .hex file!

1. ERROR: Has EDS, but no

2. WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

3. Quit

Simulator halted

Stop at

address:0x24e0

>E0108-SIM: Failed simulator operation: java.lang.NullPointerException

com.microchip.mplab.mdbcore.simulator.Simulator.RunTarget(Simulator.java:342)

com.microchip.mplab.mdbcore.debugger.MCDebugger$1.run(MCDebugger.java:352)

java.lang.Thread.run(Thread.java:745)

Attachment(s)

Simulation_err.zip (74.40 KB) - downloaded 45 times

2019-6-10 10:25:42

d6e83965612547db3ff693951622eb97.png

评论

提交评论

以上来自于百度翻译

以下为原文

The first one is a message from our database file handling; the second one is a Java issue; and the third one is a bug in dismissing the Simulator which will be fixed in MPLAB X v3.55. All of them should not affect any operations and the results, so you don't have to worry about them.

2019-6-10 10:31:36

d6e83965612547db3ff693951622eb97.png

评论

提交评论

以上来自于百度翻译

以下为原文

I am also have a Java null pointer problem since updating to 3.45, however, it occurs when just trying to use DEBUG mode with my REAL ICE.  Assembly project (no C).  As soon as the DEBUG MAIN PROJECT button is selected I see a red (1) in the lower right corner of the display that shows as:

java.lang.NullPointerException

at com.microchip.mplab.nbide.simdisplays.stimulus.models.RegInjectTableModel.refreshGPRsAndProgLabels(RegInjectTableModel.java:569)

at com.microchip.mplab.nbide.simdisplays.stimulus.ui.RegInjectPanel.handleProjectBuild(RegInjectPanel.java:292)

at com.microchip.mplab.nbide.simdisplays.stimulus.StimulusTopComponent.refreshPagesAfterProjectBuild(StimulusTopComponent.java:304)

at com.microchip.mplab.nbide.simdisplays.stimulus.StimulusTopComponent.Update(StimulusTopComponent.java:753)

at com.microchip.mplab.util.observers.Observable$1.run(Observable.java:31)

[catch] at java.lang.Thread.run(Thread.java:745)

I created a brand new project and imported the assembly files to it with the same results.  I have never had an issue with REAL ICE until upgrading.  I can debug, but break points end up being in random locations (like in the middle of a comment block) and single stepping then steps through the comments (although the PROGRAM MEMORY location shows it as being real code - and the wrong code from where a break point is set).  Yes, I rebooted the machine, uninstalled MPLABX3.45, re-installed it, etc.. the usual steps when odd things happen.

Any ideas?

2019-6-10 10:50:20

d6e83965612547db3ff693951622eb97.png

评论

提交评论

以上来自于百度翻译

以下为原文

@JimDrew

I suggest you start a new topic for your problem, since this is solved you might get more reactions that way.

2019-6-10 10:59:35

d6e83965612547db3ff693951622eb97.png

评论

提交评论

以上来自于百度翻译

以下为原文

Thanks, will do.

2019-6-10 11:05:13

d6e83965612547db3ff693951622eb97.png

评论

提交评论

以上来自于百度翻译

以下为原文

Actually... looking at this exception stack trace it looks like the stimulus display is throwing the exception.  Since you are using Real ICE, maybe just close the stimulus display?

2019-6-10 11:21:16

d6e83965612547db3ff693951622eb97.png

评论

提交评论

只有小组成员才能发言,加入小组>>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值