UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
201 Views
Registered: ‎05-04-2018

SDK Auto-Generation Code

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?

0 Kudos
3 Replies
Moderator
Moderator
193 Views
Registered: ‎09-12-2007

Re: SDK Auto-Generation Code

You can use the HSI to create the application:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841693/HSI+debugging+and+optimization+techniques

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_2/ug1138-generating-basic-software-platforms.pdf

 

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

0 Kudos
Adventurer
Adventurer
161 Views
Registered: ‎05-04-2018

Re: SDK Auto-Generation Code

@stephenm 

 

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?

0 Kudos
Moderator
Moderator
157 Views
Registered: ‎09-12-2007

Re: SDK Auto-Generation Code

No the changes done here will affect the mss file. 

 

You can extract the baud from the HDF

open_hw_design design_1_wrapper.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.

 

 

0 Kudos