# problem with printf with  PIC32MX795F512L

**URL:** <https://forums.freertos.org/t/problem-with-printf-with-pic32mx795f512l/3442>\
**Category:** Kernel\
**Created:** [March 18, 2011, 12:36am UTC](https://forums.freertos.org/t/problem-with-printf-with-pic32mx795f512l/3442 "2011-03-18T00:36:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 18, 2011, 12:36am UTC](https://forums.freertos.org/t/problem-with-printf-with-pic32mx795f512l/3442/1 "2011-03-18T00:36:21Z")

</div>

**[dabaf](https://sourceforge.net/u/dabaf/)** wrote on [Friday, March 18, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/9ab1f280/#c4b2):

Recently&nbsp; I posted a question about&nbsp; the function printf that would not work with my PIC32MX360F512L. I&nbsp; received advices from this forum&nbsp; to check on DBINT(),vSetupEnvironment(),… in the demos. I checked everything was exactly in place according to the proposition provided in the forum. I thought may be it was because I was not equipped with the right pic32, since in the book&nbsp; (FreeRTOS -a practical guide-pic32 edition) uses the PIC32MX795F512L.  
I decided to buy the PIC32MX795F512L starter kit. But in my grand surprise still the printf won’t display. I just don’t know what to do. I have two starter kit pic32 and the book from FreeRTOS and I really want to learn rtos, but I cant display anything to learn the rtos concepts.&nbsp; I really don’t know what else to do. Can somebody help me or anybody had the same problem as me. Otherwise I bought all those equipments for nothing.  
Thanx for your help,  
Dabaf,

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [March 18, 2011, 11:22am UTC](https://forums.freertos.org/t/problem-with-printf-with-pic32mx795f512l/3442/2 "2011-03-18T11:22:24Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Friday, March 18, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/9ab1f280/#5cda):

Could you tell me which version of the compiler you are using.&nbsp; The files are configured for the latest version.&nbsp; Maybe there is a problem when using them with an older version - although I would not have thought that would be the case.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 18, 2011, 2:53pm UTC](https://forums.freertos.org/t/problem-with-printf-with-pic32mx795f512l/3442/3 "2011-03-18T14:53:16Z")

</div>

**[dabaf](https://sourceforge.net/u/dabaf/)** wrote on [Friday, March 18, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/9ab1f280/#dc20):

I am using the latest verion of the MPLAB IDE with the c30 compiler for the pic32. I am running my application on a Windows 7 64 bits.

regards,

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [March 18, 2011, 3:51pm UTC](https://forums.freertos.org/t/problem-with-printf-with-pic32mx795f512l/3442/4 "2011-03-18T15:51:30Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Friday, March 18, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/9ab1f280/#7074):

It is the version number of C30 that I am interested in.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 18, 2011, 10:05pm UTC](https://forums.freertos.org/t/problem-with-printf-with-pic32mx795f512l/3442/5 "2011-03-18T22:05:57Z")

</div>

**[dabaf](https://sourceforge.net/u/dabaf/)** wrote on [Friday, March 18, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/9ab1f280/#b9bd):

Actually I just checked my compiler version and it is : MPLAB&nbsp; C Compiler for PIC32 MCUs v1.11(b)

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 18, 2011, 10:14pm UTC](https://forums.freertos.org/t/problem-with-printf-with-pic32mx795f512l/3442/6 "2011-03-18T22:14:33Z")

</div>

**[dabaf](https://sourceforge.net/u/dabaf/)** wrote on [Friday, March 18, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/9ab1f280/#9a5d):

I upgraded the compiler to PIC32 MCUs v1.12(a) and still nothing.&nbsp;

regards,

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [April 1, 2011, 3:40am UTC](https://forums.freertos.org/t/problem-with-printf-with-pic32mx795f512l/3442/7 "2011-04-01T03:40:02Z")

</div>

**[ricklpray](https://sourceforge.net/u/ricklpray/)** wrote on [Friday, April 01, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/9ab1f280/#5228):

I’m having the same problem.&nbsp; I have the recommended starter kit (USB Starter Kit II).&nbsp; I’m on Windows 7 64 bit.&nbsp; I can run the demo and set break points, but I get no output from the vPrintString function.&nbsp; I can’t find any settings that appear to deal with this.&nbsp; Is there anyone out there that knows anything about this problem?

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [April 1, 2011, 3:56am UTC](https://forums.freertos.org/t/problem-with-printf-with-pic32mx795f512l/3442/8 "2011-04-01T03:56:44Z")

</div>

**[ricklpray](https://sourceforge.net/u/ricklpray/)** wrote on [Friday, April 01, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/9ab1f280/#a4d5):

I figured out the problem on mine after reading your other post.&nbsp; I just commented out the vSetIOBuffering(); line in vSetupEnvironment() and my vPrintString() output is working now.&nbsp; I’ll bet this will solve your problem as well.

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [April 1, 2011, 7:03am UTC](https://forums.freertos.org/t/problem-with-printf-with-pic32mx795f512l/3442/9 "2011-04-01T07:03:45Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Friday, April 01, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/9ab1f280/#589b):

The way the IO buffering works changed between C32 compiler versions.&nbsp; The older versions have line buffering by default, the latest has no buffering by default.&nbsp; The vSetIOBuffering() line was added to switch line buffering on when using the latest C32 version (or, more accurately, the libraries that come with the latest version).

I was having this conversation with somebody just recently and it appears that if you are using the latest MPLAB/C32 tools then vSetIOBuffering() is required to prevent the characters appearing in the console window extremely slowly.&nbsp; If you are using an older compiler version then vSetIOBuffering() should not be used.

Regards.
