[Avrora] Extending avrora

Torsten Landschoff torsten at landschoff.net
Wed Sep 14 02:46:29 PDT 2005


Hi folks, 

I'd like to thank you for the beautiful simulator that you have written
with avrora!! It's a great pleasure to work with it.

I am currently using it for my diploma thesis which is about security in 
wireless sensor networks. In trying to hash the whole flash memory I am
running into an exception because I access flash memory which is not 
covered by my program. 

Currently I am working around this by the following trivial patch:

=== src/avrora/sim/mcu/ReprogrammableCodeSegment.java
==================================================================
--- src/avrora/sim/mcu/ReprogrammableCodeSegment.java	(revision 2623)
+++ src/avrora/sim/mcu/ReprogrammableCodeSegment.java	(local)
@@ -83,7 +83,7 @@
         public CodeSegment newCodeSegment(String name, BaseInterpreter bi, ErrorReporter er, Program p) {
             CodeSegment cs;
             if ( p != null ) {
-                cs = new ReprogrammableCodeSegment(name, p.program_end, bi, er, pagesize);
+                cs = new ReprogrammableCodeSegment(name, size, bi, er, pagesize);
                 cs.load(p);
             } else {
                 cs = new ReprogrammableCodeSegment(name, size, bi, er, pagesize);

OTOH I'd like to have my stuff running on the original avrora so I wonder if
it would be possible to change it in a way that supports my kind of program. 
After all the real microcontroller will allow accessing all of its flash 
memory even if it is not programmed. 

Avrora could return a default value (IIRC the Atmel specification says that
unprogrammed flash is read as 0xff, but I have to check). I understand that
having a small flash memory helps in the simulation of big sensor networks
and in finding bugs so this feature should still be available - but the 
realistic behaviour should also I'd say.

Thanks for any comments

	Torsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.ucla.edu/pipermail/avrora/attachments/20050914/489cd9a5/attachment.pgp


More information about the Avrora mailing list