cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6

PhDi_1589426
New Contributor II

Hi,

I tried to implement the stdio.h library to use the printf function.

The way I have done it, it first seemed to work, but after adding BLE functionallity the printf function doesn't work any more.

I attached the project. Could you please review it?

Thanks and best regards

Philipp

0 Likes
1 Solution
ShipingW_81
Moderator
Moderator

Hi Philipp,

Firstly, please select "Dual core" option to allocate the BLE stack to both cores to eliminate the building error.

Then you can add "\r\n" in each printf() function, as below:

printf("%d \r\n",i);

View solution in original post

4 Replies
ShipingW_81
Moderator
Moderator

Hi Philipp,

Firstly, please select "Dual core" option to allocate the BLE stack to both cores to eliminate the building error.

Then you can add "\r\n" in each printf() function, as below:

printf("%d \r\n",i);

View solution in original post

PhDi_1589426
New Contributor II

Hi fwan,

thank you for the fast reply.

It works.

Could you tell me where the failure was?

Was it the missing \r\n or the BLE Stack?

Would be good to know to avoid similar failures.

Best regards

Philipp

0 Likes
ajays_86
Employee

Philipp,

Your project is not building because in top design you have selected Single Core (CM4) but you were trying to initialize the BLE controller from CM0+.

In case of 'printf', if you want to output the string then '\n' is needed to output the data.

Thanks,

Ajay

ShipingW_81
Moderator
Moderator

You can refer to below link for the clarification of this issue:

c - When does printf fail to print? - Stack Overflow

Top labels