• AVR Freaks

Helpful ReplyHot!MPLABX Register Logging

Author
teenix
Junior Member
  • Total Posts : 69
  • Reward points : 0
  • Joined: 2017/12/21 13:47:21
  • Location: Australia, Melbourne
  • Status: offline
2020/08/09 14:15:04 (permalink)
0

MPLABX Register Logging

Hi all,
 
I have an application that can generate hundreds of hundreds of different codes based on input values.
 
I would like to set up some test code to run through every input combination and see that the outputs are correct. This would be a time consuming task to do manually, so I was wondering if MPLABX has the ability to log register values to (say) a text file when a certain address is executed in code.
 
cheers
 
Tony
#1
atferrari
Super Member
  • Total Posts : 1450
  • Reward points : 0
  • Joined: 2004/07/08 13:09:24
  • Location: Buenos Aires - Argentina
  • Status: offline
Re: MPLABX Register Logging 2020/08/09 14:39:08 (permalink)
0
Send them to Excel and process the bunch there.

Agustín Tomás

In theory, there is no difference between theory and practice. In practice, however, there is.

http://cablemodem.fibertel.com.ar/atferrari/
#2
ric
Super Member
  • Total Posts : 28403
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: MPLABX Register Logging 2020/08/09 15:14:35 (permalink)
+2 (2)
You don't mention which PIC family this is.
Some of the bigger one's can be monitored in real time, but most can't.
The simplest option is to modify your code to output the information via a UART, and capture that in a PC.
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#3
dan1138
Super Member
  • Total Posts : 3852
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: MPLABX Register Logging 2020/08/09 15:39:15 (permalink)
+2 (2)
teenix
I have an application that can generate hundreds of hundreds of different codes based on input values.
 
I would like to set up some test code to run through every input combination and see that the outputs are correct.

In today's jargon this is sometimes called a unit test.
 
If your aim is to validate the complete hardware and firmware integration then ric's suggestion is perhaps the only practical solution.
 
If the MPLABX simulation tool was not such a work in progress (crap) doing a unit test in simulation is preferred as these kinds of tests can be run automatically where the input and output can be verified against know good results.
post edited by dan1138 - 2020/08/10 00:33:24
#4
andersm
Super Member
  • Total Posts : 2840
  • Reward points : 0
  • Joined: 2012/10/07 14:57:44
  • Location: 0
  • Status: online
Re: MPLABX Register Logging 2020/08/09 21:54:19 (permalink) ☄ Helpfulby Jim Nickerson 2020/08/10 09:15:16
+3 (3)
Compile the code-generating part to run on your PC, and run the test there.
#5
Jump to:
© 2020 APG vNext Commercial Version 4.5