- Ensure you correctly map the Simulink initialization and step functions into your STM32CubeIDE project (usually in main.c).
- Include all required source/header files generated by Simulink. Adjust include paths in CubeIDE if necessary.
- Match the data type settings, clock configurations, and sample rates between Simulink and CubeMX.
- Manually configure any required peripherals (e.g., ADC, PWM) in CubeMX and ensure the generated code does not conflict with CubeMX-generated code.
- Start with a simple Simulink model to confirm the workflow before scaling up to more complex projects.
STM32 Support Package in MATLAB R2025a auf macOS nicht verfügbar – Alternativen?
    7 views (last 30 days)
  
       Show older comments
    
ich arbeite mit einem STM32-Mikrocontroller (STM32G474RE, Cortex-M4) und nutze MATLAB/Simulink R2025a unter macOS.
Ziel ist ein Model-Based-Design-Workflow: Simulink-Modell → C-Codegenerierung → Flashen auf das STM32-Board.
Das „Embedded Coder Support Package for STMicroelectronics STM32 Processors“ erscheint in meinem Add-On Explorer nicht (bzw. lässt sich nicht installieren). Ich vermute, dass das Paket auf macOS nicht unterstützt wird. Ich möchte deshalb wissen, welche empfohlene Alternative es für macOS gibt.
Geplante/gewünschte Alternative (Workaround):
- In Simulink mit Embedded Coder (ARM Cortex-M) generischen C-Code für Cortex-M4 erzeugen (ERT).
- In STM32CubeIDE ein Projekt für STM32G474RE mit CubeMX (Clocks/Peripherie) anlegen.
- Den aus Simulink generierten Code in Src/Inc integrieren und mit CubeIDE bauen/flashen.→ Frage: Ist das der empfohlene Workflow auf macOS? Gibt es dabei etwas, um Reibungsverluste zu vermeiden?
Meine Fragen:
- Ist das STM32-Supportpaket offiziell nicht für macOS verfügbar?
- Ist der Weg Embedded Coder (ARM Cortex-M) → generischer C-Code → Import in STM32CubeIDE für macOS der richtige Ansatz?
- Gibt es eine Schritt-für-Schritt-Empfehlung von MathWorks (oder Beispiele), wie man Simulink-Code sauber in CubeIDE-Projekte integriert ?
- Tipps für External Mode/Host-Kommunikation ohne das STM32-Supportpaket (z. B. UART/USB-CDC Logging, MAT-File Logging, eigene S-Functions)?
0 Comments
Answers (1)
  Simon
 on 21 Aug 2025
        Hi,  
As I understand, you are seeking confirmation that your workflow for using STM32 microcontrollers with MATLAB/Simulink R2025a on macOS which is the correct way, given that the official Embedded Coder Support Package for STM32 is not available for macOS 
Here are some important aspects to consider: 
Please refer to the following documentation which provides instructions on installing and setting up the Embedded Coder Support Package: 
Hope it helps!  
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
