- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the video demonstration: https://www.youtube.com/watch?v=KYj33EPenzk&list=PLIOkqhZiy83H1jB_sWAcYXkP3og0lSai8&index=3
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.
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
2. In the libraries tab , search for retarget IO and check the same and click on update
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:
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.
Hope this helps.
Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
2. In the libraries tab , search for retarget IO and check the same and click on update
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:
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.
Hope this helps.
Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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