S-Function uint64_T input/output for simulink code generation error

545 views Asked by At

I am attempting to generate C code with simulink coder for a model with an S-Function on Matlab 2020b. The S-Function contains an int64 input and an int64 output. The update diagram and simulink simulation work fine, therefore my s-function is valid. But C code generation with simulink coder indicates an error stating the maximum supported by the block for code generation is 32 bits, and in my tlc file i have the correct types in my function prototypes. In my S-Function i have also registered the 64 bits data types since SS_UINT64 and SS_INT64 does not exist.

Errore Code : Code cannot be generated for this model because block 'uint64_dummy_mdl/S-Function' is using data type 'int64' which requires 64 bits, but th emaximum supported by the block for code generation is 32

What am i missing? How can i generate the code using a 64 bit data type?

enter image description here

enter image description here

enter image description here

1

There are 1 answers

1
Aram Simonian On

Let's try configuring 64-bit target platform architecture for your model (Configuration Parameters > Hardware Implementation > Device type) I guess that having configured 32-bit target in Configuration Parameters could limit the uints to 32-bit representation.