bugSimulavr: an AVR simulator - Bugs: bug #39974, call interrupt in GDB ?

 
 

bug #39974: call interrupt in GDB ?

Submitter:  Valber <psi13art>
Submitted:  Sat 07 Sep 2013 08:11:40 PM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  zfrdh
Open/Closed:  Closed Component Version:  * simulavr
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 05 Oct 2015 01:58:21 PM UTC, comment #1: 

Because I only see a (unanswered) question but not a bug here I will close the issue.

If there is still a problem feel free to ask via mailing list.

Klaus Rudolph <zfrdh>
Group administrator
Sat 07 Sep 2013 08:11:40 PM UTC, original submission:  

How-to call interrupt INT0 in gdb remote session ??

Maybe a bug in my code, unfortunately for the clear GNU Assembler few examples.

Can You start a wiki for simulavr examples?

===================examplevec.S=========

#include <avr/io.h>
#include <avr/interrupt.h>

#define reg_led r20
#define temp r16
#define START 0
        .section .text
        .global  main


main:        ldi        reg_led,0xfe
        ldi        temp,pm_lo8(RAMEND)
        out        _SFR_IO_ADDR(SPL),temp
        ldi        temp,pm_hi8(RAMEND)        ;
        out        _SFR_IO_ADDR(SPH),temp
        sec
        set
        ser        temp
        out        _SFR_IO_ADDR(DDRB),temp
        out        _SFR_IO_ADDR(PORTB),temp
        clr        temp
        out        _SFR_IO_ADDR(DDRD),temp
        ldi        temp,0x05
        out        _SFR_IO_ADDR(PORTD),temp
        ldi        temp,0x40
        out        _SFR_IO_ADDR(GICR),temp
        ldi        temp,0x00
        out        _SFR_IO_ADDR(MCUCR),temp
        sei
waitstart:
        sbic        _SFR_IO_ADDR(PIND),START
        rjmp        waitstart
loop: out        _SFR_IO_ADDR(PORTB),reg_led
        rcall         delay
        ser         temp
        out         _SFR_IO_ADDR(PORTB),temp
        brts         left
        sbrs         reg_led,0

        set
        ror        reg_led
        rjmp        loop
left:        sbrs        reg_led,7

        clt
        rol        reg_led
        rjmp        loop

;;###############Функция задержки
delay:        ldi        r17,250
d1:        ldi        r18,250
d2:        dec        r18
        brne        d2
        dec        r17
        brne        d1
        ret

        .global INT0_vect
;; www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html
INT0_vect:
waitstart2:
        sbic        _SFR_IO_ADDR(PIND),START
        rjmp        waitstart2
        reti

        .end
===============================================


Valber <psi13art>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by zfrdh (Posted a comment)
  • -email is unavailable- added by psi13art (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-10-05 zfrdh Assigned toNone zfrdh
        Open/ClosedOpen Closed
    2015-10-05 zfrdh StatusNone Invalid

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code