This file exchange submission is an Embedded Coder custom target for Arduino. It uses the Arduino platform as the example hardware, yet the examples it shows can be used to learn and then be applied on any custom target. In an applied way - it shows capabilities and steps that leverage many features of Embedded Coder and creating custom targets. Arduino has been selected since it is widely accessible, has a large DIY community, and is a great platform to explore the varying things that a custom target would need as the various Arduino platforms change.
A custom target author can use this submission to extend/create more Arduino targets, or to simply use this as an example to create your own. An end user that has Embedded Coder can use this submission for their Arduinos.
Some highlights included in this custom target include:
- Shows how to handle dependencies for different Arduino boards (and even non-Arduino boards). Current set includes Uno, Leonardo, Mega2560.
- Options available to drive to minimal footprint and memory
- Processor in the Loop (PIL)
- Numerous scheduling and timing modes explored.
- Overrun detection exposed in the Simulink algorithm directly to allow for algorithmic adjustments when overrun is detected during execution.
- A wealth of examples on how to add/change peripherals blocks/capabilities (LCD, Servo Motor, UART, printf into UART, DIO, Ultrasonic sensor, Async interrupt, I²C Master, I²C Slave, etc, etc).
Additional resources for creating custom targets
- Embedded Coder Product Documentation
www.mathworks.com/help/ecoder/index.html (account/license required)
- Developing Embedded Targets Advisory Service
- MATLAB Answers: example of developing a custom target
Note: Only Arduino IDE version 1.0.5 is supported and this submission is not maintained to support new IDEs.
For additional Arduino support, see www.mathworks.com/hardware-support/arduino-simulink.html.
MathWorks Embedded Coder Team (2023). Embedded Coder Target for Arduino (https://www.mathworks.com/matlabcentral/fileexchange/30277-embedded-coder-target-for-arduino), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
- removed Due reference - target doesn't support Due yet.
updated other requirements
Updated title and description