Saturday, June 25, 2011

Bit by the Beta

Back on the Sensor Project

So, I haven't talked about the sensor project for a while which was the whole reason I started this blog. Well, I'm ready to get back into it. First, I've decided not to continue with the screencasts although I would consider doing them again if a demand arises. For now they just consume a lot of time that I could be spending on designing, implementing, and documenting the platform. I want to share as much as I can about the design and implementation process so that others can learn and help me to learn. If you see something that you don't agree with or have a better idea, by all means, let me know. The more collaboration the better.

The Beta Strikes Again

I've been preparing several blog posts about the implementation of the bootloader for the platform which I'll be posting shortly in the future but felt like I should post this first. I was happily cruising along on my new Linux dev box and feeling pretty good about things. Cranking out some C code and got to that first debug moment. I created a simple test in code to see if my flash memory routines were working correctly and it turns out they weren't......or were they? I spent hours and hours trying to debug my code and try different things. Have you ever had one of those moments when you swear you are right and the machine is wrong but then talk some sense into yourself because "the computer only does what I tell it to do"? I reached that point. Finally, I was convinced that I was doing everything right and the thought hit me; "MPLABX is still beta software. Maybe I've found a problem." I pulled my code over to my trusty Windows machine and created a project in MPLAB 8 and built. I compared the hex file to the MPLABX version and they were identical. At least the compilers agreed. The problem appears to be in the Simulator. My test works as expected in MPLAB 8 but has erratic Simulator behavior in MPLABX.

Now What?

I was really excited to do all of my development work on Ubuntu with MPLABX. MPLABX is quite an improvement and has a TON of features I've always wanted in MPLAB. The fact that the compiled hex files are the same between the platforms tells me that if I program a PIC from my dev machine it will work fine but how will I know things work? I like to do as much simulation as possible before I start programming chips because once you get into the hardware the bugs are a lot harder to track down. The fact is, I need the Simulator to work reliably so that makes MPLABX on Ubuntu a no-go for me right now. Perhaps I'll look into MPLAB 8 under Wine. I'm not ready to let my Ubuntu dev box dreams go down the drain.

No comments:

Post a Comment

Keep it clean and civil. That's all I ask.