Got my BDM this week and I'm trying it out today. Tested USBDMs HCS12_FlashProgrammer first on winxp (32bit) and seems to work ok. On ubuntu (12.10 32bit) there is a problem. After the install with this "no cw" script the program starts, but gives an error:
Code: Select all
* Error loading devices
Failed to load device database
Reason: DeviceXmlParser::parseSecurity() - illegal size in securityInfo = 16
Current device = Shared data
The DeviceData folder and files are ok. Used both binary and source dist ones and they are ok. No difference between them. Compiled a new programmer from source, but still the same problem. Checked the parseSecurity method and hardcoded the value to 16 to test things out. Worked, but now gives a similar error concerning check address or some shit...
Turns out the string value from xml to unsigned long conversion in causing this. Looked into the parser code and there are two strToULong methods separated by a preprocessor #if 0. Switched to the other one and it's way too broken to use...
What the method does is only the conversion:
Code: Select all
unsigned long value_t = strtoul(start, &end_t, 0);
Code: Select all
if ((ULONG_MAX == value_t) && ERANGE == errno) { // too large
printf("strToULong() - Number too large\n");
return false;
}
Code: Select all
// errno = 0;
It works. Everything is ok now. Devicedata is parsed ok, etc... Just wondering if anyone else if experiencing this? Why is this left in this kind of condition without people noticing? Weird... or is it just me?