Hello:
I have a project where I use #pragma iv(0x600), with Silabs processor 8051F385. This processor indicates that interrupt 8 at 0x43 is "special" and when generating HEX file, the address is still at 43h. Why the compiler #pragma won't translate it to 643h? Thanks !
Sorry guys, I was misled by the that there was no interrupt defined inside the source code, however one of the libraries actually uses it. Once the body is defined inside the source, it will generate it. Thanks anyways!
This processor indicates that interrupt 8 at 0x43 is "special" and when generating HEX file, the address is still at 43h. Why the compiler #pragma won't translate it to 643h?
the only thing 'special' is the Pending Flag.
The interrupt vector is hardware defined and will ALWAYS be at 43h. The compiler wil, when told insert a ljmp to 643h at 43h
Erik
Hi Erik: Thanks for the response I have another question, perhaps you can enlighten me:
I am using USBX_f38x.lib, which uses interrupt 8 "on its own"... I mean that my source doesn't define this interrupt, hence the compiler is not modifying the 43h to 643h. How's the compiler knowing that there's an interrupt there ? If so why the #pragma iv(0x600) does not affect this ? Thanks Juan
How's the compiler knowing that there's an interrupt there ?
It does not, you have to tell it. If the interrupt s enabled and you do not have an ISR your code will blow
so why the #pragma iv(0x600) does not affect this ? see above I did describe it. The interrupt vector is HARDWARE DEFINED and will ALWAYS be at 43h. The compiler will, when told insert a ljmp to 643h at 43h
The next version of Keil will magically change the connections inside the chip so the hardware will work difrerently :)
Lol... Well, I am missing something. There's a precompiled library that utilizes this interrupt and it is not in the source code. The thing is that the compiler just doesn't modify the vector to point to this ISR ! Once I add the interrupt function it does it. How can I cheat the compiler to do this ? Thanks
I just recall that there is something fuzzy about ISRs and libraries. Since I am not much of a library user, (it is a *** trying to debug something you do not have the source for) I can only say "I tend to recall that" ISRs inside a library are called by nobody and thus ignored. You need to contact wherever you got those library routines.
View all questions in Keil forum