[email protected]  wrote / napĂ­sal(a):
> Hello
> 
> The interrupts should be at  0x000008h (high prio) or 0x000018h (low
> prio). Usually there is something like
> S_p18os_ivec_0x2_low_isr code    0X000018
> ivec_0x2_low_isr:
>         GOTO    _low_isr
> 
> in the asm code generated by sdcc. If this isn't the case than your isr
> function definition is mistaken by sdcc. Try just
> 
> void low_isr(void) interrupt 0x02
> 
> without the static keyword and see what sdcc produces (just the asm file).
> 
> Regards,
> 
> Jan
> 
Hello Jan
so I have changed it:

void isr(void) interrupt 0x1

0x2 doesn't work too.
And here are parts of .asm, .map, .cof.

////////////////////////////////////////////////////////////////////////
.asm     -looks fine as You wrote
////////////////////////////////////////////////////////////////////////

;--------------------------------------------------------
; interrupt vector
;--------------------------------------------------------

;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
; ; Starting pCode block for absolute section
; ;-----------------------------------------
S_ddd_ivec_0x1_isr      code    0X000008
ivec_0x1_isr:
        GOTO    _isr

; I code from now on!
; ; Starting pCode block
S_ddd__main     code
_main:
        .line   35; ddd.c       ADCON1 = 0xFF;  //all pins as a digital ports
        MOVLW   0xff
        MOVWF   _ADCON1
        .line   36; ddd.c       OSCCON = 0x6F;
        MOVLW   0x6f

////////////////////////////////////////////////////////////////////////////
.map    - looks fine too
////////////////////////////////////////////////////////////////////////////

gplink-0.13.6 alpha
Map File - Created 5-24-2009  00:58:58

                                  Section Info
                   Section       Type    Address   Location Size(Bytes)
                 ---------  ---------  ---------  ---------  ---------
           S_crt0i___entry       code   00000000    program   0x000004
        S_ddd_ivec_0x1_isr       code   0x000008    program   0x000004
        S_crt0i___do_cinit       code   0x00002a    program   0x0000a0
                     .code       code   0x0000ca    program   0x000070
                S_ddd__isr       code   0x00013a    program   0x00006a
               S_ddd__main       code   0x0001a4    program   0x000034
         S_crt0i___startup       code   0x0001d8    program   0x000018
                    .cinit       code   0x0001f0    program   0x00000e
                  .idata_i       code   0x0001fe    program   0x000002
                   .config       code   0x300000    program   0x00000e
                    .idata      idata   0x000084       data   0x000001
               udata_ddd_0      udata   0x000080       data   0x000004
             stack_section      udata   0x000200       data   0x000100
       ustat_pic18f1220_00      udata   0x000f80       data   0x000002
       ustat_pic18f1220_01      udata   0x000f89       data   0x000002
       ustat_pic18f1220_02      udata   0x000f92       data   0x000002
       ustat_pic18f1220_03      udata   0x000f9d       data   0x000006
       ustat_pic18f1220_04      udata   0x000fa6       data   0x00000e
       ustat_pic18f1220_05      udata   0x000fb6       data   0x000001
       ustat_pic18f1220_06      udata   0x000fbd       data   0x000008
       ustat_pic18f1220_07      udata   0x000fca       data   0x00000a
       ustat_pic18f1220_08      udata   0x000fd5       data   0x00002b

                               Program Memory Usage
                                Start         End
                            ---------   ---------
                             0x300000    0x30000d
                             0x000008    0x00000b
                             0x0001a4    0x0001d7
                             0x00013a    0x0001a3
                             0x0001fe    0x0001ff
                             00000000    0x000003
                             0x00002a    0x0000c9
                             0x0001d8    0x0001ef
                             0x0000ca    0x000139
                             0x0001f0    0x0001fd

                             246 program addresses used

                               Symbols
                      Name    Address   Location    Storage File
                 ---------  ---------  ---------  --------- ---------
                     _tmp0   0x000080       data     extern ddd.c
              ivec_0x1_isr   0x000008    program     static ddd.c
                     _main   0x0001a4    program     extern ddd.c
                _00110_DS_   0x0001ca    program     static ddd.c
                      _isr   0x00013a    program     extern ddd.c
                 ___uflags   0x000084       data     extern 
../build/startup/crt0i.asm
                   __entry   00000000    program     extern 
../build/startup/crt0i.asm
                __do_cinit   0x00002a    program     extern 
../build/startup/crt0i.asm

/////////////////////////////////////////////////////////////////////////////////
.cof   -and here I see no goto to isr - 0x00013A
/////////////////////////////////////////////////////////////////////////////////
                                             46 :
                                             47 :
000000    0xEFEC    goto    0x1d8           48 :
000002    0xF000
                                             49 :
                                             50 :
                                             51 :
                                             52 :
                                             53 :
                                             54 :
                                             55 :
                                             56 :
                                             57 :
                                             58 :
00002A    0x0EF0    movlw   0xf0            59 :
00002C    0x6EF6    movwf   0xf6, 0         60 :
00002E    0x0E01    movlw   0x1             61 :
bla
bla
bla
00013A    0xCFE8    movff   0xfe8, 0xfe5    23 : void isr(void) 
interrupt 0x1

////////////////////////////////////////////////////////////////////////////////

Thank You.
Milan


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to