How can I fix 'Failed to generate all binary outputs' error when using stm32f4-discovery with SIMULINK?

1 visualización (últimos 30 días)
I am encountering the following error when attempting to build a simple model for toggling LED on the discovery board. I am using the simple LED model given in the examples for starting with the stm32f4-discovery support package. picture is also given. how can i remove this error?
### Generating code into build folder: C:\Users\ASAD\Documents\MATLAB\stm32f4discovery_led4_ert_rtw ### Invoking Target Language Compiler on stm32f4discovery_led4.rtw ### Using System Target File: D:\MATLAB_ProgramFiles_Installed\R2014a\rtw\c\ert\ert.tlc ### Loading TLC function libraries ### Initial pass through model to cache user defined code ### Caching model source code ### Writing header file stm32f4discovery_led4.h ### Writing header file stm32f4discovery_led4_types.h ### Writing header file rtwtypes.h ### Writing source file stm32f4discovery_led4.c ### Writing header file stm32f4discovery_led4_private.h ### Writing source file stm32f4discovery_led4_data.c ### Writing source file ert_main.c ### TLC code generation complete. .### Evaluating PostCodeGenCommand specified in the model ### Using toolchain: GNU Tools for ARM Embedded Processors v4.7 | gmake (64-bit Windows) ### 'C:\Users\ASAD\Documents\MATLAB\stm32f4discovery_led4_ert_rtw\stm32f4discovery_led4.mk' is up to date ### Building 'stm32f4discovery_led4': D:\MATLAB~1\R2014a\bin\win64\gmake -f stm32f4discovery_led4.mk all C:\Users\ASAD\Documents\MATLAB\stm32f4discovery_led4_ert_rtw>cd .
C:\Users\ASAD\Documents\MATLAB\stm32f4discovery_led4_ert_rtw>if "" == "" (D:\MATLAB~1\R2014a\bin\win64\gmake -f stm32f4discovery_led4.mk all ) else (D:\MATLAB~1\R2014a\bin\win64\gmake -f stm32f4discovery_led4.mk ) arm-none-eabi-gcc -std=c99 -MD -ffunction-sections -fdata-sections -Wall -c -O0 -mcpu=cortex-m4 -mthumb -mlittle-endian -mthumb-interwork -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -include stm32f4xx.h -DMODEL=stm32f4discovery_led4 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DUSE_STDPERIPH_DRIVER -DUSE_STM32F4_DISCOVERY -DSTM32F4XX -DARM_MATH_CM4=1 -D__FPU_PRESENT=1 -D__FPU_USED=1 -DHSE_VALUE=8000000 -DNULL=0 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DRT -DSTACK_SIZE=64 -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DMODEL=stm32f4discovery_led4 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/ASAD/Documents/MATLAB/stm32f4discovery_led4_ert_rtw -IC:/Users/ASAD/Documents/MATLAB -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/stm32f4discovery/stm32f4discoveryexamples -ID:/MATLAB~1/R2014a/extern/include -ID:/MATLAB~1/R2014a/simulink/include -ID:/MATLAB~1/R2014a/rtw/c/src -ID:/MATLAB~1/R2014a/rtw/c/src/ext_mode/common -ID:/MATLAB~1/R2014a/rtw/c/ert -ID:/MATLAB~1/R2014a/rtw/c/src/ext_mode/serial -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/Include -ID:/CMSIS-SP-00300-r4p2-00rel0/CMSIS/Include -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/STM32F4-Discovery_FW_V1.1.0/Project/Peripheral_Examples/SysTick -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/STM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver/inc -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/stm32f4discovery/include -o "stm32f4discovery_led4.o" "stm32f4discovery_led4.c" arm-none-eabi-gcc -std=c99 -MD -ffunction-sections -fdata-sections -Wall -c -O0 -mcpu=cortex-m4 -mthumb -mlittle-endian -mthumb-interwork -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -include stm32f4xx.h -DMODEL=stm32f4discovery_led4 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DUSE_STDPERIPH_DRIVER -DUSE_STM32F4_DISCOVERY -DSTM32F4XX -DARM_MATH_CM4=1 -D__FPU_PRESENT=1 -D__FPU_USED=1 -DHSE_VALUE=8000000 -DNULL=0 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DRT -DSTACK_SIZE=64 -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DMODEL=stm32f4discovery_led4 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/ASAD/Documents/MATLAB/stm32f4discovery_led4_ert_rtw -IC:/Users/ASAD/Documents/MATLAB -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/stm32f4discovery/stm32f4discoveryexamples -ID:/MATLAB~1/R2014a/extern/include -ID:/MATLAB~1/R2014a/simulink/include -ID:/MATLAB~1/R2014a/rtw/c/src -ID:/MATLAB~1/R2014a/rtw/c/src/ext_mode/common -ID:/MATLAB~1/R2014a/rtw/c/ert -ID:/MATLAB~1/R2014a/rtw/c/src/ext_mode/serial -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/Include -ID:/CMSIS-SP-00300-r4p2-00rel0/CMSIS/Include -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/STM32F4-Discovery_FW_V1.1.0/Project/Peripheral_Examples/SysTick -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/STM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver/inc -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/stm32f4discovery/include -o "stm32f4discovery_led4_data.o" "stm32f4discovery_led4_data.c" arm-none-eabi-gcc -std=c99 -MD -ffunction-sections -fdata-sections -Wall -c -O0 -mcpu=cortex-m4 -mthumb -mlittle-endian -mthumb-interwork -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -include stm32f4xx.h -DMODEL=stm32f4discovery_led4 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DUSE_STDPERIPH_DRIVER -DUSE_STM32F4_DISCOVERY -DSTM32F4XX -DARM_MATH_CM4=1 -D__FPU_PRESENT=1 -D__FPU_USED=1 -DHSE_VALUE=8000000 -DNULL=0 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DRT -DSTACK_SIZE=64 -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DMODEL=stm32f4discovery_led4 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/ASAD/Documents/MATLAB/stm32f4discovery_led4_ert_rtw -IC:/Users/ASAD/Documents/MATLAB -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/stm32f4discovery/stm32f4discoveryexamples -ID:/MATLAB~1/R2014a/extern/include -ID:/MATLAB~1/R2014a/simulink/include -ID:/MATLAB~1/R2014a/rtw/c/src -ID:/MATLAB~1/R2014a/rtw/c/src/ext_mode/common -ID:/MATLAB~1/R2014a/rtw/c/ert -ID:/MATLAB~1/R2014a/rtw/c/src/ext_mode/serial -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/Include -ID:/CMSIS-SP-00300-r4p2-00rel0/CMSIS/Include -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/STM32F4-Discovery_FW_V1.1.0/Project/Peripheral_Examples/SysTick -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/STM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver/inc -ID:/MATLAB_ProgramFiles_Installed/SupportPackages/R2014a/stm32f4discovery/include -o "ert_main.o" "ert_main.c" ert_main.c: In function 'main': ert_main.c:45: warning: unused variable 'systemClock' "### Creating standalone executable "../stm32f4discovery_led4.elf" ..." arm-none-eabi-g++ -Wl,--gc-sections -Wl,-Map="stm32f4discovery_led4.map" -mcpu=cortex-m4 -mthumb -mlittle-endian -mthumb-interwork -mfpu=fpv4-sp-d16 -mfloat-abi=hard -nostartfiles -T "D:\MATLAB_ProgramFiles_Installed\SupportPackages\R2014a\stm32f4discovery/src/arm-gcc-link.ld" -o ../stm32f4discovery_led4.elf stm32f4discovery_led4.o stm32f4discovery_led4_data.o stm32f4xx_gpio.o stm32f4xx_rcc.o stm32f4xx_gpio_wrapper.o startup_stm32f4xx.o syscalls_stm32f4xx.o stm32f4xx_init_board.o arm_cortex_m_multitasking.o system_stm32f4xx.o SysTickScheduler.o ert_main.o D:/CMSIS-SP-00300-r4p2-00rel0/CMSIS/Lib/GCC/libarm_cortexM4lf_math.a -lm -lm c:/program files (x86)/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld.exe: error: c:/program files (x86)/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-memset.o) uses VFP register arguments, ../stm32f4discovery_led4.elf does not c:/program files (x86)/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file c:/program files (x86)/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-memset.o) collect2: ld returned 1 exit status gmake: * [../stm32f4discovery_led4.elf] Error 1
C:\Users\ASAD\Documents\MATLAB\stm32f4discovery_led4_ert_rtw>echo The make command returned an error of 2 The make command returned an error of 2
C:\Users\ASAD\Documents\MATLAB\stm32f4discovery_led4_ert_rtw>An_error_occurred_during_the_call_to_make 'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command, operable program or batch file.
[Warning: The following error was caught while executing 'onCleanup' class destructor:
Invalid or deleted object.]
### Build procedure for model: 'stm32f4discovery_led4' aborted due to an error.
Error(s) encountered while building model "stm32f4discovery_led4":
### Failed to generate all binary outputs.
Component: Simulink | Category: Model error

Respuestas (2)

Damien
Damien el 17 de Abr. de 2015
Hi Asad,
Did you ever find a solution to this problem?
Thanks!
Damien
  2 comentarios
Asad Ali
Asad Ali el 17 de Abr. de 2015
Hi Damien,
It was a software related problem. I just reinstalled the STM discovery support package. It worked fine then. :)
Andrea Carloni
Andrea Carloni el 11 de Sept. de 2018
Hi Asad,
What is the name of your STM discovery support package?
Please help!
Andrea

Iniciar sesión para comentar.


eltaib Ibrahim
eltaib Ibrahim el 21 de Dic. de 2017
Hello friends I have the same problem and tried to reinstall it again but still. how i can to solve it ?

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by