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

printf()

hai....

I am trying to learn ARM processor.I am using the example programs an i have a MCB 2100
board.My question is that whether i can use printf() statements in the programs.

Parents
  • Hai

    I wrote the code like this

    #include<stdio.h>
    #include<LPC21xx.H>

    int main(void)
    {

    PINSEL0 = 0x00050000;
    U1LCR = 0x83;
    U1DLL = 97;
    U1LCR = 0x03;
    printf("Hello");
    while(1);
    }

    I am not sure whether i hav done correctly.I just want the Hello to be printed to the serial window.But when i tried the code i got
    error that"*** error 65: access violation at 0x00008000 : no 'execute/read' permission"
    wht should i do? I am new to this programming.so expecting ur help.Thankx in advance

Reply
  • Hai

    I wrote the code like this

    #include<stdio.h>
    #include<LPC21xx.H>

    int main(void)
    {

    PINSEL0 = 0x00050000;
    U1LCR = 0x83;
    U1DLL = 97;
    U1LCR = 0x03;
    printf("Hello");
    while(1);
    }

    I am not sure whether i hav done correctly.I just want the Hello to be printed to the serial window.But when i tried the code i got
    error that"*** error 65: access violation at 0x00008000 : no 'execute/read' permission"
    wht should i do? I am new to this programming.so expecting ur help.Thankx in advance

Children