How to get a custom board to show up as a target for 'Hardware Boards' in MATLAB Coder
3 views (last 30 days)
Show older comments
MathWorks Support Team
on 18 Jul 2024
Edited: MathWorks Support Team
on 26 Jul 2024
When generating code with MATLAB embedded coder there is no selection for my target ARM processor: Cortex M7
How do I add my board ARM Cortex-M7?
Accepted Answer
MathWorks Support Team
on 26 Jul 2024
The 'Hardware Board' option is a list of the currently created hardware configuration objects. If your board does not appear on that list but is directly supported by a support package you can still generate code for it. To read more about the 'Hardware Board' list please refer to the following documentation:
Method 1: Generic Hardware
One method is to specify your board as a generic ARM Cortex-M board. When on the 'Generate Code' screen select 'None - Select Device below' for the 'Hardware Board' option. Then you can select the 'ARM Compatible' device vendor and the 'ARM Cortex-M' device type.
This method will allow you to generate code for your board.
Method 2: Custom Target
However, you will have to use another method if you want to associate additional data with your target. For example, if you want to add automated build, PIL or external mode support for their target, you would have to do that through a board definition. Please refer to the following documentation for examples of how to add that additional data to a board definition:
To get your board to show up as a 'Hardware Board' and to create a board definition, you would need to create a 'target.Board' description and then add it to the internal database using 'target.Add'. You may also associate a custom processor to this board as well. Please refer to the following documentation for more details:
Below is a minimal example of the workflow:
myProc = target.create('Processor', ...
'Name', 'My ARM Cortex-M7', ...
'Manufacturer', 'ARM');
Specify the new custom processor for the board.
myCopiedImplementation = target.create('LanguageImplementation', ...
'Name', 'My Arm Copy', ...
'Copy', 'ARM Compatible-ARM Cortex');
Create a Language Implementation object by copying values from the existing ARM Cortex Object
% Customizations for ARM Cortex M-7
myProc.LanguageImplementations = myCopiedImplementation;
Assign the Language Implementation to the processor
hostTarget = target.create('Board', 'Name', 'ARM Cortex-M7');
hostTarget.Processors = myProc;
objectsAdded = target.add(hostTarget);
Create the new board and assign the processor we created. Then add the object to the internal database so it shows up in the 'Hardware Board' dropdown.
Then you are able to select your custom board:
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!