Bug in Compatibility - Closed Loop PID Autotune & Arduino Nano 33 IoT
    조회 수: 7 (최근 30일)
  
       이전 댓글 표시
    
Greetings,
This evening I was attempting to use the Closed Loop PID Autotuner block in my model as shown below:

When attempting to build and run on an Arduino Nano 33 IoT, I get a couple of errors which I believe may be pointing to a collision in naming conventions. Phase Managment and Power Management. See the snippets below:
In file included from C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0, 
from C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/samd.h:105, 
from C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/sam.h:540, 
from C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/hardware/samd/1.8.9/cores/arduino/Arduino.h:48, 
from C:/ProgramData/MATLAB/SupportPackages/R2024b/toolbox/target/supportpackages/arduinotarget/scheduler/include/arduinoARM_M0plusScheduler.h:9, 
from C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/MW_target_hardware_resources.h:8, 
from C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled.h:39, 
from C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled.c:20: 
C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:474:38: error: expected ')' before '*' token 
#define PM                ((Pm       *)0x40000400UL) /**< \brief (PM) APB Base Address */ 
^ 
C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled.h:610:10: note: in expansion of macro 'PM' 
real_T PM;                           /* '<S1>/ExternalModeMonitor' */ 
^ 
C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:474:40: error: expected ')' before numeric constant 
#define PM                ((Pm       *)0x40000400UL) /**< \brief (PM) APB Base Address */ 
^ 
C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled.h:610:10: note: in expansion of macro 'PM' 
real_T PM;                           /* '<S1>/ExternalModeMonitor' */ 
^ 
C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled.c: In function 'untitled_computePM': 
C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:474:38: error: expected ')' before '*' token 
#define PM                ((Pm       *)0x40000400UL) /**< \brief (PM) APB Base Address */ 
^ 
C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled.c:3490:10: note: in expansion of macro 'PM' 
real_T PM; 
^ 
C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:474:40: error: expected ')' before numeric constant 
#define PM                ((Pm       *)0x40000400UL) /**< \brief (PM) APB Base Address */ 
^ 
C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled.c:3490:10: note: in expansion of macro 'PM' 
real_T PM; 
^ 
C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled.c:3508:6: error: lvalue required as left operand of assignment 
PM = x - 180.0; 
^ 
C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled.c:3509:3: error: incompatible types when returning type 'struct Pm *' but 'real_T' was expected 
return PM; 
^ 
and this one:
In file included from C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0, 
                 from C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/samd.h:105, 
                 from C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/sam.h:540, 
                 from C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/hardware/samd/1.8.9/cores/arduino/Arduino.h:48, 
                 from C:/ProgramData/MATLAB/SupportPackages/R2024b/toolbox/target/supportpackages/arduinotarget/scheduler/include/arduinoARM_M0plusScheduler.h:9, 
                 from C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/MW_target_hardware_resources.h:8, 
                 from C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled.h:39, 
                 from C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled_data.c:20: 
C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:474:38: error: expected ')' before '*' token 
 #define PM                ((Pm       *)0x40000400UL) /**< \brief (PM) APB Base Address */ 
                                      ^ 
C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled.h:610:10: note: in expansion of macro 'PM' 
   real_T PM;                           /* '<S1>/ExternalModeMonitor' */ 
          ^ 
C:/ProgramData/MATLAB/SupportPackages/R2024b/aCLI/data/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:474:40: error: expected ')' before numeric constant 
 #define PM                ((Pm       *)0x40000400UL) /**< \brief (PM) APB Base Address */ 
                                        ^ 
C:/Users/Coach/MATLAB~1/MINIRO~1/PULSEM~1/untitled_ert_rtw/untitled.h:610:10: note: in expansion of macro 'PM' 
   real_T PM;                           /* '<S1>/ExternalModeMonitor' */ 
          ^ 
May I get some assistance in confirming this is indeed a compatibility issue? 
Cheers,
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

