Skip to content

Rebuilding everything #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
iglosiggio opened this issue Apr 10, 2018 · 8 comments
Open

Rebuilding everything #11

iglosiggio opened this issue Apr 10, 2018 · 8 comments

Comments

@iglosiggio
Copy link

Hi, i'm currently making a package for a debian based distribution (and hoping to make that package go to debian itself) and when possible packaging binaries is a no-no.

Under the bootloaders folder there are a lot of .hex files that i don't know how to rebuild (missing USB_ID variable on the makefile).

Is documented anywhere how to rebuild all the core? I've downloaded the old versions of lufa and rebuilt most of the things that are here.

Related question. Is everything in the core needed? For example the bootloader Leonardo-prod-firmware-2012-04-26.hex

@iglosiggio
Copy link
Author

Related question, how can i rebuild the wifishield firmwares w/o a visual studio license?

@facchinm
Copy link
Member

Hi @iglosiggio ,
first of all, thanks for your effort! The bootloader folder needs a huge cleanup. The only compulsory files are the ones referenced in boards.txt; rebuilding some of them will require Atmel Studio (which is based on Visual Studio, to answer the second question) which is freely available (but not free software). Some other were built with ancient versions of avr-gcc and were not updated to the latest toolchains so it could be quite difficult to build them. Also, functionality would be affected by the rebuild, so they should be tested on every board (also the retired ones).

As a first step, you could only rebuild the ones targeting boards which still have traction (UNO, Mega2560, Leonardo, Micro, Nano, Yun).

I stated to port some of them to the latest LUFA some years ago (https://github.com/facchinm/Arduino_avrusb_firmware), if you need a starting point for the Makefile issues.

@iglosiggio
Copy link
Author

If i upload builds with recent gcc versions do you have the necessary hardware to test the firmwares and bootloaders?

@facchinm
Copy link
Member

We have the hardware but the time available for these kind of tasks is very limited; normally the rebuilder should take care of testing the builds, or you could release a beta version of the deb and let the community test it and report if the firmwares are ok.

@iglosiggio
Copy link
Author

On my side i have the time but not the hardware, it seems like community testing is the way to go.

@iglosiggio
Copy link
Author

Update! 😃
I've managed to build the following bootloaders:

  • bootloaders/bt/ATmegaBOOT_168_atmega328_bt.hex
  • bootloaders/atmega8/ATmegaBOOT.hex
  • bootloaders/lilypad/LilyPadBOOT_168.hex
  • bootloaders/caterina-LilyPadUSB/Caterina-LilyPadUSB.hex
  • bootloaders/atmega/ATmegaBOOT_168_atmega328_notp.hex
  • bootloaders/atmega/ATmegaBOOT_168_ng.hex
  • bootloaders/atmega/ATmegaBOOT_168_lilypad.hex
  • bootloaders/atmega/ATmegaBOOT_168_atmega328.hex
  • bootloaders/atmega/ATmegaBOOT_168_pro_20mhz.hex
  • bootloaders/atmega/ATmegaBOOT_168_pro_16MHz.hex
  • bootloaders/atmega/ATmegaBOOT_168_lilypad_resonator.hex
  • bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex
  • bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
  • bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex
  • bootloaders/atmega/ATmegaBOOT_168_diecimila.hex
  • bootloaders/optiboot/optiboot_lilypad.hex
  • bootloaders/optiboot/optiboot_pro_16MHz.hex
  • bootloaders/optiboot/optiboot_atmega8.hex
  • bootloaders/optiboot/optiboot_luminet.hex
  • bootloaders/optiboot/optiboot_atmega644p.hex
  • bootloaders/optiboot/optiboot_atmega168.hex
  • bootloaders/optiboot/optiboot_atmega1280.hex
  • bootloaders/optiboot/optiboot_pro_20mhz.hex
  • bootloaders/optiboot/optiboot_lilypad_resonator.hex
  • bootloaders/optiboot/optiboot_pro_8MHz.hex
  • bootloaders/optiboot/optiboot_atmega328.hex
  • bootloaders/optiboot/optiboot_atmega328_pro_8MHz.hex
  • bootloaders/caterina-Arduino_Robot/Caterina-Robot-Control.hex
  • bootloaders/caterina-Arduino_Robot/Caterina-Robot-Motor.hex
  • bootloaders/stk500v2/stk500boot_v2_android2561.hex
  • bootloaders/stk500v2/stk500boot_v2_penguino.hex
  • bootloaders/stk500v2/stk500boot_v2_mega1280.hex
  • bootloaders/stk500v2/stk500boot_v2_mega2560.hex
  • bootloaders/stk500v2/stk500boot_v2_cerebotplus.hex
  • bootloaders/stk500v2/stk500boot_v2_amber128.hex
  • bootloaders/caterina/Caterina-Leonardo.hex
  • bootloaders/caterina/Caterina-Esplora.hex
  • bootloaders/caterina/Caterina-Micro.hex

A lot of these builds were done by make <board> and hoping that the makefile didn't mess up with the parameters.

I'm now wanting to make the COMBINED firmware (usbdfu+usbserial) and i will not focus on the wifishield firmware (i don't have time to port the project to a Makefile 😞)

Can you give me any guidance on how the original 8U2 and 16U2 firmwares were built? How do you combine usbdfu and usbserial?

Thanks a lot for your previous responses!

@facchinm
Copy link
Member

Great! The combined hex are nothing more than two binaries (in hex format) merged together (as simple as a cat fw2.hex >> fw1.hex).
So the procedure is:

  • build the dfu project
  • build the actual usb-serial fw
  • cat them together

And you should obtain something similar to the provided combined hex

@iglosiggio
Copy link
Author

iglosiggio commented Apr 13, 2018

hahaha i thought that it was a more involved task 😅

facchinm pushed a commit that referenced this issue Oct 19, 2018
Fix for Serial to use the corrected CPU frequency calculated in init …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants