printf not work

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
urchc_1533771
Level 5
Level 5
5 likes given First like received First like given

I want to use printf for debuging. I compiled Dynamic_GATT_Service_Configuration example and see that it`s work. I see all messages on Teraterm window. I placed in my project same code but  because some reason if I use UART_UartPutString I see output but printf not 😞

   

#include <stdio.h>  I placed.

   

What it can be ?

0 Likes
1 Solution
Anonymous
Not applicable

1) Add the debug.c/.h file from 'Dynamic_GATT_Service_Configuration' project to workspace explorer of your project.

   

2) Ensure that heap size in your project is big enough to drive printf. The value can be set in your project from CYDWR -> Systems Tab -> Heap size. 

View solution in original post

0 Likes
7 Replies
Anonymous
Not applicable

1) Add the debug.c/.h file from 'Dynamic_GATT_Service_Configuration' project to workspace explorer of your project.

   

2) Ensure that heap size in your project is big enough to drive printf. The value can be set in your project from CYDWR -> Systems Tab -> Heap size. 

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Did you route the UART output to the same pins as in the example project (and start the UART in your code)?

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Please send us your program so we can look at it.

0 Likes
lock attach
Attachments are accessible only for community members.
urchc_1533771
Level 5
Level 5
5 likes given First like received First like given

Hi !

   

Roit , thank you very match about your code I learn !

   

I can`t find place to change heap size. 

   

attached code for check.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

As Roit already stated: CYDWR (this is the view where you usually set the pins)-> Systems Tab (at bottom of the window) -> Heap size (set to 0x200 at least)

   

 

   

Bob

0 Likes
urchc_1533771
Level 5
Level 5
5 likes given First like received First like given

(this is the view where you usually set the pins) was important hint !

   

in example it was 0 , when I changed it start to work !

   

Thanks !

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You are always welcome!

   

 

   

Bob

0 Likes