Creating a target for Raspberry Pi compute module with Embedded Coder support package
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I'm using Embedded Coder Support Package for ARM Cortex-A Processors to create a target that would deploy code generated in Simulink to Raspberry Pi board, but I can't create a connection.
I follow this tutorial, but I'm stuck at the fifth step with creating a deployer feature. So far I created a target which references to ARM Cortex-A target
tgt = createTarget('My ARM Cortex A Board Target','ARM Cortex-A','c:/mytarget');
and mapped my hardware to it.
hw = createHardware('My ARM Cortex A Board');
hw.DeviceID = 'ARM Cortex-A9';
map(tgt,hw,'My ARM Cortex A Board');
I created an ethernet interface and set the properties as appropriate for my hardware. My raspberry is connected to PC via WI-FI. Up to this point all testTarget() functions were ok. Then I created a deployer feature exactly as in the tutorial, mapped it to my target and hw, created a toolchain and a buildConfiguration.
dep = addNewDeployer(tgt,'My New Deployer');
map(tgt,hw,dep);
toolchain = dep.addNewToolchain('Linaro Toolchain v4.8');
buildConfiguration = toolchain.addNewBuildConfiguration('My Build Configuration');
I set the buildConfiguration as in the tutorial
buildConfiguration.Defines = 'ARM_PROJECT';
buildConfiguration.IncludePaths = '$(ARM_CORTEX_A_ROOT_DIR)/include';
dep.Tokens{1} = struct('Name', 'ARM_CORTEX_A_ROOT_DIR', 'Value', 'codertarget.arm_cortex_a.internal.getSpPkgRootDir');
and created a loader with specified load command
loader = dep.addNewLoader('My Loader');
loader.LoadCommand = 'matlab:codertarget.arm_cortex_a.internal.loadAndRun';
finally I set MATLAB preferences for my hardware.
setpref('Hardware_Connectivity_Installer_My_ARM_Cortex_A_Board', 'DefaultIpAddress', '192.168.1.180');
setpref('Hardware_Connectivity_Installer_My_ARM_Cortex_A_Board', 'DefaultUserName', 'pi');
setpref('Hardware_Connectivity_Installer_My_ARM_Cortex_A_Board', 'DefaultPasswordPref','raspberry');
setpref('Hardware_Connectivity_Installer_My_ARM_Cortex_A_Board', 'DefaultBuildDirPref','/test');
After this the tests show this error message
Running matlabshared.targetsdk.verify.Deployer
### Starting build procedure for model: modelBasicBuild
### Successful completion of build procedure for model: modelBasicBuild
================================================================================
Error occurred in matlabshared.targetsdk.verify.Deployer/checkBuildDownload and it did not run to completion.
---------
Error ID:
---------
'MATLAB:structRefFromNonStruct'
--------------
Error Details:
--------------
Struct contents reference from a non-struct array object.
Error in checkExecutable
Error in matlabshared.targetsdk.verify.Deployer/checkBuildDownload
================================================================================
.
Done matlabshared.targetsdk.verify.Deployer
__________
Failure Summary:
Name Failed Incomplete Reason(s)
==========================================================================================
matlabshared.targetsdk.verify.Deployer/checkBuildDownload X X Errored.
which basically says that I call a struct content from a non-struct array, but that is not very helpful. I even tried to aim for an 'incomplete' test result by creating an empty Deployer without specifying toolchain and buildConfiguration, but the error message is the same.
1 comentario
Respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!