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

RTX/SWI configuration

Hey folks,

I've been struggling with an issue in getting an STR7x (actually an STR712) to get as far as main() with RTX.

- I have read that RTX uses the first 8 or so SW interrupts for internal use.
- I have used the generic startup files (with EIC=0- so I think that this means that there is no interrupt service.
- When I boot the processor, it gets through the earliest part of the boot, and (based on stepping through assembly and referencing the mapfile) gets into initializing the STR7 libs
- a SWI occurs, and the configuration described means that an SWI is an endless loop.

So, I think I have a configuration issue, somehow I have to have these SWI events be processed by RTX. I've read vague references in the documenation that RTX provides an SWI handler- it would have to. But I can't seem to find any documentation, example, immediately straightforward way to make this connection.

I'm using uVision3.31 and the RealView toolchain. I have the 'RTX kernel' option selected in the operating system option.

Can anyone point me to some docs or otherwise help?

Thanks,
Steve

Parents
  • More information in case it helps anyone help me :)

    So, I set a break in RTX_Config\os_switch_tasks(). In the blinky example, when it hits this breakpoint, everything's good, if I check perhiperals\RTX Kernel, it's got all kinds of nice, valid looking data. This break is hit before main is called, during Kernel init, and there's init, os_clock_demon, and os_idle_demon running.

    In my (non-example) project, the data in the RTX Kernel dialog seems really corrupt. The break is hit before main() like in Blinky, but there are seemingly NO tasks running and the data is the garbage seen in the above post.

    In the blinky example, when it is trying to do the first context switch, it's trying to switch to a task with a TCB at 0x20000850, a perfectly good-looking pointer as the STR71x ram base is at 0x20000000. In my project, it's 0x5, not byte aligned, not in RAM, basically it's trash.

    Unfortunately, it seems very difficult to figure out why this would be the case. I'm using identical startup code:
    smacmull@GX520-01466 /cygdrive/c/work/arm/pgm/ArmCore
    $ diff RTX_Config.c ../../../../RTX_Blinky/RTX_Config.c

    smacmull@GX520-01466 /cygdrive/c/work/arm/pgm/ArmCore
    $ diff STR71x.s ../../../../RTX_Blinky/STR71x.s

    and identical scatterfiles:
    smacmull@GX520-01466 /cygdrive/c/work/arm/pgm/ArmCore
    $ diff Hello.sct ../../../../RTX_Blinky/Obj/Blinky.sct

    going through all of the IDE's setup dialogs yields no differences I can see.

    Anyone have any idea how to figure out why my kernel gets so corrupted?

    Thanks,
    Steve

Reply
  • More information in case it helps anyone help me :)

    So, I set a break in RTX_Config\os_switch_tasks(). In the blinky example, when it hits this breakpoint, everything's good, if I check perhiperals\RTX Kernel, it's got all kinds of nice, valid looking data. This break is hit before main is called, during Kernel init, and there's init, os_clock_demon, and os_idle_demon running.

    In my (non-example) project, the data in the RTX Kernel dialog seems really corrupt. The break is hit before main() like in Blinky, but there are seemingly NO tasks running and the data is the garbage seen in the above post.

    In the blinky example, when it is trying to do the first context switch, it's trying to switch to a task with a TCB at 0x20000850, a perfectly good-looking pointer as the STR71x ram base is at 0x20000000. In my project, it's 0x5, not byte aligned, not in RAM, basically it's trash.

    Unfortunately, it seems very difficult to figure out why this would be the case. I'm using identical startup code:
    smacmull@GX520-01466 /cygdrive/c/work/arm/pgm/ArmCore
    $ diff RTX_Config.c ../../../../RTX_Blinky/RTX_Config.c

    smacmull@GX520-01466 /cygdrive/c/work/arm/pgm/ArmCore
    $ diff STR71x.s ../../../../RTX_Blinky/STR71x.s

    and identical scatterfiles:
    smacmull@GX520-01466 /cygdrive/c/work/arm/pgm/ArmCore
    $ diff Hello.sct ../../../../RTX_Blinky/Obj/Blinky.sct

    going through all of the IDE's setup dialogs yields no differences I can see.

    Anyone have any idea how to figure out why my kernel gets so corrupted?

    Thanks,
    Steve

Children