SOLUTION: Configuration Parameters -> Code Generation Options -> Code Generation -> Toolchain Settings -> Build Configuration: set to Specify, add "-mfloat-abi=softfp -mfpu=neon" to the end of the C Compiler Options.
Pixhawk Support Package - Compiling Model - #error You must enable NEON instructions
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I am using the Pixhawk Support Package with the PX4 version 1.4 firmware on a Ubuntu Machine with R2016a and the Embedded Coder Toolbox.I tested the compilation process with the one example file to confirm that there are no compiler issues to start with. I have created a model based on the example files and have debugged most of the model errors related to the model to the point which I am actually able to compile part of the firmware. I am now running into compiler errors (not model errors) which I am unable to debug. How do I debug the compiler arguments in the code generation process. A sample of the error is posted below, the full error log is attached. Do I need to need to add the enable NEON instructions in the compiler arguments?
In file included from /usr/local/MATLAB/R2016a/toolbox/target/extensions/processor/ARM/tfl/mw_neon.h:3:0,
from /home/cdslab/PX4/PX4_Controller/variable_pitch_PX4_2016_v2_ert_rtw/variable_pitch_PX4_2016_v2.h:67,
from ../src/modules/px4_simulink_app/ert_main.c:3:
/home/cdslab/gcc-arm-none-eabi-4_8-2014q3/lib/gcc/arm-none-eabi/4.8.4/include/arm_neon.h:32:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
#error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
^
compilation terminated due to -Wfatal-errors.
FAILED: /home/cdslab/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc -DALLOCATIONFCN=0 -DARM_MATH_CM4=1 -DBAUD_RATE=\"115200\" -DCLASSIC_INTERFACE=0 -DCONFIG_ARCH_BOARD_PX4FMU_V2 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXT_MODE=1 -DEXT_MODE_BKGND -DEXT_MODE_DESCRIPTOR=\"ttyS6\" -DGIT_VERSION=d3398270e101359de9687c2d077d991c9892f573 -DHAVESTDIO -DHSE_VALUE=8000000 -DINTEGER_CODE=0 -DMAT_FILE=0 -DMODEL=variable_pitch_PX4_2016_v2 -DMT=0 -DMULTI_INSTANCE_CODE=0 -DNCSTATES=0 -DNULL=0 -DNUMST=4 -DONESTEPFCN=1 -DON_TARGET_WAIT_FOR_START=0 -DPX4 -DPX4_MAIN=px4_simulink_app_app_main -DRT -DSTACK_SIZE=64 -DTERMFCN=1 -DTID01EQ=0 -DUNIX -DUSE_STDPERIPH_DRIVER -D__DF_NUTTX -D__FPU_PRESENT=1 -D__FPU_USED=1 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -D__PX4_NUTTX -I../src -I. -Isrc -I../src/modules -I../src/include -I../src/lib -I../src/platforms -I../src/drivers/boards/px4fmu-v2 -Isrc/modules/px4_messages -Isrc/modules -I../mavlink/include/mavlink -I../src/lib/DriverFramework/framework/include -I../src/lib/matrix -Ipx4fmu-v2/NuttX/nuttx-export/include -Ipx4fmu-v2/NuttX/nuttx-export/include/cxx -Ipx4fmu-v2/NuttX/nuttx-export/arch/chip -Ipx4fmu-v2/NuttX/nuttx-export/arch/common -Iexternal/Install/include -I/usr/local/MATLAB/R2016a/simulink/include/sf_runtime -
EDIT: I went back to the Firmware directory, ran "make clean", then ran make px4fmu_v2-default. This resulted in the same compiler error. I then deleted the Firmware folder and reran the toolchain script which grabs the PSP PX4 firmware again. Then I ran the "make px4fmu-v2_default" again from the firmware directory and it built successfully. I then went back to matlab and attempted to build my model which resulted again in the same compiler error as before.
SOLUTION: Configuration Parameters -> Code Generation Options -> Code Generation -> Interface -> Code replacement library -> GCC ARM Cortex-M3
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!