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

standard library init (STR71x)

I'm having difficulty still during boot of my STR71x board. Trying to get inherited software running on this board.

I chased a sort-of red herring for a while (see my other thread) and have discovered that my problem occurs long before the kernel is even initialized.

My problem is with the standard library. During stdio init, (__rt_lib_init -> __initio->freopen -> sys_open) an SWI instruction gets hit.

I've gotten this information from stepping through the dissassembly and cross referencing the mapfile with branch instructions- basic grunt work.

Now this may be proper, and I have to link in some handler for this specific SWI (which registers would have any parameters?) or it may be a problem with something else.

I have some basic questions:
- Anyone know what the problem is and a fix? (Sorry, gotta try...)
- Who provides the standard library that is used with the realview ARM tools? Is there some support/source? Can the source be debugged within uVision? Is Keil the wrong place to be looking for this support (is it ST? someone else?)

Thanks for any help.

Steve

Parents
  • Excuse my ignorance, but can you elaborate on this semi-hosting?

    Also, the 0x123456, I assume is a parameter for the SWI? Which register should I see this in?

    (I assumed that the parameter would be in R0, as just before the SWI, the disassembly shows it storing the value 1 in R0 and the SP in R1.)

    0x4000F9DC 2001 MOV R0,#0x01
    0x4000F9DE 4669 MOV R1,SP
    0x4000F9E0 DFAB SWI 0xAB

    So, SWI 1 is one of the RTL handled software interrupts, when I step into the disassembly of that handler, it does go to the area identified in the mapfile:
    0x400119b0 0x000000d4 Code RO 3605 SWI_RTX SWI_RTX.o(RTLRTX.lib)

    So, I believe that the RTL SWI handler is properly linked and mapped. It just decides (for whatever reason) to go away forever:
    0x40011A78 EAFFFFFE B 0x40011A78

    Thoughts?

    Thanks,
    Steve

Reply
  • Excuse my ignorance, but can you elaborate on this semi-hosting?

    Also, the 0x123456, I assume is a parameter for the SWI? Which register should I see this in?

    (I assumed that the parameter would be in R0, as just before the SWI, the disassembly shows it storing the value 1 in R0 and the SP in R1.)

    0x4000F9DC 2001 MOV R0,#0x01
    0x4000F9DE 4669 MOV R1,SP
    0x4000F9E0 DFAB SWI 0xAB

    So, SWI 1 is one of the RTL handled software interrupts, when I step into the disassembly of that handler, it does go to the area identified in the mapfile:
    0x400119b0 0x000000d4 Code RO 3605 SWI_RTX SWI_RTX.o(RTLRTX.lib)

    So, I believe that the RTL SWI handler is properly linked and mapped. It just decides (for whatever reason) to go away forever:
    0x40011A78 EAFFFFFE B 0x40011A78

    Thoughts?

    Thanks,
    Steve

Children