This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Locaion of IRQHandler within C file

I am presently testing the STR710 micro from
STmicroelectronics using KEIL UV3 IDE.
I have discovered from my own code (as well as the sample codes shipped with the compiler. Placing an IRQhandler AFTER the main() function causes the file not compile and showed lots of errors. But when placing
the IRQHandler BEFORE or near the beginning
of the program then it compiled fine.
I have noticed some pre-compile directive
in certain area #pragma userclass (CODE = default) and #pragma userclass (CODE =IRQ)
resided in the c file. However, I had never
be able to come up with a conclusive result
by trying to place the above directives in various area of the file.

My question is what is the RIGHT way to do in term of placing IRQhandler?

void main (void)
{
}

void IRQHandler_one()
{
}

void IRQHanlder_two()
{
}

The above arrangement NOT working

Parents
  • Now I am confused.
    I checked the ARM development tool selection
    under PROJEC/COMPONENT/ENVIROMENT option
    and I noticed that the USE KEIL CARM was checked. Are you saying that I am using the
    wrong tool? I thought Uvision3 using KEIL CARM? I tried to select the REALVIEW box
    (for experiment reason) the results were
    much worst !! lots of error !! The worst
    thing was that the project was no longer
    usable even I switched back to KEIL CARM compiler.

    I find that, unlike the Uvision2, this
    ARM compiler (UV3) is very hard to use, and
    the manual is really useless.

Reply
  • Now I am confused.
    I checked the ARM development tool selection
    under PROJEC/COMPONENT/ENVIROMENT option
    and I noticed that the USE KEIL CARM was checked. Are you saying that I am using the
    wrong tool? I thought Uvision3 using KEIL CARM? I tried to select the REALVIEW box
    (for experiment reason) the results were
    much worst !! lots of error !! The worst
    thing was that the project was no longer
    usable even I switched back to KEIL CARM compiler.

    I find that, unlike the Uvision2, this
    ARM compiler (UV3) is very hard to use, and
    the manual is really useless.

Children