Skip to content

Added 'board details' #67

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

Merged
merged 8 commits into from
Oct 19, 2018
Merged

Added 'board details' #67

merged 8 commits into from
Oct 19, 2018

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Oct 11, 2018

This should partially (or even totally) fix #45.

examples of output:

$ arduino-cli board details arduino:avr:nano
Board name: Arduino Nano                   

Option:     Processor                         cpu             
            ATmega328P                      ✔ cpu=atmega328   
            ATmega328P (Old Bootloader)       cpu=atmega328old
            ATmega168                         cpu=atmega168   

$ arduino-cli board details arduino:avr:nano:cpu=atmega328old
Board name: Arduino Nano                   

Option:     Processor                         cpu             
            ATmega328P                        cpu=atmega328   
            ATmega328P (Old Bootloader)     ✔ cpu=atmega328old
            ATmega168                         cpu=atmega168   

$ arduino-cli board details arduino:avr:nano --format json
{
  "Name": "Arduino Nano",
  "ConfigOptions": [
    {
      "Option": "cpu",
      "OptionLabel": "Processor",
      "Values": [
        {
          "Value": "atmega328",
          "ValueLabel": "ATmega328P",
          "Selected": true
        },
        {
          "Value": "atmega328old",
          "ValueLabel": "ATmega328P (Old Bootloader)"
        },
        {
          "Value": "atmega168",
          "ValueLabel": "ATmega168"
        }
      ]
    }
  ]
}

/cc @brusherru

@cmaglie cmaglie self-assigned this Oct 11, 2018
@cmaglie cmaglie added the type: enhancement Proposed improvement label Oct 11, 2018
@cmaglie cmaglie added this to the next alpha milestone Oct 11, 2018
@brusherru
Copy link

brusherru commented Oct 15, 2018

Just tested this on esp8266:esp8266:generic board.

There are some options without label (did not parsed well) for upload speed on different OS:

Option:     Upload Speed                             UploadSpeed                                                                
            115200                                 ✔ UploadSpeed=115200                                                         
            9600                                     UploadSpeed=9600                                                           
            57600                                    UploadSpeed=57600                                                          
            230400                                   UploadSpeed=230400                                                         
                                                     UploadSpeed=256000                                                         
            460800                                   UploadSpeed=460800                                                         
                                                     UploadSpeed=512000                                                         
            921600                                   UploadSpeed=921600 

Cause boards.txt contains:

generic.menu.UploadSpeed.115200=115200
generic.menu.UploadSpeed.115200.upload.speed=115200
generic.menu.UploadSpeed.9600=9600
generic.menu.UploadSpeed.9600.upload.speed=9600
generic.menu.UploadSpeed.57600=57600
generic.menu.UploadSpeed.57600.upload.speed=57600
generic.menu.UploadSpeed.230400.linux=230400
generic.menu.UploadSpeed.230400.macosx=230400
generic.menu.UploadSpeed.230400.upload.speed=230400
generic.menu.UploadSpeed.256000.windows=256000
generic.menu.UploadSpeed.256000.upload.speed=256000
generic.menu.UploadSpeed.460800.linux=460800
generic.menu.UploadSpeed.460800.macosx=460800
generic.menu.UploadSpeed.460800.upload.speed=460800
generic.menu.UploadSpeed.512000.windows=512000
generic.menu.UploadSpeed.512000.upload.speed=512000
generic.menu.UploadSpeed.921600=921600
generic.menu.UploadSpeed.921600.upload.speed=921600

output/table.go Outdated
for x := range average {
average[x] = average[x] / count[x]
}
// fmt.Println("COUNT:", count)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale code for debugging?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

@brusherru
Copy link

Overall, awesome! 🙌

cmaglie added a commit to cmaglie/arduino-cli that referenced this pull request Oct 19, 2018
See: arduino#67 (comment)

quote:
There are some options without label (did not parsed well) for upload speed on different OS:

Option:     Upload Speed                             UploadSpeed
            115200                                 ✔ UploadSpeed=115200
            9600                                     UploadSpeed=9600
            57600                                    UploadSpeed=57600
            230400                                   UploadSpeed=230400
                                                     UploadSpeed=256000
            460800                                   UploadSpeed=460800
                                                     UploadSpeed=512000
            921600                                   UploadSpeed=921600

Cause boards.txt contains:

generic.menu.UploadSpeed.115200=115200
generic.menu.UploadSpeed.115200.upload.speed=115200
generic.menu.UploadSpeed.9600=9600
generic.menu.UploadSpeed.9600.upload.speed=9600
generic.menu.UploadSpeed.57600=57600
generic.menu.UploadSpeed.57600.upload.speed=57600
generic.menu.UploadSpeed.230400.linux=230400
generic.menu.UploadSpeed.230400.macosx=230400
generic.menu.UploadSpeed.230400.upload.speed=230400
generic.menu.UploadSpeed.256000.windows=256000
generic.menu.UploadSpeed.256000.upload.speed=256000
generic.menu.UploadSpeed.460800.linux=460800
generic.menu.UploadSpeed.460800.macosx=460800
generic.menu.UploadSpeed.460800.upload.speed=460800
generic.menu.UploadSpeed.512000.windows=512000
generic.menu.UploadSpeed.512000.upload.speed=512000
generic.menu.UploadSpeed.921600=921600
generic.menu.UploadSpeed.921600.upload.speed=921600
@cmaglie
Copy link
Member Author

cmaglie commented Oct 19, 2018

There are some options without label (did not parsed well) for upload speed on different OS:

nice catch! This latest update should fix it, let's wait the CI to merge...

@arduino arduino deleted a comment from ArduinoBot Oct 19, 2018
@arduino arduino deleted a comment from ArduinoBot Oct 19, 2018
@arduino arduino deleted a comment from ArduinoBot Oct 19, 2018
This allows to show which option is selected with defaults or with
different FQBNs.

For example:

    $ arduino-cli board details arduino:avr:nano
    Board name: Arduino Nano

    Option:     Processor                         cpu
                ATmega328P                      ✔ cpu=atmega328
                ATmega328P (Old Bootloader)       cpu=atmega328old
                ATmega168                         cpu=atmega168

or:

    $ arduino-cli board details arduino:avr:nano:cpu=atmega328old
    Board name: Arduino Nano

    Option:     Processor                         cpu
                ATmega328P                        cpu=atmega328
                ATmega328P (Old Bootloader)     ✔ cpu=atmega328old
                ATmega168                         cpu=atmega168
See: arduino#67 (comment)

quote:
There are some options without label (did not parsed well) for upload speed on different OS:

Option:     Upload Speed                             UploadSpeed
            115200                                 ✔ UploadSpeed=115200
            9600                                     UploadSpeed=9600
            57600                                    UploadSpeed=57600
            230400                                   UploadSpeed=230400
                                                     UploadSpeed=256000
            460800                                   UploadSpeed=460800
                                                     UploadSpeed=512000
            921600                                   UploadSpeed=921600

Cause boards.txt contains:

generic.menu.UploadSpeed.115200=115200
generic.menu.UploadSpeed.115200.upload.speed=115200
generic.menu.UploadSpeed.9600=9600
generic.menu.UploadSpeed.9600.upload.speed=9600
generic.menu.UploadSpeed.57600=57600
generic.menu.UploadSpeed.57600.upload.speed=57600
generic.menu.UploadSpeed.230400.linux=230400
generic.menu.UploadSpeed.230400.macosx=230400
generic.menu.UploadSpeed.230400.upload.speed=230400
generic.menu.UploadSpeed.256000.windows=256000
generic.menu.UploadSpeed.256000.upload.speed=256000
generic.menu.UploadSpeed.460800.linux=460800
generic.menu.UploadSpeed.460800.macosx=460800
generic.menu.UploadSpeed.460800.upload.speed=460800
generic.menu.UploadSpeed.512000.windows=512000
generic.menu.UploadSpeed.512000.upload.speed=512000
generic.menu.UploadSpeed.921600=921600
generic.menu.UploadSpeed.921600.upload.speed=921600
Race conditions tests are run on another CI system, before releases.
@ArduinoBot
Copy link
Contributor

✅ Build completed.

⬇️ Linux 64: http://downloads.arduino.cc/PR/arduino-cli/arduino-cli-16-PR67-linux64.tar.bz2

⬇️ Linux 32: http://downloads.arduino.cc/PR/arduino-cli/arduino-cli-16-PR67-linux32.tar.bz2

⬇️ Linux ARM: http://downloads.arduino.cc/PR/arduino-cli/arduino-cli-16-PR67-linuxarm.tar.bz2

⬇️ Windows: http://downloads.arduino.cc/PR/arduino-cli/arduino-cli-16-PR67-windows.zip

⬇️ OSX: http://downloads.arduino.cc/PR/arduino-cli/arduino-cli-16-PR67-osx.zip

ℹ️ To test this build:

  1. Just replace arduino-cli binary with the provided one

Copy link

@brusherru brusherru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 👍

@cmaglie cmaglie merged commit 43bcb84 into arduino:master Oct 19, 2018
@cmaglie cmaglie deleted the board-details branch October 19, 2018 14:16
@arduino arduino deleted a comment from ArduinoBot Oct 19, 2018
mastrolinux pushed a commit that referenced this pull request Jul 16, 2019
See: #67 (comment)

quote:
There are some options without label (did not parsed well) for upload speed on different OS:

Option:     Upload Speed                             UploadSpeed
            115200                                 ✔ UploadSpeed=115200
            9600                                     UploadSpeed=9600
            57600                                    UploadSpeed=57600
            230400                                   UploadSpeed=230400
                                                     UploadSpeed=256000
            460800                                   UploadSpeed=460800
                                                     UploadSpeed=512000
            921600                                   UploadSpeed=921600

Cause boards.txt contains:

generic.menu.UploadSpeed.115200=115200
generic.menu.UploadSpeed.115200.upload.speed=115200
generic.menu.UploadSpeed.9600=9600
generic.menu.UploadSpeed.9600.upload.speed=9600
generic.menu.UploadSpeed.57600=57600
generic.menu.UploadSpeed.57600.upload.speed=57600
generic.menu.UploadSpeed.230400.linux=230400
generic.menu.UploadSpeed.230400.macosx=230400
generic.menu.UploadSpeed.230400.upload.speed=230400
generic.menu.UploadSpeed.256000.windows=256000
generic.menu.UploadSpeed.256000.upload.speed=256000
generic.menu.UploadSpeed.460800.linux=460800
generic.menu.UploadSpeed.460800.macosx=460800
generic.menu.UploadSpeed.460800.upload.speed=460800
generic.menu.UploadSpeed.512000.windows=512000
generic.menu.UploadSpeed.512000.upload.speed=512000
generic.menu.UploadSpeed.921600=921600
generic.menu.UploadSpeed.921600.upload.speed=921600
per1234 added a commit that referenced this pull request Aug 9, 2021
Add checks for common misspellings of path base names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List boards with cpu option in FQBN
3 participants