Minseg hardware simulink deployment - "failed to generate binary" error

I am trying to deploy a very simple model using simulink to my minseg device (Arduino Mega 2560) and I keep getting an error that states: "Error(s) encountered while building "Minseg_test_1": ### Failed to generate all binary outputs."
Here is the model:
And the full diagnostic code:
### Generating code into build folder: B:\SkyDrive\Classes\EE 574 (AE510) - Linear Systems Theory\Final Project\Minseg Labs\Minseg Simulink files\Minseg_test_1_ert_rtw
### Invoking Target Language Compiler on Minseg_test_1.rtw
### Using System Target File: B:\Program Files\MatLab\R2015b\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 Minseg_test_1.h
### Writing header file Minseg_test_1_types.h
.
### Writing header file rtwtypes.h
### Writing source file Minseg_test_1.c
### Writing header file Minseg_test_1_private.h
### Writing source file Minseg_test_1_data.c
### Writing header file rtmodel.h
.
### Writing source file ert_main.c
### TLC code generation complete.
### Creating project marker file: rtw_proj.tmw
### Evaluating PostCodeGenCommand specified in the model
### Using toolchain: Arduino AVR v1.6.1 | gmake (64-bit Windows)
### Creating 'B:\SkyDrive\Classes\EE 574 (AE510) - Linear Systems Theory\Final Project\Minseg Labs\Minseg Simulink files\Minseg_test_1_ert_rtw\Minseg_test_1.mk' ...
### Building 'Minseg_test_1': B:\Program Files\MatLab\R2015b\bin\win64\gmake -f Minseg_test_1.mk all
'B:\Program' is not recognized as an internal or external command,
operable program or batch file.
### Build procedure for model: 'Minseg_test_1' aborted due to an error.
Error(s) encountered while building "Minseg_test_1":
### Failed to generate all binary outputs.

Answers (1)

Sometimes Simulink cannot handle spaces in directory names. I don't know why they didn't fix that long ago.
There is probably some file that can be edited to fix the problem, but I do not have that MATLAB or Simulink (or MS Windows to experiment on.) The work-around that I know would work would be to install MATLAB in a path that had no spaces in the directory name.

2 Comments

I tried your suggestions. I even reinstalled Matlab into a folder that had no spaces. I took out all the spaces in any folder that was a parent folder to where my simulink file is. I think that may have solved some problems but it still isn't working. The error I get now is:
IC:/Matlab/supportpackages/R2015b/arduino/toolbox/target/supportpackages/arduinotarget/registry/../scheduler/include -o "Minseg_test_1.o" "Minseg_test_1.c"
arm-none-eabi-gcc: error: unrecognized command line option '-mmcu=atmega2560'
gmake: *** [Minseg_test_1.o] Error 1
I find some hints that that toolchain is too old to support mega2560.
At the MATLAB command prompt, give the command
targetinstaller
and use that to select a Simulink support package for mega2560

Sign in to comment.

Categories

Asked:

on 28 Feb 2016

Commented:

on 28 Feb 2016

Community Treasure Hunt

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

Start Hunting!