WiFi101 Arduino driver in simulink

2 visualizaciones (últimos 30 días)
Nikolaus Parulian
Nikolaus Parulian el 1 de Ag. de 2017
Respondida: Nikolaus Parulian el 1 de Ag. de 2017
Does anyone have Simulink driver block for Arduino WiFi101?
I tried to make my own driver following the same procedure with the servo library found here http://www.mathworks.com/matlabcentral/fileexchange/46133-motor-shields but it doesn't work.
It shows error when I deployed the block into the Arduino hardware
C:/MATLAB/SupportPackages/R2016a/arduino-1.6.1/hardware/tools/avr/bin/avr-gcc -w -Os -Wl,--gc-sections,--relax -mmcu=atmega2560 -o ../wifi_template.elf wifi_template.o wifi_template_data.o arduino_wifi_config_wrapper.o hooks.o WInterrupts.o wiring.o wiring_analog.o wiring_digital.o wiring_pulse.o wiring_shift.o abi.o CDC.o HardwareSerial.o HardwareSerial0.o HardwareSerial1.o HardwareSerial2.o HardwareSerial3.o HID.o IPAddress.o new.o Print.o Stream.o Tone.o USBCore.o WMath.o WString.o MW_ArduinoHWInit.o io_wrappers.o arduinoAVRScheduler.o ert_main.o -lm
arduino_wifi_config_wrapper.o: In function `connect':
arduino_wifi_config_wrapper.cpp:(.text.connect+0x0): undefined reference to `WiFi'
arduino_wifi_config_wrapper.cpp:(.text.connect+0x2): undefined reference to `WiFi'
arduino_wifi_config_wrapper.cpp:(.text.connect+0x4): undefined reference to `WiFiClass::status()'
Base on the error I think it failed to link the WiFi101 source code (external library), although I already put the source in the same folder as the Simulink file. Do I need to add link configuration for the external source?
Appreciate your help.
Regards

Respuesta aceptada

Nikolaus Parulian
Nikolaus Parulian el 1 de Ag. de 2017
I solved it :) So it turns out I need to set a configuration on Matlab beforehand to link all the external libraries together.
this is my set param example:
set_param('wifi_template','CustomSource','./SPI.cpp ./WiFi.cpp ./WiFiClient.cpp ./WiFiMDNSResponder.cpp ./WiFiServer.cpp ./WiFiSSLClient.cpp ./WiFiUdp.cpp ./bsp/source/nm_bsp_arduino.c ./bsp/source/nm_bsp_arduino_avr.c ./common/source/nm_common.c ./driver/source/m2m_ate_mode.c ./driver/source/m2m_crypto.c ./driver/source/m2m_hif.c ./driver/source/m2m_ota.c ./driver/source/m2m_periph.c ./driver/source/m2m_ssl.c ./driver/source/m2m_wifi.c ./driver/source/nmasic.c ./driver/source/nmbus.c ./driver/source/nmdrv.c ./driver/source/nmi2c.c ./driver/source/nmspi.c ./driver/source/nmuart.c ./socket/source/socket.c ./socket/source/socket_buffer.c ./bus_wrapper/source/nm_bus_wrapper_samd21.cpp ./spi_flash/source/spi_flash.c')

Más respuestas (0)

Categorías

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

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by