06-13-2019 02:49 PM
I need to set a macro in a UART PS header to increase the maximum baud from 921k~ to 1 mbps. Right now I have to manually do this and rebuild the entire BSP every time I create a new project. This is because the auto-generated code does not save changes. What scripts do I need to modify in order to auto generate code differently? How about when using FreeRTOS and setting default settings for the FreeRTOS_Config.h file?
06-13-2019 03:12 PM
You can use the HSI to create the application:
See Page 30 og ug1138 above. You can use the example here as a reference. For example:
set drv [hsi::get_drivers axi_uart_0]
common::set_property CONFIG.BAUD 115200 $drv
06-14-2019 09:55 AM
Thank you for that reference. That explains very well how to take a HDF and manipulate characteristics of a design generated via the Vivado GUI. That would be very effective in not re-opening the Vivado GUI, resynthesizing, etc... So if I change baud rate using XSCT will that actually modify the HDF? Lets say I use the two lines you mentioned, set drv [hsi::get_drivers axi_uart_0]
common::set_property CONFIG.BAUD 115200 $drv. Will this save changes by modifying the HDF? Or will this only be local to the current BSP/Hardware project in SDK?
The problem I am having is not actually the baud rate of the UART. The issue I have is the minimum and maximum rates defined in the header. These rates are independent of the HDF, so every time I need to create an application in SDK I have to go to the auto gen code, change the value, save it, then rebuild the entire BSP. What I want to do is to modify my driver set to auto gen this new value the first time I create a BSP. Is this possible?
06-14-2019 10:35 AM
No the changes done here will affect the mss file.
You can extract the baud from the HDF
common::report_property [get_cells axi_uart_0]
You will see the UART param here.
You can use the command similar to below
common::get_property CONFIG.BAUD [get_cells axi_uart_0]
You can use this value in the command in previous post
These commands are covered in the hsi wiki In previous post too.