The printf() function frozen in new create project

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi everyone,

   

I am using the CY8CKIT-042 pioneer kit and PSOC Creator 3.2 SP1 to develop my first PSOC application.

   

Firstly, I create an example project - BLE HID mouse, after doing the Build and Program, the kit works fine and the Putty on PC can receive the debug message.

   

And when I create a new project and revise the _write() for using printf() function (refer to the debug.c of example project), when I do the Debug, the firmware will be frozen at printf(), I found it will run into the infinite loop CY_ISR() in Cm0Start.c.

   

I tried the puts() function, it frozen too; It seems to happen when I called the function of stdio.h.

   

I have checked the Build Settings of the new project, it is same with the example project.

   

please see the attached main.c.

   

Aaron Deng

0 Likes
1 Solution
Anonymous
Not applicable

Can you check what is the size of the heap memory allocated to the system from the project's CYDWR -> Systems tab?

   

Assuming that you have proper libraries to use that function in your system, you may have to increase the memory set for heap size in your project. 

View solution in original post

0 Likes
7 Replies