Hi Charlotte,
It seems that you are encountering an "XCP internal error" while compiling, which is due to the external mode requiring an active COM port between the target and the host PC. To resolve this issue, please follow the steps below to ensure the port configurations are correct:
- Open the Device Manager on your PC. You can do this by right-clicking on the Start button and selecting "Device Manager" from the menu.
- In the Device Manager window, look for the "Ports (COM & LPT)" category and expand it by clicking on the arrow next to it.
- By following these steps, you will be able to find the COM port number associated with "STMircroelectronics STLink Virtual COM port.
- Now, Open the “.ioc” file created for the STM32F446RE hardware, go to Connectivity > Pinout & Configuration.
- Check which USART is enabled in the Connectivity.
- Now, in your Simulink model, navigate to Connectivity > Target hardware resources > Hardware Implementation > Hardware setting.
- Adjust the USART and Serial port in the connectivity to match the label found in steps (3) & (5).
I hope this resolves your query on “XCP external error”.
Thanks,
Rangesh.