I had the same problem on micaz platform. It seems that this test is
specific to the MSP430 platform where the user code is located after the
bootloader. In the case of ATmega128 processor the bootloader is at the
end of the memory and can't thus be followed by anything. The test
should rather be with 0 (start of memory).
I also had some problem with the modifications between 1.1 and 1.2.
The first two calls to ExtFlash.startRead() in programImage are not
separated by a call to ExtFlash.stopRead() and leads, in my case, to
read corrupted data for the first 68 bytes (strange number, but I
understood why). A call to ExtFlash.stopRead() before the while loop
fixes the problem.
Ludovic
I thought I would post an update. I have been able to get Deluge working
fine by downloading revision 1.1 of TOSBootM.nc and compiling TOSBoot
using this file. The latest revision of TOSBootM.nc is v1.4, when I
compile using this file I can inject a program and issue a reboot, but
it will not reboot properly. I found that it fails in the programImage
function at the following line, which apparently checks that the image
starts on the correct boundary.
if (intAddr != TOSBOOT_END) {
call ExtFlash.stopRead();
return R_INVALID_IMAGE_ERROR;
}
I found the following comment in CVS when revision 1.3 was added:
fail if the program image starts at the wrong address
(program too small or compiled for a different bootloader/revision)
Does this mean that I am compiling my program wrongly or something? I
have updated all of the /lib/Deluge (and TOSBoot) directory from CVS. I
compile my program using the following steps:
-Compile TOSBoot
-Compile and install DelugeBasic
-Compile by Blink test program
-Inject my program and try to reboot.
I am using Tinyos1.1.15 provided with the tinyos Eclipse plugin. The
fact that my program originally worked using the pre-compiled mica2
binary that was packed with tinyos1.1.15, may suggest that this was not
updated in the release.
Thanks,
Simon
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help