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

Help with error when compiling LPC1768

hello friends
I'm doing a 8x8 LED matrix with LPC1768 and when I compile I get an error that I can not solve also leave some warnings but I did not care much.
could help me? I leave the whole project in keil

many thanks
Ciernes

Parents
  • main.c

    
    #include "lpc17xx.h"
    #include "matrix.h"
    #include "matrix_font.h"
    #include "timer.h"
    
    int main(void)
    {
            uint8_t smiley[] = {0x3C,0x42,0xA5,0x81,0xA5,0x99,0x42,0x3C};
            uint8_t dinges[] = {0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81};
    
            TimerInit(3,5000);
    
            Matrix_Init();
            Matrix_Drawhorizontalline(0,2,8);
            Matrix_Drawhorizontalline(0,5,8);
            Matrix_Drawverticalline(2,0,8);
            Matrix_Drawverticalline(5,0,8);
            Matrix_Start();
            delayMs(0,1000);
    
            Matrix_NewFrame(smiley);
            delayMs(0,1000);
    
            Matrix_PutChar('3');
            delayMs(0,1000);
            Matrix_PutChar('2');
            delayMs(0,1000);
            Matrix_PutChar('1');
            delayMs(0,1000);
    
            Matrix_PutString("HELLO WORLD! \0");
            delayMs(3,8000);
            Matrix_NewFrame(dinges);
    
        while(1)
        {
            Matrix_MoveLEFT();
            delayMs(0,100);
        }
    }
    
    
    
    

    build compilation

    Build target 'Target 1'
    compiling matrix.c...
    matrix.c(74): warning:  #61-D: integer operation result is out of range
    matrix.c(74): warning:  #68-D: integer conversion resulted in a change of sign
    matrix.c(83): warning:  #61-D: integer operation result is out of range
    matrix.c(83): warning:  #68-D: integer conversion resulted in a change of sign
    matrix.c(108): warning:  #175-D: subscript out of range
    matrix.c(229): warning:  #175-D: subscript out of range
    matrix.c(256): warning:  #175-D: subscript out of range
    matrix.c(257): warning:  #175-D: subscript out of range
    matrix.c(268): warning:  #175-D: subscript out of range
    matrix.c(275): warning:  #175-D: subscript out of range
    matrix.c(304): error:  #167: argument of type "const uint8_t *" is incompatible with parameter of type "uint8_t *"
    matrix.c(390): warning:  #61-D: integer operation result is out of range
    matrix.c(390): warning:  #68-D: integer conversion resulted in a change of sign
    matrix.c(406): warning:  #61-D: integer operation result is out of range
    matrix.c(406): warning:  #68-D: integer conversion resulted in a change of sign
    matrix.c(420): warning:  #61-D: integer operation result is out of range
    matrix.c(420): warning:  #68-D: integer conversion resulted in a change of sign
    ".\matriztest.axf" - 1 Errors, 16 Warning(s).
    Target not created
    
    
    
    

Reply
  • main.c

    
    #include "lpc17xx.h"
    #include "matrix.h"
    #include "matrix_font.h"
    #include "timer.h"
    
    int main(void)
    {
            uint8_t smiley[] = {0x3C,0x42,0xA5,0x81,0xA5,0x99,0x42,0x3C};
            uint8_t dinges[] = {0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81};
    
            TimerInit(3,5000);
    
            Matrix_Init();
            Matrix_Drawhorizontalline(0,2,8);
            Matrix_Drawhorizontalline(0,5,8);
            Matrix_Drawverticalline(2,0,8);
            Matrix_Drawverticalline(5,0,8);
            Matrix_Start();
            delayMs(0,1000);
    
            Matrix_NewFrame(smiley);
            delayMs(0,1000);
    
            Matrix_PutChar('3');
            delayMs(0,1000);
            Matrix_PutChar('2');
            delayMs(0,1000);
            Matrix_PutChar('1');
            delayMs(0,1000);
    
            Matrix_PutString("HELLO WORLD! \0");
            delayMs(3,8000);
            Matrix_NewFrame(dinges);
    
        while(1)
        {
            Matrix_MoveLEFT();
            delayMs(0,100);
        }
    }
    
    
    
    

    build compilation

    Build target 'Target 1'
    compiling matrix.c...
    matrix.c(74): warning:  #61-D: integer operation result is out of range
    matrix.c(74): warning:  #68-D: integer conversion resulted in a change of sign
    matrix.c(83): warning:  #61-D: integer operation result is out of range
    matrix.c(83): warning:  #68-D: integer conversion resulted in a change of sign
    matrix.c(108): warning:  #175-D: subscript out of range
    matrix.c(229): warning:  #175-D: subscript out of range
    matrix.c(256): warning:  #175-D: subscript out of range
    matrix.c(257): warning:  #175-D: subscript out of range
    matrix.c(268): warning:  #175-D: subscript out of range
    matrix.c(275): warning:  #175-D: subscript out of range
    matrix.c(304): error:  #167: argument of type "const uint8_t *" is incompatible with parameter of type "uint8_t *"
    matrix.c(390): warning:  #61-D: integer operation result is out of range
    matrix.c(390): warning:  #68-D: integer conversion resulted in a change of sign
    matrix.c(406): warning:  #61-D: integer operation result is out of range
    matrix.c(406): warning:  #68-D: integer conversion resulted in a change of sign
    matrix.c(420): warning:  #61-D: integer operation result is out of range
    matrix.c(420): warning:  #68-D: integer conversion resulted in a change of sign
    ".\matriztest.axf" - 1 Errors, 16 Warning(s).
    Target not created
    
    
    
    

Children
No data