我们在使用simulink开发硬件的时候有时候会遇到Failed to generate all binary outputs.这样的问题,导致代码生成错误。我最近也遇到这个问题,搞了一个晚上,弄明白我这个过程中产生问题的原因。我是用simulink开发STM32,我的错误信息如下:
### Real-Time Workshop build procedure for method: 'entry
### modelName: 'STM32LED11
### gcs: 'STM32LED11
### bdroot: 'STM32LED11
### Starting Real-Time Workshop build procedure for model: STM32LED11
### Windows version:win64
### Model connectivity is: normal
### Create verification block: None
Code Generation 2 3
Elapsed: 46 sec
### Generating code into build folder: I:\STM32CubeMX\STM32LED11_stm32
Output port 2 of 'STM32LED11/Subsystem/ADC_Read' is not connected. [2 similar]
Component: Simulink | Category: Block warning
Parameter precision loss occurred for 'Value' of 'STM32LED11/Subsystem/Volt'. The parameter's value cannot be represented exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'.
Component: Simulink | Category: Block warning
----------->STM32 MCU:stm32f4
### Real-Time Workshop build procedure for method: 'before_tlc
### modelName: 'STM32LED11
### gcs: &#
### Real-Time Workshop build procedure for method: 'entry
### modelName: 'STM32LED11
### gcs: 'STM32LED11
### bdroot: 'STM32LED11
### Starting Real-Time Workshop build procedure for model: STM32LED11
### Windows version:win64
### Model connectivity is: normal
### Create verification block: None
Code Generation 2 3
Elapsed: 46 sec
### Generating code into build folder: I:\STM32CubeMX\STM32LED11_stm32
Output port 2 of 'STM32LED11/Subsystem/ADC_Read' is not connected. [2 similar]
Component: Simulink | Category: Block warning
Parameter precision loss occurred for 'Value' of 'STM32LED11/Subsystem/Volt'. The parameter's value cannot be represented exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'.
Component: Simulink | Category: Block warning
----------->STM32 MCU:stm32f4
### Real-Time Workshop build procedure for method: 'before_tlc
### modelName: 'STM32LED11
### gcs: &#