Problem with "PrintOut" function

General discussion on mikroC PRO for PIC32.
Post Reply
Author
Message
marciojsm
Posts: 2
Joined: 15 Aug 2016 15:00

Problem with "PrintOut" function

#1 Post by marciojsm » 30 Jun 2018 10:42

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.);
}
Attachments
PrintOut.rar
Project file
(63.63 KiB) Downloaded 86 times

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: Problem with "PrintOut" function

#2 Post by filip.grujcic » 02 Jul 2018 14:36

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,
Filip Grujcic

marciojsm
Posts: 2
Joined: 15 Aug 2016 15:00

Re: Problem with "PrintOut" function

#3 Post by marciojsm » 02 Jul 2018 17:14

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.

netserv
Posts: 31
Joined: 31 Dec 2012 19:48

Re: Problem with "PrintOut" function

#4 Post by netserv » 08 Feb 2022 23:06

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.

Post Reply

Return to “mikroC PRO for PIC32 General”