Added the ravedude chip command for bare MCU development #647
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This PR adds a
ravedude chipcommand, aimed primarily at anyone doing bare chip development. The behavior of theravedude chipcommand is as follows:ravedude chipcan be used as a cargo runnerravedude/src/target_detect.rs..cargo/config.tomland doesn't need a separate config file..cargo/config.tomland require the developer to configure them with environment variablesdirenvor a similar tool.ravedude chipsupports opening a serial console after flashing. Serial console settings (port and baud rate) are specified with either command line options or with environment variable. Typically, the baud rate would be specified in.cargo/config.toml(because it's a property of the crate) and the port would be specified in an environment variable (because it's a developer-specific configuration parameter).In summary, the intended use of
ravedude chipis:runnerin.cargo/config.tomltoravedude chip(for no serial console after flashing) orravedude chip --console-mode=serial --console-baudrate=NNN(for serial console after flashing)AVR_PROGRAMMER_NAME,AVR_PROGRAMMER_PORT(if not autodetected byavrdude),AVR_PROGRAMMER_BAUDRATE(if not autodetected byavrdude), andAVR_CONSOLE_PORT(if different fromAVR_PROGRAMMER_PORT) using any of the following methods: directly set them in the shell beforecargo run, set them in the[env]section of.cargo/config.toml, or usedirenvor a similar tool.For consistency, the existing
ravedudecommand has been renamedravedude board; if neitherravedude chipnorravedude boardhas been specified,ravedude boardis implied. That is, the following work:runner = ravedude— works like beforerunner = ravedude board— works same asraveduderunner = ravedude chip— new addition, works as described above.I am keeping
ravedude chipout of the main package docs for now because its only imminent use will be internal (for developing inside MCU crates), but I do plan to add more documentation for it in the future (probably when I add examples in MCU crates, which I am working on in a separate branch).