ho provato a cambiare main in setup e a sostituire il for infinito con un loop, usando l'IDE di arduino mi esce una caterva (enormità) di errori.
tipo questi:
sketch_oct05a:48: error: 'init' redeclared as different kind of symbol
C:\Users\Davide\Desktop\arduino-0021\hardware\arduino\cores\arduino/wiring.h:106: error: previous declaration of 'void init()'
sketch_oct05a:80: error: cannot convert 'void (*)()' to '<anonymous enum>' in initialization
sketch_oct05a.cpp: In function 'void JIG_Task()':
sketch_oct05a:212: error: invalid conversion from 'const uint8_t*' to 'unsigned char*'
sketch_oct05a:212: error: initializing argument 1 of 'void pUsbSetInterrupt(unsigned char*, unsigned char)'
sketch_oct05a.cpp: In function 'void setup()':
sketch_oct05a:246: error: cannot convert 'void ()()' to '<anonymous enum>' in assignment
sketch_oct05a.cpp: In function 'unsigned int usbFunctionDescriptor(usbRequest*)':
sketch_oct05a:489: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:493: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:497: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:501: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:505: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:509: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:513: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:521: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:530: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:533: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:544: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:551: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:561: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:565: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:568: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:572: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:582: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:587: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a.cpp: In function 'unsigned int usbFunctionSetup(unsigned char*)':
sketch_oct05a:622: error: invalid conversion from 'void*' to 'unsigned char*'
sketch_oct05a:661: error: no match for 'operator==' in 'state == init'
usando programmers notepad di winavr, e sostituendo sempre quelle funzioni, mi da errore perchè non trova il main.
> "make.exe" program
Linking: psgroove.elf
avr-gcc -mmcu=atmega1280 -I. -gdwarf-2 -DF_CPU=16000000UL -DF_CLOCK=16000000UL -DBOARD=BOARD_ArduinoMega -DDEBUG_LEVEL=1 -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=psgroove.o -Iusbdrv/ -IBoards/ArduinoMega -std=c99 -MMD -MP -MF .dep/psgroove.elf.d psgroove.o usb_utils.o usbdrv/usbdrv.o usbdrv/oddebug.o usbdrv/usbdrvasm.o --output psgroove.elf -Wl,-Map=psgroove.map,--cref -Wl,--relax -Wl,--gc-sections
c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr51/crtm1280.o:(.init9+0x0): undefined reference to `main'
make.exe: *** [psgroove.elf] Error 1
> Process Exit Code: 2
> Time Taken: 00:00
c'è forse un compilatore adatto ad arduino? con il quale siano possibili queste modifiche??
Intanto ieri ho inviato un messaggio all'autore del porting (non fate caso al mio inglese perchè so che fa pena....)
io:
can you compile PSgroove for Arduino UNO???
the version for duemilanove 328p don't work on it.
THANK YOU!!!
timwu:
As far as I can tell, this should just work. Can you describe doesn't work? The uno schematic looks like it's pin compatible with the duemilanove, so that shouldn't be a problem. Also the chip should be a 328p, so the compiled hex file should be compatible.
io:
so, the schematic is correct. when i connect arduino uno to my ps3, the red led is on and don't blink.
I think it not start to work. i know only that the arduino uno have a different bootloader.
what compiler have you used for have the hex?
thanks
almeno vediamo come ha fatto lui a compilarlo e se ci da una mano.
Ultima cosa, il file "makefile"(psgroove/Makefile at master · timwu/psgroove · GitHub) come va modificato per adattarlo ad arduino UNO?? Basta cambiare il tipo di processore? o va modificato altro?
Grazie Mille per la pazienza, so di essere un pò insistente ;D