2017-04-19 11:54 AM
Greetings
I tried for 2.5 days to build a Matlab/Simulink (matlab 2017a) model and use ST_MAT_Library(4.4.1) to generate code. But it didn't work. I setup the system target file as 'stm32.tlc', and I added the path of stm32_mat_target in my matlab path.
I used STM32Cubemx (4.20) and Keil (MDK-ARM V5, the free trial version).
What should I do?
Thank you
Lixin
Here are the error information:
------------------------------------------------------------------------------------------------
Build 4 1 1 Clear
02:29 PM Elapsed: 6 sec♯♯♯ Real-Time Workshop build procedure for method: 'entry♯♯♯ modelName: 'model_for_test_h♯♯♯ gcs: 'model_for_test_h♯♯♯ bdroot: 'model_for_test_h♯♯♯ Starting Real-Time Workshop build procedure for model: model_for_test_h
♯♯♯ Windows version:win64♯♯♯ Model connectivity is: external♯♯♯ Create verification block: None (External mode)♯♯♯ External mode parameters: 0,1,115200,10 Code Generation 2 1Elapsed: 3 sec♯♯♯ Generating code into build folder: C:\ST\open loop stm32f100c6t6\model_for_test_h_stm32Source 'model_for_test_h/GPIO_Read' specifies that its sample time (-1) is back-inherited. You should explicitly specify the sample time of sources. You can disable this diagnostic by setting the 'Source block specifies -1 sample time' diagnostic to 'none' in the Sample Time group on the Diagnostics pane of the Configuration Parameters dialog box.Component:Simulink | Category:Block warning----------->STM32 MCU:stm32f4♯♯♯ Real-Time Workshop build procedure for method: 'before_tlc♯♯♯ modelName: 'model_for_test_h♯♯♯ gcs: 'model_for_test_h♯♯♯ bdroot: 'model_for_test_h♯♯♯ before_tlc♯♯♯ Invoking Target Language Compiler on model_for_test_h.rtw♯♯♯ Using System Target File: C:\Matlab\STM32\rtw\stm32.tlc♯♯♯ Loading TLC function libraries♯♯♯ Initial pass through model to cache user defined codeWarning: '---------->STM32_Config: MCU_Name is stm32f4'.♯♯♯ Caching model source codeWarning: simMode value is 2.0 0:RTW 1:PIL 2:EXTWarning: Create external mode application main.cError: File: C:\ST\open loop stm32f100c6t6\model_for_test_h_stm32\tlc\customRoutineProcess.tlc Line: 179 Column: 27Attempt to call a non-function value: SLibModelInitFcnNameMain program:==> [00] C:\ST\open loop stm32f100c6t6\model_for_test_h_stm32\tlc\customRoutineProcess.tlc:<NONE>(179) [01] C:\MATLAB_R2017a\rtw\c\tlc\mw\formatwide.tlc:<NONE>(483)Error: File: C:\ST\open loop stm32f100c6t6\model_for_test_h_stm32\tlc\customRoutineProcess.tlc Line: 179 Column: 47Values of NULL type cannot be expandedMain program:==> [00] C:\ST\open loop stm32f100c6t6\model_for_test_h_stm32\tlc\customRoutineProcess.tlc:<NONE>(179) [01] C:\MATLAB_R2017a\rtw\c\tlc\mw\formatwide.tlc:<NONE>(483).♯♯♯ Writing header file model_for_test_h.h♯♯♯ Writing source file model_for_test_h.c.♯♯♯ Writing header file STM32_Config.h♯♯♯ Writing header file model_for_test_h_types.h♯♯♯ Writing header file rtwtypes.h♯♯♯ Writing header file multiword_types.h♯♯♯ Writing header file model_for_test_h_private.h♯♯♯ Writing source file main.c.♯♯♯ TLC code generation complete.♯♯♯ Generating TLC interface API.♯♯♯ Creating data type transition file model_for_test_h_dt.h.♯♯♯ Real-Time Workshop build procedure for method: 'error♯♯♯ modelName: 'model_for_test_h♯♯♯ gcs: 'model_for_test_h♯♯♯ bdroot: 'model_for_test_h♯♯♯ Real-Time Workshop build procedure for model: 'model_for_test_h' aborted due to an error.Error: Errors occurred - abortingComponent:Simulink | Category:Block diagram error#stm32-mat/target-matlabSolved! Go to Solution.
2017-04-20 06:12 AM
I solved this problem by switching to Matlab 2016B from Matlab 2017A. Thanks.
2017-04-19 04:23 PM
can you attache an image of your Simulink project
2017-04-20 06:12 AM
I solved this problem by switching to Matlab 2016B from Matlab 2017A. Thanks.