create hardware configuration object
create a hardware configuration object by using the function in the matlab® command window.
targetobject = targethardware('hardwarename')
for example, to create a configuration object for the raspberry pi® hardware, enter:
board = targethardware('raspberry pi')
board = targethardware with properties: name: 'raspberry pi' deviceaddress: '172.98.233.234' username: 'pi' password: '*********' builddir: '/home/pi' buildaction: 'build, load, and run' coderconfig: [1×1 coder.codeconfig]
verify the
deviceaddress
,username
, andpassword
properties listed in the output. if necessary, change the value of the properties by using dot notation syntax.targetobj.propertyname = newvalue
for example, to change the device address to
173.21.22.327
, enter:board.deviceaddress = '173.21.22.327'
if the matlab function has methods from deep learning toolbox™, perform these steps:
set the language of code generation to c .
board.coderconfig.targetlang = 'c ';
create an
arm-compute
deep learning configuration object and assign it to thedeeplearningconfig
property of the raspberry pi configuration object.dlcfg = coder.deeplearningconfig('arm-compute') dlcfg.armarchitecture = 'armv7'; board.coderconfig.deeplearningconfig = dlcfg;
for more information, see and .