[Avrora] TelosB in Avrora: Serial Port working

Ben L. Titzer ben.titzer at gmail.com
Mon Jan 31 15:32:40 PST 2011


>
>
> Most of the changes are MSP430 specific. If we disregard changes to
> avrora.arch.msp430, avrora.arch.msp430.mcu and avrora.sim.platform.Telos,
> then the amount of changes is much smaller. I suggest that the
> MSP430-specific changes are not that important to immediately verify, as the
> MSP430 code clearly works now better than before, and as such it will be an
> overall improvement.
>
> I cannot compile a full list of changes as the SourceForge CVS servers are
> down. From memory, the biggest changes were:
>
>
I've filed a ticket, hopefully they will be fixing that soon.


> - CC2420: changed to an interrupt callback rather than providing just an
> interrupt number, as in addition to simply triggering an interrupt some
> flags in some registers of the MSP430 need to be changed (it's the same
> interrupt for all pins of a port, and we need to set an interrupt flag for
> the given pin)
>
> - Usart device: To separate the actual interface code from code specific to
> Atmel, I created a SerialPort interface class that also contains the
> USARTDevice interface and the Frame class.
>
> - SPIDevice: As I didn't understand the purpose of the Frame class for the
> SPI interface (I implemented this before the Usart interface), I simply
> removed it. Could be put back, but then I suggest we put the Frame
> definition for the SPI interface into the SPIDevice class to better separate
> interface code from Atmel specific code.
>

The latter suggestion is probably better. Removing code is good, but too
much of a good thing can kill you ;)

- Small modifications to some interface definitions to make them more
> generic (and reduce the number of explicit casts).
>
> - In at least one instance, I first test for an object type before making
> an explicit cast to support the two microcontroller architectures (maybe the
> explicit cast could be avoided by extending an interface)
>
> Well, I think these are the most important changes. It should be easy to
> verify these and change something if you have a better suggestion. Having
> the changes in the source repository might invite more people to play around
> with it and send feedback.
>
> By the way, SourceForge would like to migrate projects to SVN, and I think
> that would be a good thing to do for Avrora as well. For one, it would allow
> us to rename files and keep a proper record of the changes (in case you
> don't like my naming of the classes).
>
> Cheers,
> Urs


I'll have a look at your code after the CVS is back up, but it may take some
time for me to get around to it.

-B


>
> On 01/31/2011 05:01 AM, Zainul M Charbiwala wrote:
>
>> Hi Urs,
>>
>> Yes, I do have push access. I had some unfinished projects I would
>> have liked to rejuvenate, but I'm pressed for other things at the
>> moment.
>>
>> I will offer to verify your changes and push them in. I wonder if Ben
>> would like to supervise since this is going to be a big patch.
>>
>> Thanks,
>>
>> Zainul.
>>
>>
>>
>> On Sun, Jan 30, 2011 at 5:01 AM, Urs Hunkeler<urs.hunkeler at epfl.ch>
>>  wrote:
>>
>>> Hi,
>>>
>>> The biggest problem I had for the MSP430 simulator was with the sub
>>> instruction. I didn't quite understand how the flags are supposed to
>>> work,
>>> and the implementation in the CVS didn't seem to work properly. Now I
>>> have
>>> verified the proper operation by writing a test program that would try a
>>> combination of all 256 values for both operands for the 8-bit instruction
>>> (sub.b) and then would send a message over the serial port with the
>>> result
>>> and the flags in the status register. I then wrote the results from the
>>> program running on the simulator and on real hardware to two separate
>>> files
>>> and compared them (with diff). Looks like I finally understand how the
>>> flags
>>> work, the two files are identical :-).
>>>
>>> Zainul, do you have push access to the Avrora CVS repository? What would
>>> you
>>> like to do with the MSP430 simulator?
>>>
>>> Cheers,
>>> Urs
>>>
>> _______________________________________________
> Avrora mailing list
> Avrora at lists.ucla.edu
> http://lists.ucla.edu/cgi-bin/mailman/listinfo/avrora
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ucla.edu/pipermail/avrora/attachments/20110131/c72242ed/attachment-0001.htm>


More information about the Avrora mailing list