gnupic: Thread: piklab-prog - crash while programming a 12F510


[<<] [<] Page 1 of 1 [>] [>>]
Subject: piklab-prog - crash while programming a 12F510
From: "Scott Dattalo" ####@####.####
Date: 30 Sep 2007 17:24:11 +0100
Message-Id: <61862.71.139.35.208.1191169444.squirrel@ruckus.brouhaha.com>

It's been a while, but I'm starting to do some Pic stuff again. I've had
an ICD2 for a long time, but haven't needed it until now. But, since my
PicStart+ doesn't support the 12F510 it looks like it's time for me to
switch over. I downloaded piklab from SVN, built it and installed it. So
far so good. I also successfully read a .hex file from my target device. I
also successfully erased the target device. However when I program the
target, it fails:

$ piklab-prog --version
piklab-prog: version 0.14.5 (rev. 2220)
Qt: 3.3.7
KDE: 3.5.5-0.2.fc6 Fedora-Core
Piklab Programmer Utility: 0.14.5

$ piklab-prog -c program -p icd2 -d 12F510 angio.HEX
piklab-prog: version 0.14.5 (rev. 2220)
Session management error: Authentication Rejected, reason : None of the
authentication protocols specified are supported and host-based
authentication failed
programmer: icd2
device: 12F510
Using port from configuration file.
ASSERT: "mask" in pic_memory.cpp (282)

And the back trace:

Using host libthread_db library "/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 46912498480144 (LWP 16448)]
[KCrash handler]
#5  0x000000000048143e in QValueVector<Pic::Config::Value>::size (this=0x10)
    at /usr/lib64/qt-3.3/include/qvaluevector.h:299
#6  0x000000000048145d in QValueVector<Pic::Config::Value>::count (this=0x10)
    at /usr/lib64/qt-3.3/include/qvaluevector.h:467
#7  0x000000000047f887 in Pic::Memory::hasFlagOn (this=0x24a4460,
    maskName=@0x7fff9bf8ef20) at pic_memory.cpp:283
#8  0x0000000000488026 in Pic::Memory::hasDebugOn (this=0x24a4460)
    at pic_memory.h:45
#9  0x0000000000483381 in Programmer::PicBase::checkProgram (this=0x296cff0,
    memory=@0x24a4460) at pic_prog.cpp:563
#10 0x0000000000456355 in Programmer::Base::doProgram (this=0x296cff0,
    memory=@0x24a4460, range=@0xb81380) at generic_prog.cpp:340
#11 0x00000000004555f4 in Programmer::Base::program (this=0x296cff0,
    memory=@0x24a4460, range=@0xb81380) at generic_prog.cpp:333
#12 0x0000000000452f11 in Programmer::Manager::program (this=0xb813a0,
    memory=@0x24a4460, range=@0xb81380) at prog_manager.cpp:85
#13 0x0000000000411724 in CLI::Main::executeCommand (this=0x7fff9bf8f3d0,
    command=@0x7fff9bf8f2d0) at cmdline.cpp:293
#14 0x0000000000472626 in CLI::MainBase::doRun (this=0x7fff9bf8f3d0)
    at cli_main.cpp:219
#15 0x00000000004124b3 in main (argc=8, argv=0x7fff9bf8f568) at
cmdline.cpp:460


I poked around a little. Line 282 of pic_memory.cpp is the first Q_ASSERT
in the code snippet below:

bool Pic::Memory::hasFlagOn(const QString &maskName) const
{
  const Config::Mask *mask = device().config().findMask(maskName, 0);
  Q_ASSERT(mask);
  Q_ASSERT( mask->values.count()==2 );
  return ( findValue(maskName)=="On" );
}

The assert fails because 'mask' is 0. The maskName being searched is
"DEBUG". Obviously, findMask() is unable to find this mask. So presumably
the "DEBUG" mask is not being added to the list of masks.

Any ideas on how to get around this?

Thanks,
Scott
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.