bugSimulavr: an AVR simulator - Bugs: bug #39857, manual need simulavr-disp example

 
 

bug #39857: manual need simulavr-disp example

Submitted by:  Valber <psi13art>
Submitted on:  Thu 22 Aug 2013 11:03:04 PM UTC  
 
Category: DocumentationSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenComponent Version: simulavr

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 28 Aug 2013 01:28:10 PM UTC, comment #2:

=================== example.S===================
#include <avr/io.h>
;; #include <compat/deprecated.h>
#define SFR(X) _SFR_IO_ADDR(X)
#define reg_led r20
#define temp r16
#define START 0
#define STOP 1
;; .includepath "/usr/share/avra/includes/"
;; .include "m16def.inc" ; ATMega16

;; .def temp =r16
;; .def reg_led = r20
;; .equ START = 0
;; .equ STOP = 1
;; .org $000
.section .text
.global main

main: ldi reg_led, 0xfe
sec
set
ser temp
out SFR(DDRB),temp
out SFR(PORTB), temp
clr temp
out SFR(DDRD),temp
ldi temp,0x03
out SFR(PORTD), temp
waitstart:
sbic SFR(PIND),START
rjmp waitstart

loop:
out SFR(PORTB),reg_led

..........
===============================================
Start simulation

simulavr -g -d atmega16

GDB

avr-gdb --annotate=3 example.o

> target remote localhost:1212
> load
> b waitstart
> continue
> x/xb 0x32

0x800032: 0x03

> set {int}0x32=0xf0
> x/xb 0x32

0x800032: 0xf0

PORTD changed OK

> set {int}0x30=0xf0
> x/xb 0x30

0x800030: 0xf0

Changed ok ,after hotbadfix.path

Dear developers, correct work SetPin ... I still did it crooked, and only for atmega16 ("B","D")

(file #28948)

Valber <psi13art>
Wed 28 Aug 2013 12:32:42 PM UTC, comment #1:

I change ToogleFeature=true for atmega16(B,C port) (default = false)
and change SetPin function

(file #28947)

Valber <psi13art>
Thu 22 Aug 2013 11:03:04 PM UTC, original submission:

Hello year ago, I asked you(community) about how to simply change the value of the PIN* register.

1) Now, I'm back and enter:

simulavr -g -d atmega16 -P -X simulavr-disp

and window with port and registers did not appear.

2) Сompile new version from git

./configure LDFLAGS="-L/usr/lib/python2.7" --enable-python --enable-tcl

and again... nothing

3) read manual))))

option "-P" "-X" were gone, there was an option "-u" (how to use it??)

Maybe I'm a newbie and am looking for simple solutions (using Emacs), but as I see PORT* ,DDR* ,PIN* values ​​and how to change them quickly using avr-gdb?

Really need a working example.

Best Regards
Valber

Valber <psi13art>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #28948:  hotbadfix.path added by psi13art (2kB - application/octet-stream)
file #28947:  hotbadfix.path added by psi13art (2kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psi13art (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 28 Aug 2013 01:28:10 PM UTCpsi13artAttached File-=>Added hotbadfix.path, #28948
    Wed 28 Aug 2013 12:32:42 PM UTCpsi13artAttached File-=>Added hotbadfix.path, #28947

    Back to the top


    Powered by Savane 3.1-cleanup