#319 Piklab and gpsim 0.24.0 incompatibility (fix included)

open
GPSim (9)
5
2013-01-01
2013-01-01
Onno Hommes
No

After trying trying to work with gpsim 0.24.0 (in piklab version 0.16.2) I noticed an incompatibility for the version of gpsim. A simple fix in GPSim::Debugger::readWreg will fix this (see line below FIXME) and allow you to use gpsim 0.24.0 (in file gpsim_debug.cpp): .

bool GPSim::Debugger::readWreg(BitValue &value)
{
// #### only known for version 4 and 11
// FIXME if ( hardware()->version()<=VersionData(0, 21, 7) || hardware()->version()>=VersionData(0, 22, 0) )
if ( hardware()->version()<=VersionData(0, 21, 7) || hardware()->version()>VersionData(0, 24, 0) )
return getRegister("W", value);
QStringList lines;
if ( !hardware()->execute("dump s", true, &lines) ) return false;
QString w = (_coff->symbol("_WREG") ? "_WREG" : "W");
QString s;
if ( !findRegExp(lines, "^\\s*[0-9A-Fa-f]+\\s+(\\w+)\\s*=\\s*([0-9A-Fa-f]+)", w, s) ) {
log(Log::LineType::Error, i18n("Error reading register \"%1\"").arg(w));
return false;
}
value = fromHex(s, 0);
return true;

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks