improved debugging output

This commit is contained in:
Fredrik Osterlind 2012-05-23 12:27:37 +02:00
parent af62e48103
commit ddef6c6b76

View file

@ -459,28 +459,28 @@ public class ContikiMoteType implements MoteType {
if (dataSectionAddr >= 0) { if (dataSectionAddr >= 0) {
logger.info(getContikiFirmwareFile().getName() + logger.info(getContikiFirmwareFile().getName() +
": data section at 0x" + Integer.toHexString(dataSectionAddr) + ": data section at 0x" + Integer.toHexString(dataSectionAddr) +
" (" + dataSectionSize + " bytes)"); " (" + dataSectionSize + " == 0x" + Integer.toHexString(dataSectionSize) + " bytes)");
} else { } else {
logger.fatal(getContikiFirmwareFile().getName() + ": no data section found"); logger.fatal(getContikiFirmwareFile().getName() + ": no data section found");
} }
if (bssSectionAddr >= 0) { if (bssSectionAddr >= 0) {
logger.info(getContikiFirmwareFile().getName() + logger.info(getContikiFirmwareFile().getName() +
": BSS section at 0x" + Integer.toHexString(bssSectionAddr) + ": BSS section at 0x" + Integer.toHexString(bssSectionAddr) +
" (" + bssSectionSize + " bytes)"); " (" + bssSectionSize + " == 0x" + Integer.toHexString(bssSectionSize) + " bytes)");
} else { } else {
logger.fatal(getContikiFirmwareFile().getName() + ": no BSS section found"); logger.fatal(getContikiFirmwareFile().getName() + ": no BSS section found");
} }
if (commonSectionAddr >= 0) { if (commonSectionAddr >= 0) {
logger.info(getContikiFirmwareFile().getName() + logger.info(getContikiFirmwareFile().getName() +
": common section at 0x" + Integer.toHexString(commonSectionAddr) + ": common section at 0x" + Integer.toHexString(commonSectionAddr) +
" (" + commonSectionSize + " bytes)"); " (" + commonSectionSize + " == 0x" + Integer.toHexString(commonSectionSize) + " bytes)");
} else { } else {
logger.info(getContikiFirmwareFile().getName() + ": no common section found"); logger.info(getContikiFirmwareFile().getName() + ": no common section found");
} }
if (readonlySectionAddr >= 0) { if (readonlySectionAddr >= 0) {
logger.info(getContikiFirmwareFile().getName() + logger.info(getContikiFirmwareFile().getName() +
": readonly section at 0x" + Integer.toHexString(readonlySectionAddr) + ": readonly section at 0x" + Integer.toHexString(readonlySectionAddr) +
" (" + readonlySectionSize + " bytes)"); " (" + readonlySectionSize + " == 0x" + Integer.toHexString(readonlySectionSize) + " bytes)");
} else { } else {
logger.warn(getContikiFirmwareFile().getName() + ": no readonly section found"); logger.warn(getContikiFirmwareFile().getName() + ": no readonly section found");
} }
@ -494,7 +494,7 @@ public class ContikiMoteType implements MoteType {
try { try {
/* Relative <-> absolute addresses offset */ /* Relative <-> absolute addresses offset */
int referenceVar = (Integer) addresses.get("referenceVar"); int referenceVar = addresses.get("referenceVar");
myCoreComm.setReferenceAddress(referenceVar); myCoreComm.setReferenceAddress(referenceVar);
} catch (Exception e) { } catch (Exception e) {
throw (MoteTypeCreationException) new MoteTypeCreationException( throw (MoteTypeCreationException) new MoteTypeCreationException(
@ -634,7 +634,7 @@ public class ContikiMoteType implements MoteType {
nrNew++; nrNew++;
addresses.put(symbol, new Integer(address)); addresses.put(symbol, new Integer(address));
} else { } else {
int oldAddress = (Integer) addresses.get(symbol); int oldAddress = addresses.get(symbol);
if (oldAddress != address) { if (oldAddress != address) {
/*logger.warn("Warning, command response not matching previous entry of: " /*logger.warn("Warning, command response not matching previous entry of: "
+ varName);*/ + varName);*/