JSON Syntax Error in Simulink Arduino with Flatpak Enabled

12 次查看(过去 30 天)
On NixOS (glnxa64), when I have Flatpak enabled, I will receive an error from the following:
  1. Install Simulink Support Package for Arduino Hardware add-on
  2. Start Hardware Setup wizard in said add-on
  3. Get to the stage where the wizard prompts me to Connect an Arduino Board and is detecting boards
  4. Receive error
JSON syntax error at line 1, column 1 (character 1): expected 'false' but found 'flatpak'
OR (after getting past Hardware Setup)
  1. Click Monitor & Tune in Simulink
  2. Receive error
Error:The following error was encountered during evaluation of the external mode callback 'getExtModeData': codertarget.arduinobase.internal.getExternalModeMexArgs('Serial')
JSON syntax error at line 1, column 1 (character 1): expected 'false' but found 'flatpak'.
There seem to be no additional log created for this error. The only way I've found to work around this error is to remove Flatpak from my system, and re-enable it when I'm done with Simulink.

回答(1 个)

Saurabh
Saurabh 2024-10-10
This issue appears to be related to Flatpak's security measures, which is preventing Simulink from accessing the COM port for device detection, leading to the build error. To address this, try using the flatpak override command with the
--device=DEVICE option.
For more information refer to this doc:
I hope this was helpful.

类别

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

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by