LusoRobótica - Robótica em Português

Sistemas específicos => Arduino / AVR => Tópico iniciado por: Jay_OR em 28 de Março de 2012, 12:12

Título: Contiki OS - Arduino 328p
Enviado por: Jay_OR em 28 de Março de 2012, 12:12
Boas,

Neste momento estou a trabalhar num projecto para instalar o Contiki OS num Arduino Duemilanove.
Estou a usar um port que encontrei da versão 2.2:

https://github.com/contiki/contiki-arduino-2.2

Estou a usar ubuntu para compilar, e é me devido um erro ao compilar o hello-world da pasta do mesmo:
$make TARGET=arduino ARDUINO_MODEL=atmega328p hello-world.u

Código: [Seleccione]
In file included from ../../cpu/avr/radio/mac/sicslowmac.c:55:
../../cpu/avr/radio/mac/zmac.h:60:19: error: frame.h: Ficheiro ou directoria inexistente
../../cpu/avr/radio/mac/zmac.h:61:31: error: ieee-15-4-manager.h: Ficheiro ou directoria inexistente
In file included from ../../cpu/avr/radio/mac/sicslowmac.c:55:
../../cpu/avr/radio/mac/zmac.h:142: error: expected specifier-qualifier-list before ‘addr_t’
../../cpu/avr/radio/mac/zmac.h:155: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ieee15_4ManagerAddress’
In file included from ../../cpu/avr/radio/mac/sicslowmac.c:60:
../../cpu/avr/radio/mac/sicslowmac.h:93: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../../cpu/avr/radio/mac/sicslowmac.c:86: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ieee15_4ManagerAddress’
../../cpu/avr/radio/mac/sicslowmac.c:87: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../../cpu/avr/radio/mac/sicslowmac.c:91: warning: initialization from incompatible pointer type
../../cpu/avr/radio/mac/sicslowmac.c: In function ‘mac_task’:
../../cpu/avr/radio/mac/sicslowmac.c:205: error: ‘parsed_frame’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:205: error: (Each undeclared identifier is reported only once
../../cpu/avr/radio/mac/sicslowmac.c:205: error: for each function it appears in.)
../../cpu/avr/radio/mac/sicslowmac.c:205: error: ‘parsed_frame_t’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:205: error: expected expression before ‘)’ token
../../cpu/avr/radio/mac/sicslowmac.c: In function ‘sicslowmac_dataIndication’:
../../cpu/avr/radio/mac/sicslowmac.c:247: error: ‘parsed_frame’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c: In function ‘sicslowmac_unknownIndication’:
../../cpu/avr/radio/mac/sicslowmac.c:315: error: ‘parsed_frame’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c: In function ‘sicslowmac_dataRequest’:
../../cpu/avr/radio/mac/sicslowmac.c:400: error: ‘frame_create_params_t’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:400: error: expected ‘;’ before ‘params’
../../cpu/avr/radio/mac/sicslowmac.c:401: error: ‘frame_result_t’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:401: error: expected ‘;’ before ‘result’
../../cpu/avr/radio/mac/sicslowmac.c:407: error: ‘params’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:425: error: ‘ieee15_4ManagerAddress’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:464: warning: implicit declaration of function ‘frame_tx_create’
../../cpu/avr/radio/mac/sicslowmac.c:464: error: ‘result’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:479: error: ‘radio_status_t’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:479: error: expected ‘;’ before ‘rv’
../../cpu/avr/radio/mac/sicslowmac.c:481: error: ‘rv’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:481: error: ‘RADIO_SUCCESS’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:488: error: ‘RADIO_WRONG_STATE’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c: In function ‘sicslowmac_resetRequest’:
../../cpu/avr/radio/mac/sicslowmac.c:568: warning: implicit declaration of function ‘AVR_ENTER_CRITICAL_REGION’
../../cpu/avr/radio/mac/sicslowmac.c:574: warning: implicit declaration of function ‘AVR_LEAVE_CRITICAL_REGION’
../../cpu/avr/radio/mac/sicslowmac.c: At top level:
../../cpu/avr/radio/mac/sicslowmac.c:578: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../../cpu/avr/radio/mac/sicslowmac.c: In function ‘process_thread_mac_process’:
../../cpu/avr/radio/mac/sicslowmac.c:598: error: ‘radio_status_t’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:598: error: expected ‘;’ before ‘return_value’
../../cpu/avr/radio/mac/sicslowmac.c:602: error: ‘return_value’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:602: warning: implicit declaration of function ‘radio_init’
../../cpu/avr/radio/mac/sicslowmac.c:615: warning: passing argument 1 of ‘__eerd_byte_m328p’ makes pointer from integer without a cast
../../cpu/avr/radio/mac/sicslowmac.c:616: warning: passing argument 1 of ‘__eerd_byte_m328p’ makes pointer from integer without a cast
../../cpu/avr/radio/mac/sicslowmac.c:626: warning: implicit declaration of function ‘radio_set_operating_channel’
../../cpu/avr/radio/mac/sicslowmac.c:627: warning: implicit declaration of function ‘radio_use_auto_tx_crc’
../../cpu/avr/radio/mac/sicslowmac.c:628: warning: implicit declaration of function ‘radio_set_trx_state’
../../cpu/avr/radio/mac/sicslowmac.c:628: error: ‘TRX_OFF’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:637: warning: implicit declaration of function ‘ieee_15_4_init’
../../cpu/avr/radio/mac/sicslowmac.c:637: error: ‘ieee15_4ManagerAddress’ undeclared (first use in this function)
../../cpu/avr/radio/mac/sicslowmac.c:639: error: ‘RX_AACK_ON’ undeclared (first use in this function)
make: *** [obj_arduino/sicslowmac.o] Error 1

Estará a faltar algum parametro?

Cumprimentos
Título: Re: Contiki OS - Arduino 328p
Enviado por: TigPT em 28 de Março de 2012, 13:01
Desconhecia. Vou ler mais sobre Contiki OS
Título: Re: Contiki OS - Arduino 328p
Enviado por: msr em 28 de Março de 2012, 13:38
Qual será a vantagem de correr o Contiki OS no Arduino? Ou melhor qual o módulo RF a utilizar?
Título: Re: Contiki OS - Arduino 328p
Enviado por: Jay_OR em 28 de Março de 2012, 18:20
Testei agora com o OS limpo, sem nenhuma alteração, apenas juntei a plataforma que já tinha sido portada para p o 2.2, e ao compilar funcionou. =)

$make TARGET=arduino ARDUINO_MODEL=atmega328p

Possivelmente o dono do repositorio retirou algumas linhas de código para a tornar mais leve, julgo eu.

A vantagem será depois de estar implementado é mais facil adicionar modulos, por aquilo que me foi dado a conhecer. Não posso ainda comprovar, mas mais à frente, quando tiver mais experiencia, posso dar o meu feedback.

EDIT:Se alguém necessitar de alguma info para fazer um projecto nesta area depois posso dar uma ajuda, a implementar.