error during deployment to hardware. available memory exceeds processor memory

24 次查看(过去 30 天)

回答(1 个)

Saurabh
Saurabh 2024-12-10
This error occurs because there is not enough program memory on the target to properly execute the model in External mode and indicates that the model is not compatible to be deployed on the board.
There are a number of factors that influence the memory usage on the Arduino:
Some of the common factors that influence the SRAM used (the heap memory usage) are listed below:
1) Number of signals being logged: Increasing the number of Display and Scope blocks increases the amount of memory needed by the buffer on the Arduino that stores the data collected in External mode. Having too many signal logging blocks can therefore overload the memory on the Arduino.
2) Size of the External Mode buffer: This value determines how many samples are collected in the External Mode buffer before transmitting them back to Simulink. Collecting more samples at a time can affect memory usage on the Arduino.
3) Complexity of the model: Increasing the complexity of the model uses more memory on the Arduino.
There are some known strategies that can be used to address the external mode memory constraints by referring to each of the points above. The following will likely have the greatest effect:
Reducing the number of signals being logged at once.
Reducing the complexity of the model as much as possible.
By implementing these suggestions, it may be possible to reduce the memory requirements of the model to fit under the constraints of the Arduino
If this is not possible, it is recommended to upgrade to a target with more memory.
Refer to the following link that contains the table summarizes a specific Arduino board's memory allocation:
I hope this is helpful.

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

产品


版本

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by