STM32 MAT-TARGET is not working with Matlab 2020b

11 views (last 30 days)
I was using Stm32 Mat-Target with the Matlab 2018b version without any problem, but I could not run it with the 2020b version. Is it compatible with 2020b? When I compile the Simulink model, I get an error message as below. The problem seems to be related to Java software. Can anyone suggest a solution for this problem?
  • Operating system is Win7 Ultimate
  • CubeMX version 5.6.1
  • Java version 8 update 281 (build 1.8.0_281-b09)
### Real-Time Workshop build procedure for method: 'entry' ### Starting Real-Time Workshop build procedure for model: 'ssz' Error (2): default is: 4.20 ### STM32CubeMx version in usage is: 4.200000e+00 ### Windows version: 'win64' *** stm32_make_rtw_hook(): 'RTWVerbose' is: 'on' *** stm32_make_rtw_hook(): 'SimulationMode' is: 'normal' ### Model connectivity is: 'normal' ### Create verification block: None *** stm32_make_rtw_hook(): Found '.\ssz.ioc' from Simulink model ### Generating code and artifacts to 'Model specific' folder structure ### Generating code into build folder: C:\temp\ssz\ssz_stm32 ----------->SFUNC MODE: SS_SIMMODE_RTWGEN ----------->Model reference Simulink(R) Coder(TM) target is building ----------->SFUNC MODE: SS_SIMMODE_RTWGEN ----------->Model reference Simulink(R) Coder(TM) target is building ----------->SFUNC MODE: SS_SIMMODE_RTWGEN ----------->Model reference Simulink(R) Coder(TM) target is building ----------->SFUNC MODE: SS_SIMMODE_RTWGEN ----------->Model reference Simulink(R) Coder(TM) target is building ----------->STM32 MCU:stm32f4 ### Real-Time Workshop build procedure for method: 'before_tlc' *** stm32_make_rtw_hook(): 'ssz' has ModelReferenceTargetType set to: 'NONE' *** stm32_make_rtw_hook(): updateTlcCustomizationOfMain(ssz,1,normal) *** stm32_make_rtw_hook(): updateTlcCustomizationOfMain(): -> 'RTW' ### Invoking Target Language Compiler on ssz.rtw ### Using System Target File: C:\MATLAB\STM32-MAT\STM32\rtw\stm32.tlc ### Loading TLC function libraries ### Initial pass through model to cache user defined code . ### Caching model source code Warning: SYS Timebase Source value is 'TIMx' Warning: Fundamental sample time is set to: '0.001000000' s by the Simulink model Warning: Fundamental sample time is set to: '1' ms by the Simulink model Warning: Customizing the main entry point is requested as 'RTW' for 'ssz' Warning: Create main.c for Real Time Mode with 'ssz' Warning: Number of sample times is set to: '1' ### Writing header file ssz_types.h ### Writing header file ssz.h ### Writing source file ssz.c ### Writing header file ssz_External_Functions.h ### Writing header file STM32_Config.h . ### Writing header file rtwtypes.h ### Writing header file ssz_private.h ### Writing source file ssz_data.c ### Writing source file main.c ### Writing source file stm32xxxx_it.c ### TLC code generation complete. ### Real-Time Workshop build procedure for method: 'after_tlc' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Adding source and include directories to make process. STM32 package install path: C:\MATLAB\STM32-~1\STM32 - additional source directories: C:\MATLAB\STM32-~1\STM32\addSrc\src - additional include directories: C:\MATLAB\STM32-~1\STM32\addSrc\inc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Creating HTML report file ssz_codegen_rpt.html### Real-Time Workshop build procedure for method: 'before_make' . ### Processing Template Makefile: C:\MATLAB\STM32-MAT\STM32\rtw\stm32.tmf
Warning: The following preprocessor macros MODEL_HAS_DYNAMICALLY_LOADED_SFCNS are specified in the component's build information (RTW.BuildInfo) but the specified template makefile C:\MATLAB\STM32-MAT\STM32\rtw\stm32.tmf does not contain the token |>DEFINES_OTHER<|. [2 similar]
### Created makefile C:\temp\ssz\ssz_stm32\ssz.mk ### Building ssz: .\ssz.bat C:\temp\ssz\ssz_stm32>set MATLAB=C:\Program Files\Polyspace\R2020b C:\temp\ssz\ssz_stm32>"C:\Program Files\Polyspace\R2020b\bin\win64\gmake" -f ssz.mk GENERATE_ASAP2=0 OPTS="-DTID01EQ=0" ### BUILD_MODE : real_time ### PRODUCT : ssz.out ### SHRLIBTARGET : 0 ### MODULES : main.c ssz_data.c stm32xxxx_it.c ### MODELREF_TARGET_TYPE : NONE ### MAKEFILEBUILDER_TGT : 0 ### STANDALONE_SUPPRESS_EXE : 0 ### Source main.c done ### Source ssz_data.c done ### Source stm32xxxx_it.c done ### Source ssz.c done ### Ending ssz.out real_time ### Created ssz.out successfully (or it was already up to date)
### Real-Time Workshop build procedure for method: 'after_make' ### Real-Time Workshop build procedure for method: 'exit' ### Successful completion of Real-Time Workshop build procedure for model: 'ssz' *** stm32_make_rtw_hook(): working in: C:\temp\ssz\ssz_stm32 *** stm32_make_rtw_hook(): Found 'C:\temp\ssz\ssz.ioc' from Simulink model ### Parse STM32CubeMX ioc configuration file: 'C:\temp\ssz\ssz.ioc' ### Copy generated files to STM32CubeMX working repository (C:\temp\ssz). !!!!ERROR : MATLAB:Java:GenericException : Java exception occurred: java.io.FileNotFoundException: C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX \db\mcu\STM32F407V(E-G)Tx.XML (Sistem belirtilen yolu bulamıyor) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileInputStream.<init>(FileInputStream.java:93) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205) !!!!ERROR IOC file: Mcu.Name=STM32F407V(E-G)Tx does not match any XML file. !!!!ERROR IOC file: Open ioc file using STM32CubeMX and save it. Mcu.Name will be updated. ### Real-Time Workshop build procedure for method: 'error' ### Real-Time Workshop build procedure for model: 'ssz' aborted due to an error.
Build Summary
1
Elapsed: 0.45 sec
Top model targets built: Model Action Rebuild Reason ================================================================= ssz Failed Code generation information file does not exist. 0 of 1 models built (0 models already up to date) Build duration: 0h 0m 25.141s
The call to stm32_make_rtw_hook, during the exit hook generated the following error: stm32_make_rtw_hook(): error with getSTM32CoreType() The build process will terminate as a result.
Caused by:
  • stm32_make_rtw_hook(): error with getSTM32CoreType()
Thanks for your help.
  1 Comment
Serkann Sezzen
Serkann Sezzen on 1 Apr 2021
The issue has been resolved as a result of some updates. However, I am not sure what the problem was. The working configuration is as follows;
  • Operating system is Win7 Ultimate
  • Matlab 2020b
  • CubeMX 6.2.0
  • STM32-MAT/TARGET 5.6.0
  • Keil uVision V5.29.0.0

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!