Unable to build and upload firmware using Matlab/Simulink PSP

hi everyone!
last time i trying to build firmware using Matlab Pixhawk Support Package v. 1.3.1 with matlab 2015b and toolchain for windows ver.16. and have a lot of problems…
first of all, when i tried to build one of exemples “px4demo_rgbled” from PSP, i had error “…can’t find file ioctl.h…”
ok, after some investigations, i added some paths to "include list of additional/include directories/ on code generation/custom code tab:
c:\pixhawk_toolchain\Firmware\NuttX\nuttx\include
c:\pixhawk_toolchain\Firmware\build_px4fmu-v2_default\px4fmu-v2\NuttX\nuttx-export\include
c:\pixhawk_toolchain\Firmware\src\platforms
c:\pixhawk_toolchain\Firmware\build_px4fmu-v2_default\src\modules
then i got new error like "“No target OS defined”
i added some instructions for C Compiler: “-D__PX4_NUTTX” and ok!:
“### Successfully generated all binary outputs.”
BUT… if i try not only build, i select “Build upload and run” option and have error like:
“Makefile:295: *** “upload cannot be the first argument. Use ‘/bin/make help|list_config_targets’ to get a list of all possible [configuration] targets.”. Stop.”
matlab generate some binary files with extension “.o” and the map file “.map”. but for uploading using pyton sript, we need JSON file “.px4”
how can i resolve this problem?