MATLAB: Do I get an error when I switch the Hardware Board model parameter to ZedBoard (or other Zynq platforms) in R2019a or R2019b

Embedded Coderzynq

After installing the "Embedded Coder Support Package for Xilinx Zynq Platform" in R2019a or R2019b, I tried to switch the "Hardware Board" to one of the following Zynq platforms in the Configuration Parameters of my Simulink model:
  • Zedboard
  • Xilinx Zynq UltraScale+ MPSoC ZCU102 Evaluation Kit
  • Xilinx Zynq ZC706 evaluation kit
However, I am unable to do so and the following error message appears:
An unexpected error occurred while creating the Configuration Parameters Dialog. This might be caused by
functions in your MATLAB path that shadow built-in MATLAB functions.
Undefined function or variable 'matlabshared.target.xilinxzynq.getInstallSpPkgMsg'.
file: C:\MATLAB\2019a\toolbox\target\codertarget\+codertarget\+utils\getTargetHardwareDetailWidgets.p
name: getTargetHardwareDetailWidgets
line: 0

Best Answer

This is a known issue in MATLAB R2019a and R2019b that arises after installing the "Embedded Coder Support Package for Xilinx Zynq Platform" when the new "SoC Blockset" toolbox is also installed.
To work around the issue and use the features from the Embedded Coder Support Package, set the below model parameters at the command line:
First, set your hardware board (select the command that applies):
>> set_param(gcs,'HardwareBoard', 'Zedboard')
>> set_param(gcs,'HardwareBoard', 'Xilinx Zynq UltraScale+ MPSoC ZCU102 Evaluation Kit')
>> set_param(gcs,'HardwareBoard', 'Xilinx Zynq ZC706 evaluation kit')
Then, enable the Embedded Coder Support Package feature set for your model:
>> set_param(gcs,'HardwareBoardFeatureSet', 'EmbeddedCoderHSP')