stdio_user.h in Modustoolbox v2.4

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

cross mob
aleung
Level 2
Level 2
10 sign-ins 5 replies posted 5 questions asked

In the video demonstration:  https://www.youtube.com/watch?v=KYj33EPenzk&list=PLIOkqhZiy83H1jB_sWAcYXkP3og0lSai8&index=3

xmas0.jpg

 There is modification of a file stdio_user.h.     I am using the Modustoolbox v2.4.  It seems it does not have this file. Do I miss out location?  I was trying to follow the video with the Modustoolbox v2.4.

xmas1.jpgxmas2.jpg

 

 

0 Likes
1 Solution
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @aleung ,

This file is not available in the latest Modus Toolbox v2.4 and this method of including the retarget IO library is also outdated as it was for v 2.2 and below.

For Modus Toolbox v 2.4 you can do the following steps to include this library:

1. Open Library Manager

 

AlenAn14_2-1640398708500.png


2. In the libraries tab , search for retarget IO and check the same and click on update

retarte.png


3. After update, close library manager and in main.c initialize the retarget IO library as mentioned in the PDL documentation of the same as shown below:

AlenAn14_0-1640398631280.png

You can now use printf to send debug messages to the UART pins.

Note : After building the code with above changes, you can find the UART rx and tx pins (value of macros CYBSP_DEBUG_UART_TX and CYBSP_DEBUG_UART_RX) in the cycfg_pins.h file of the BSP as shown below.

AlenAn14_3-1640399550923.png

 


Hope this helps.

Regards
Alen

View solution in original post

0 Likes
3 Replies
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @aleung ,

This file is not available in the latest Modus Toolbox v2.4 and this method of including the retarget IO library is also outdated as it was for v 2.2 and below.

For Modus Toolbox v 2.4 you can do the following steps to include this library:

1. Open Library Manager

 

AlenAn14_2-1640398708500.png


2. In the libraries tab , search for retarget IO and check the same and click on update

retarte.png


3. After update, close library manager and in main.c initialize the retarget IO library as mentioned in the PDL documentation of the same as shown below:

AlenAn14_0-1640398631280.png

You can now use printf to send debug messages to the UART pins.

Note : After building the code with above changes, you can find the UART rx and tx pins (value of macros CYBSP_DEBUG_UART_TX and CYBSP_DEBUG_UART_RX) in the cycfg_pins.h file of the BSP as shown below.

AlenAn14_3-1640399550923.png

 


Hope this helps.

Regards
Alen

0 Likes
aleung
Level 2
Level 2
10 sign-ins 5 replies posted 5 questions asked

Hi, I followed the steps it works and can printf .   I further try to rename the CYBSP_DEBUG_UART_TX and CYBSP_DEBUG_UART_RX  to  MYY_TX, MYY_RX, in the device condifgurator as shown follow on P3(1), P3(0) and SB2:

p1.jpg

p2.jpg

p3.jpg

and in the main.c,  change the line as :

result = cy_retarget_io_init(MYY_TX, MYY_RX, CY_RETARGET_IO_BAUDRATE);

but the 'result'  is not success.  Any step I made wrong?   

0 Likes
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @aleung ,

Can you please create a new thread for this issue as the issue of this thread involving stdio_user.h has been resolved and we will be happy to help you on the same.

Regards
Alen

0 Likes