UnoJoy icon indicating copy to clipboard operation
UnoJoy copied to clipboard

How do you compile a new hex bootloader file?

Open TheRoboman opened this issue 8 years ago • 5 comments

Hi Alan,

I am using your code to try to interface with the Original Xbox. I have modified the usb_gamepad.c file, but I don't know how to compile into a hex bootloader file to test it.

Can you please recommend how I should go about compiling?

TheRoboman avatar Dec 31 '17 10:12 TheRoboman

Managed to figure it out! Install Atmel Studio, open the provided atsln solution file. Then go to Build -> Configuration Manager. Change the Configuration for the UnoJoy project to HexFiles. Then just build the project when you are done editing it and it will generate the hex files for you to flash.

TheRoboman avatar Jan 01 '18 10:01 TheRoboman

one question: after modifying usb_gamepad.c and usb_gamepad.h do I need to compile a new hex file? an other words how are those modifications implemented in the Arduino Uno board? Are they reflected in the microcontroler or the 8u2 chip code?

waylander131 avatar Jul 27 '18 18:07 waylander131

You'll need to compile a new hex file for anything outside of the UnoJoy.h file that gets included in your Arduino project. Hope that helps!

AlanChatham avatar Jul 28 '18 00:07 AlanChatham

Thanks Alan, it helps. I still struggle with the descriptor though, I'm trying to create simple joystick with 6 analog axis only, but aparently I can't figure out the descriptor - I get no data coming from the joystick although it is correctly recognised. Is there any guide out there that could help me?

waylander131 avatar Jul 28 '18 16:07 waylander131

Ha, yeah, that's a big jump. HID report descriptors are a real bear, and debugging them is a lot of frustrating trial and error. One tip would be to make sure you're uninstalling the device each time before testing new code with it - if you don't, at least Windows will use a cached copy of the descriptor or something, and things won't work, or at least that's what I remember from 5 years ago. If you're looking for more axes, though, I might suggest just using the MegaJoy code - that's got a bunch of axes for use.

AlanChatham avatar Aug 01 '18 21:08 AlanChatham