Page 1 of 1

Problem with "PrintOut" function

Posted: 30 Jun 2018 10:42
by marciojsm
I can not compile the sample PrintOut function of MikroC PRO for PIC32.

The compiler issues the error: "36 384 Illegal pointer conversion PrintOut.c".

Code: Select all

void PrintHandler(char c)
{
  UART_Write(c);
}


void main() {
  AD1PCFG = 0xFFFF;         // Configure AN pins as digital I/O
  UART2_Init(56000);        // Initialize Uart at 56000 bps
  Delay_ms(100);

  PrintOut(PrintHandler, "/*\r\n"
                         " * Project name:\r\n"
                         "     PrintOutExample (Sample usage of PrintOut() function)\r\n"
                         " * Copyright:\r\n"
                         "     (c) MikroElektronika, 2011.\r\n"
                         " * Revision History:\r\n"
                         "     20110105:\r\n"
                         "       - Initial release\r\n"
                         " * Description:\r\n"
                         "     Simple demonstration on usage of the PrintOut() function\r\n"
                         " * Test configuration:\r\n"
                         "     MCU:             P32MX795F512L\r\n"
                         "                      http://ww1.microchip.com/downloads/en/DeviceDoc/61156G.pdf\r\n"
                         "     Dev.Board:       EasyPIC Fusion v7\r\n"
                         "                      http://www.mikroe.com/easypic-fusion/\r\n"
                         "     Oscillator:      XT-PLL, %6.3fMHz\r\n"
                         "     Ext. Modules:    None.\r\n"
                         "     SW:              mikroC PRO for PIC32\r\n"
                         "                      http://www.mikroe.com/mikroc/pic32/\r\n"
                         " * NOTES:\r\n"
                         "     - Turn ON UARTA switches at SW12. (board specific)\r\n"
                         " */\r\n", Get_Fosc_kHz()/1000.);
}

Re: Problem with "PrintOut" function

Posted: 02 Jul 2018 14:36
by filip.grujcic
Hello,

The example code compiles without any errors for me.
Could you please post a screenshot of the error message?
Which version of the compiler are you using?

Kind regards,

Re: Problem with "PrintOut" function

Posted: 02 Jul 2018 17:14
by marciojsm
filip.grujcic wrote:Hello,

The example code compiles without any errors for me.
Could you please post a screenshot of the error message?
Which version of the compiler are you using?

Kind regards,

Thank you very much, your confirmation motivated me to delete and reinstall MikroC PRO for PIC32 and this miraculously solved the problem.

Now compile normally and this will help me a lot.

I use version 4.0.0.0.

Re: Problem with "PrintOut" function

Posted: 08 Feb 2022 23:06
by netserv
same thing here....

There are soo many issues in many parts of the software. Programmer crashes, Compile crashes and errors occour out of the blue suddenly.

I compiled this code a lot of times but today, suddenly the compiler strikes.
@Mikroe, try to make it a little bit more stable. I work since 10 years with you products and i am really angry.