simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] Change IO-port value


From: Marek Pietrzak
Subject: Re: [Simulavr-devel] Change IO-port value
Date: Fri, 07 Sep 2012 22:16:28 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0

PINx value is meant to be levels on wires and cannot be changed currently in the same manner as "true" registers. There's TCL ui which probably can do that externally but personally never tried that.

Marek

On 09/06/2012 08:25 PM, Valber wrote:
Hi everybody!
I want to try debuging GNU ASM programms by simulavr, but have no ideas
how to change registers values while step by step debuging, i.e.
simulate events

=======exampe.S=======

#include <avr/io.h>
#define SFR(X) _SFR_IO_ADDR(X)
temp = 16
START = PD0
STOP = PD1
    .section .text
    .global main
main:
    rjmp init
init:
    ser    temp
    out    SFR(DDRB),temp
    out    SFR(PORTB),temp
    clr    temp
    out    SFR(DDRD),temp
    ldi    temp,0x03
    out    SFR(PORTD),temp
waits:    sbis    SFR(PIND),START
    rjmp    waits
    nop
    nop
    nop
    nop
    rjmp    init

============================

Compile:

avr-gcc -Wa,--gstabs -mmcu=atmega16a example.S -o example.o

Simulavr - start server and watch registers state:

simulavr -g -P simulavr-dip -X -d atmega16

How I can change PIND state? I'm using Emacs as IDE.


Best Regards
Valber






_______________________________________________
Simulavr-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/simulavr-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]