cancel
Showing results for 
Search instead for 
Did you mean: 

Many problems with STM32-MAT

enrique_corpa
Associate

Posted on June 23, 2017 at 00:43

Hello,

I am having more or less the same kind of problems than the one in this post 

<LINK NO LONGER ACTIVE>

 I am trying a very simple program: a read IO block directly connected to a IO Write block. I started with Matlab R2015b, and after getting lots of errors I installed Matlab R2017a and now I am getting a different kind of errors, in particular this one: Attempt to call a non-function value: SLibModelInitFcnName

More details:

uVision 5.23

STM32CubeMx 4.21

STM32-MAT/TARGET 4.4.1

IOC file generated using the STM32F334 Nucleo discovery board setup, this is also the board that I have.

¿Is this really a problem related to my Matlab's version?¿Does a workaround exist?

I find this whole setup process very absurd and time consuming. ¿Does this really pay off when is up and running?

Here is the whole diagnostics prompt:

The 'ARM CMSIS SIN COS' code replacement library includes the standard math library 'C89/C90 (ANSI)'. To avoid this warning, you can specify the code replacement library as 'None' or remove the base CRL specification if applicable, then select the desired math library via the standard math library (TargetLangStandard) parameter. [2 similar]

### Real-Time Workshop build procedure for method: 'entry

### modelName: 'untitled

### gcs: 'untitled

### bdroot: 'untitled

### Starting Real-Time Workshop build procedure for model: untitled

### Windows version:win64

### Model connectivity is: normal

### Create verification block: None

Code Generation 2 1

Elapsed: 7 sec

### Generating code into build folder: C:\Users\Enrique\Desktop\Test\untitled_stm32

Source 'untitled/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:stm32f3

### Real-Time Workshop build procedure for method: 'before_tlc

### modelName: 'untitled

### gcs: 'untitled

### bdroot: 'untitled

### before_tlc

### Invoking Target Language Compiler on untitled.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

Warning: '---------->STM32_Config: MCU_Name is stm32f3'

.

### Caching model source code

Warning: simMode value is 0.0 0:RTW 1:PIL 2:EXT

Warning: Create real-time application main.c

Error: File: C:\Users\Enrique\Desktop\

Test

\untitled_stm32\tlc\customRoutineProcess.tlc Line: 359 Column: 27

Attempt to call a non-function value: SLibModelInitFcnName

Main program:

==> [00] C:\Users\Enrique\Desktop\

Test

\untitled_stm32\tlc\customRoutineProcess.tlc:<NONE>(359)

[01] C:\MATLAB\R2017a\rtw\c\tlc\mw\formatwide.tlc:<NONE>(483)

Error: File: C:\Users\Enrique\Desktop\

Test

\untitled_stm32\tlc\customRoutineProcess.tlc Line: 359 Column: 47

Values of NULL type cannot be expanded

Main program:

==> [00] C:\Users\Enrique\Desktop\

Test

\untitled_stm32\tlc\customRoutineProcess.tlc:<NONE>(359)

[01] C:\MATLAB\R2017a\rtw\c\tlc\mw\formatwide.tlc:<NONE>(483)

### Writing header file untitled.h

.

### Writing source file untitled.c

### Writing header file STM32_Config.h

### Writing header file untitled_types.h

### Writing header file rtwtypes.h

### Writing header file untitled_private.h

### Writing source file main.c

.

### TLC code generation complete.

### Real-Time Workshop build procedure for method: 'error

### modelName: 'untitled

### gcs: 'untitled

### bdroot: 'untitled

### Real-Time Workshop build procedure for model: 'untitled' aborted due to an error.

Error: Errors occurred - aborting

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on June 23, 2017 at 13:43

Hello,

please replace STM32/script/customRoutineProcess.tlc

with attached file.

BR

Pascal

________________

Attachments :

customRoutineProcess.tlc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyX1&d=%2Fa%2F0X0000000b9u%2FgISxG1oPBjNmXVyZksa0fhzDVJh_tzkWn1HnWL7LOcA&asPdf=false

View solution in original post

5 REPLIES 5
Imen.D
ST Employee
Posted on June 23, 2017 at 11:18

Hi

Corpa.Enrique

,

I will raised your issue internally to the appropriate team.

Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on June 23, 2017 at 13:05

Hello,

this problem is known, and will be fixed in next release.

(I can't attach a file.)

Please replace STM32/script/customRoutineProcess.tlc file

line 179 : %<SLibModelInitFcnName()>(%<SLibModelFcnArgs('Initialize',TLC_TRUE,'')>);

with: %<LibCallModelInitialize()>

and

line 359 :%<SLibModelInitFcnName()>(%<SLibModelFcnArgs('Initialize',TLC_TRUE,'')>);

with: %<LibCallModelInitialize()>

Best regards

Pascal Reynaud

Posted on June 23, 2017 at 13:43

Hello,

please replace STM32/script/customRoutineProcess.tlc

with attached file.

BR

Pascal

________________

Attachments :

customRoutineProcess.tlc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyX1&d=%2Fa%2F0X0000000b9u%2FgISxG1oPBjNmXVyZksa0fhzDVJh_tzkWn1HnWL7LOcA&asPdf=false
Posted on August 01, 2017 at 13:41

thank you�

Posted on May 16, 2018 at 08:46

This tlc file replacement helped me in Matlab 2018a. Building a subsystem does not work. It gives me an Invalid .ioc file error.

It seems like it doesn't execute the after_tlc procedure.

Any suggestions? Please ask if you need any more information.