embeddedartistry / athena-bootloader

An AVR Arduino bootloader that supports uploads over Ethernet (via TFTP) and Serial.
GNU Lesser General Public License v2.1
12 stars 5 forks source link

Add board manager json file #64

Closed phillipjohnston closed 2 years ago

phillipjohnston commented 4 years ago

For adding board file to athena:

Instructions¶ • Start Arduino and open Preferences window. • Enter https://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas. • Open Boards Manager from Tools > Board menu and find esp8266 platform. • Select the version you need from a drop-down box. • Click install button. • Don’t forget to select your ESP8266 board from Tools > Board menu after installation. For more information on the Arduino Board Manager, see: • https://www.arduino.cc/en/guide/cores

Example:

{
  "packages": [
    {
      "name": "Ariadne-Bootloader",
      "maintainer": "codebender.cc",
      "websiteURL": "https://github.com/per1234/Ariadne-Bootloader",
      "email": "",
      "help": {
        "online": ""
      },
      "platforms": [
        {
          "name": "Ariadne Bootloader",
          "architecture": "avr",
          "version": "1.0.0",
          "category": "Ariadne Bootloader",
          "help": {
            "online": "https://github.com/per1234/Ariadne-Bootloader/tree/master"
          },
          "url": "https://github.com/per1234/Ariadne-Bootloader/releases/download/v1.0.0/Ariadne-Bootloader_1.0.0.zip",
          "archiveFileName": "Ariadne-Bootloader_1.0.0.zip",
          "checksum": "SHA-256:f5bed2f81fbc649f2c9ed30f2a71b858359e20571a241dd9d31e06d49e4bcd7e",
          "size": "242696",
          "boards": [
            {"name": "Ariadne Bootloader"},
            {"name": "Arduino Duemilanove w/ ATmega328"},
            {"name": "Arduino Uno"},
            {"name": "Arduino Ethernet"},
            {"name": "Arduino Mega 2560"}
          ],
          "toolsDependencies": []
        },
        {
          "name": "Ariadne Bootloader",
          "architecture": "avr",
          "version": "1.0.1",
          "category": "Ariadne Bootloader",
          "help": {
            "online": "https://github.com/per1234/Ariadne-Bootloader/tree/v1.0.1"
          },
          "url": "https://github.com/per1234/Ariadne-Bootloader/releases/download/v1.0.1/Ariadne-Bootloader_1.0.1.zip",
          "archiveFileName": "Ariadne-Bootloader_1.0.1.zip",
          "checksum": "SHA-256:74125d1d125b763f09ee7afca0f5253aeca9a865e1fc1ba0c81af27d3a2c41c3",
          "size": "320528",
          "boards": [
            {"name": "Ariadne Bootloader"},
            {"name": "Arduino Duemilanove w/ ATmega328"},
            {"name": "Arduino Uno"},
            {"name": "Arduino Ethernet"},
            {"name": "Arduino Mega 2560"},
            {"name": "ATmega1284P"}
          ],
          "toolsDependencies": []
        },
        {
          "name": "Ariadne Bootloader",
          "architecture": "avr",
          "version": "1.0.2",
          "category": "Ariadne Bootloader",
          "help": {
            "online": "https://github.com/per1234/Ariadne-Bootloader"
          },
          "url": "https://github.com/per1234/Ariadne-Bootloader/releases/download/v1.0.2/Ariadne-Bootloader_1.0.2.zip",
          "archiveFileName": "Ariadne-Bootloader_1.0.2.zip",
          "checksum": "SHA-256:076af6127e0a2c80f583a4d214b941797dd68423afa1ea365afadfaafdbdd40b",
          "size": "972972",
          "boards": [
            {"name": "Uno"},
            {"name": "Duemilanove"},
            {"name": "Diecimila"},
            {"name": "Nano"},
            {"name": "Mini"},
            {"name": "BT"},
            {"name": "Pro"},
            {"name": "Pro Mini"},
            {"name": "Arduino Ethernet"},
            {"name": "Mega 2560"},
            {"name": "ATmega1284P"},
            {"name": "Mighty 1284P"},
            {"name": "Mighty Mini 1284P"},
            {"name": "Goldilocks"},
            {"name": "Bobuino"},
            {"name": "Skinny Bob"}, 
            {"name": "Sleeping Beauty"}
          ],
          "toolsDependencies": []
        }
      ],
      "tools": []
    }
  ]
}
hagaigold commented 2 years ago

This will be very nice to have- make using the BL much easier :)

Working example for a board manager. For testing it in Arduino IDE the raw version should be used- https://raw.githubusercontent.com/hagaigold/athena-bootloader/develop/package_AB_index.json

Some thoughts:

phillipjohnston commented 2 years ago

Thank you again for your help with this @hagaigold. I have switched the main JSON over to our repository, and it will be auto-generated for each release.

phillipjohnston commented 2 years ago

Also updated README instructions for using the board manager.

hagaigold commented 2 years ago

and it will be auto-generated for each release.

Currently, the BM file will have only the last release which I think will work but create a "weird" user experience with the board manager utility in the IDE:

hagaigold commented 2 years ago

A thought: don't see the need for the nightly build to automatically increase the version. many projects increase the version manually thru a JSON file (or header), then the CI does its thing when the version was bumped.

Assuming the board manager JSON file will have all the released versions, we might prefer this approach. Another option is that the JSON will have just Releases without Pre-release.

Note: also relevant to #90.

phillipjohnston commented 2 years ago

@hagaigold:

Currently, the BM file will have only the last release which I think will work but create a "weird" user experience with the board manager utility in the IDE:

I'll reorganize it to support multiple versions, I agree that is desired.

A thought: don't see the need for the nightly build to automatically increase the version. many projects increase the version manually thru a JSON file (or header), then the CI does its thing when the version was bumped.

I'm not sure I see the reason to regress to a manual process. If there are concerns, I would rather insert another branch (e.g., "develop") instead of reverting to a manual update. In "normal" flow, this project does not see a large amount of updates. Yesterday's build server hackery being quite the exception :).

Is there a reason I'm missing that it would be superior to manually manage it?


edit: One reason I can think of would be that non-code related items, such as README changes or infrastructure changes, should not generate a new release version. In that case, I would still fall back on having the nightly build be manual instead of automatic, but that also increases the friction of releases being made after PRs are merged - I'd have to remember to go and click the button, which is quite easy to do. I could also check whether or not changes have been made to src/ or libraries.

phillipjohnston commented 2 years ago

Filed #97

hagaigold commented 2 years ago

Is there a reason I'm missing that it would be superior to manually manage it?

moving to #98