Semihosting help

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to


i am using a multi-ice sever with axd debugger
i need to write a c program to handle semihosting read character
command but i have difficulties reading in the character.
there is some problem preventing me from stepping over the readc
command
below is my c code which is not working
can anyone help to guide me along


#ifdef __thumb
/* Define Thumb Semihosting SWI */
#define SemiSWI 0xAB
#else
/* Define ARM Semihosting SWI */
#define SemiSWI 0x123456
#endif
__swi(SemiSWI) void _ReadC(unsigned op);


char ReadC()
{
        char r0_value;
        _ReadC(0x7);
        __asm
        {
                ldr r1,[r0_value]
                strb r0,[r1]
        }


        return r0_value;
}


after _ReadC(0x7) is run the debugger is supposed to load the character
entered in the debug channel into register r0. I need to store the
content of r0 into the variable r0_value.


Site Timeline