SIMULINK does not connect Arduino when working with MATLAB project folder ".prj"

조회 수: 1 (최근 30일)
Azizhan
Azizhan 2023년 3월 16일
답변: Azizhan 2023년 3월 28일
Hello Programmers,
I want to do PIL simulation in my MATLAB project folder. I can generate PIL block from Simulink and simulate outside of the project folder without any problem. When I want to Simulate inside the Project folder, I can not connect the Arduino Hardware.
I recieve this error;
The file containing block diagram 'Arduino_Funcv1' is shadowed by a file of the same name higher on the MATLAB path. This can cause unexpected behavior. For more information see "Avoiding Problems with Shadowed Files" in the Simulink documentation. The file containing the block diagram is: C:\Users\azizogla\Documents\NXBRAKE2026_SVN\trunk\Simulation\nXBRAKE_01\S-Models\VirtualTest\PILv1\Arduino_Funcv1.slx. The file higher on the MATLAB path is: C:\Users\azizogla\Documents\NXBRAKE2026_SVN\trunk\Simulation\nXBRAKE_01\S-Models\VirtualTest\Arduino_Funcv1.slx
2 similar
Component:Simulink | Category:Block diagram warning
### Connectivity configuration for "C:\Users\azizogla\Documents\NXBRAKE2026_SVN\trunk\Simulation\nXBRAKE_01\S-CodeGen\ARMCortex\ControllerSIM": Arduino Board ### ### COM port: COM7 ### Baud rate: 115200 ### Preparing to start PIL block simulation: Arduino_Funcv1/ControllerSIM1 ... ### Using toolchain: Arduino ARM ### 'C:\Users\azizogla\Documents\NXBRAKE2026_SVN\trunk\Simulation\nXBRAKE_01\S-CodeGen\ARMCortex\ControllerSIM\pil\ControllerSIM.mk' is up to date ### Building 'ControllerSIM': "C:\KBApps\MATLAB\R2021b\bin\win64\gmake" -f ControllerSIM.mk all C:\Users\azizogla\Documents\NXBRAKE2026_SVN\trunk\Simulation\nXBRAKE_01\S-CodeGen\ARMCortex\ControllerSIM\pil>cd . C:\Users\azizogla\Documents\NXBRAKE2026_SVN\trunk\Simulation\nXBRAKE_01\S-CodeGen\ARMCortex\ControllerSIM\pil>chcp 1252 Active code page: 1252 C:\Users\azizogla\Documents\NXBRAKE2026_SVN\trunk\Simulation\nXBRAKE_01\S-CodeGen\ARMCortex\ControllerSIM\pil>if "all" == "" ("C:\KBApps\MATLAB\R2021b\bin\win64\gmake" -f ControllerSIM.mk all ) else ("C:\KBApps\MATLAB\R2021b\bin\win64\gmake" -f ControllerSIM.mk all ) echo "### Invoking postbuild tool "Binary Converter" ..." "### Invoking postbuild tool "Binary Converter" ..." "C:/ProgramData/MATLAB/SupportPackages/R2021b/aIDE/portable/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O binary ./ControllerSIM.elf ../../../ControllerSIM.bin echo "### Done invoking postbuild tool." "### Done invoking postbuild tool." echo "### Successfully generated all binary outputs." "### Successfully generated all binary outputs." C:\Users\azizogla\Documents\NXBRAKE2026_SVN\trunk\Simulation\nXBRAKE_01\S-CodeGen\ARMCortex\ControllerSIM\pil>exit /B 0
### Starting application: 'S-CodeGen\ARMCortex\ControllerSIM\pil\ControllerSIM.elf' ARM Memory Usage ---------------------- device - ARM Cortex-M3 Program: 22716 bytes (4.3% Full) (.text) Data: 3216 bytes (3.3% Full) (.data + .bss)
Failed to connect to Arduino board. Verify connection and the host COM port number entered in 'Configuration Parameters > Target hardware resources > Host-board connection' and try again. To find out the COM port number in Windows, open Device Manager and open your board in the COM ports group.
Thank you for your helps.
Regrads,
Aziz

답변 (1개)

Azizhan
Azizhan 2023년 3월 28일
I found the answer, just change to path to simulation folder.

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by