Arduino application undefined reference for normal functions

2 visualizaciones (últimos 30 días)
Nathan Crosty
Nathan Crosty el 3 de Mayo de 2013
I am trying to build model files that were initially created using 2011b with 2012b. I set up the arduino package and everything appears be good with my install. The build fails when I have either a floor function block, power block, or a mat script in my model. If I take those components out, the model builds, compiles, and flashes the device normally. When the process attempts to link the application, it appears to be missing some references. These c,h, and o files appear in the sharedutilities directory.
What could be causing this?
"C:/MATLAB/Targets/R2012b/arduino-1.0/hardware/tools/avr/bin/avr-gcc" ./HardwareSerial.o ./Print.o ./WInterrupts.o ./WMath.o ./WString.o ./new.o ./wiring.o ./wiring_analog.o ./wiring_digital.o ./io_wrappers.o ./GH_TopLevel_Test.o ./ert_main.o ./sfun_ethernet_comm_wrapper.o ./sfun_getTemp_wrapper.o ./sfun_photocell_read_wrapper.o ./sfun_pwm_set_wrapper.o ../slprj/realtime/_sharedutils/librtwshared.a ../slprj/realtime/GH_TemperatureControl/libGH_TemperatureControl.a ../slprj/realtime/GH_SharedCalibrations/libGH_SharedCalibrations.a -lm -mmcu=atmega2560 -gstabs -o ./MW/GH_TopLevel_Test.elf ../slprj/realtime/GH_TemperatureControl/libGH_TemperatureControl.a(GH_TemperatureControl.o): In function `GH_TemperatureControl_rand': ./GH_TemperatureControl.c:53: undefined reference to `cjecekngngdjmgdj_twister_state_vector' ./GH_TemperatureControl.c:57: undefined reference to `cjmohlnojmopaiek_eml_rand_mt19937ar' ../slprj/realtime/GH_TemperatureControl/libGH_TemperatureControl.a(GH_TemperatureControl.o): In function `GH_TemperatureControl': ./GH_TemperatureControl.c:194: undefined reference to `rt_powd_snf' ./GH_TemperatureControl.c:378: undefined reference to `rt_roundd_snf' ./GH_TemperatureControl.c:459: undefined reference to `rt_roundd_snf' make: * [MW/GH_TopLevel_Test.elf] Error 1
The build process will terminate as a result.
  2 comentarios
Nathan Crosty
Nathan Crosty el 3 de Mayo de 2013
This has to do with model references. When I take the content out of the reference model, and try to use it right in the top level model, it works.
Guy Rouleau
Guy Rouleau el 3 de Mayo de 2013
Please contact technical with a reproduction model.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Arduino Hardware en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by