#1523 Interrupt 17 non-functional

closed-rejected
assembler (26)
5
2013-05-25
2009-04-03
Evan Schulz
No

Hello,

I am trying to develop some code that uses interrupt 17, but the compiler is not generating the interrupt vector table correctly. With interrupt 17, location 0x0083 in code space should contain an LJMP instruction to the corresponding address interrupt 17 ISR. However, using the Silicon Labs IDE (version 3.50 and the target device is a C8051F320) all I am seeing at that location is an RETI instruction.

I have attached some code that is a simple program that blinks an LED. To reproduce this problem, just try compiling this code to and then downloading to a device (I do not think this problem is device specific). I am not receiving and warnings or errors after compiling. If you look at location 0x0083 in code, you will see that there is no LJMP instruction (in my case, there is an RETI instruction). However, if you define the interrupt as 18 instead of 17 (in both the interrupt prototype and the ISR declaration), the compiler is generating the correct code. Using interrupt 18, if you look at location 0x0093 in code space, you will see an LJMP instruction that has the address of the actual interrupt 18 ISR.

I am using SDCC version 2.8.0. I am also attaching a Silicon Labs IDE workspace file (in case you are able to test this on that particular IDE). If not, the command line options are:

Assembler: -plosgff
Compiler: -c --debug --use-stdout -V
Linker: --debug --use-stdout -V

Let me know if you need anymore information.

Thanks,
-Evan

Discussion

  • Evan Schulz

    Evan Schulz - 2009-04-03

    Zip file containing 4 files (2 header files, c source file, and workspace file)

     
  • Maarten Brock

    Maarten Brock - 2009-04-04
    • milestone: --> non_bugs
    • assigned_to: nobody --> maartenbrock
    • status: open --> pending-rejected
     
  • Maarten Brock

    Maarten Brock - 2009-04-04

    Interrupt 17 is supposed to generate a vector at 0x008B not 0x0083 which is for interrupt 16.

     
  • SourceForge Robot

    • status: pending-rejected --> closed-rejected
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.