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.
Arduino application undefined reference for normal functions
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Arduino Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!