Skip to content

Latest commit

 

History

History
66 lines (49 loc) · 2.74 KB

CONTRIBUTING.md

File metadata and controls

66 lines (49 loc) · 2.74 KB

Contributing

Thanks for contributing! Please open an issue when

  • you find a bug in the crate
  • you have an idea for a feature
  • something isn't clear in our documentation

The rest of this guide provides quick tips for working with these packages. Before you get started, make sure that you have all the build dependencies. We need whatever is required for the imxrt-ral package. See the imxrt-ral contributing documentation for more information.

Development

If you'd like to work with this code, read on for development requirements and tips.

To build the package, just use cargo build. You should be able to just cargo build in one of the example packages. Note that this library can build for your host system, and also for your embedded ARM target. To build for an embedded target, include a --target flag, like

cargo build --target thumbv7em-none-eabihf

To run unit tests, change cargo build to cargo test in the above examples. These tests run on your host system.

To debug the library, enable the internal __log feature. The feature enables the library's internal log hooks. Then, initialize your logger of choice in your program. You may also need to configure the maximum log level as a feature on the log crate.

To test on hardware, refer to the hardware examples maintained in the imxrt-hal project. Those examples work on multiple development boards. We welcome new USB example contributions there. If the imxrt-hal project does not support your development board, open an issue in the imxrt-hal issue tracker.

If you're testing imxrt-usbd changes with the imxrt-hal examples, you'll need a way to integrate your patches into that project's build. Consider using patches to override dependencies.

For design information, see the API docs. Most modules include a high-level blurb that talks about what's going on. There are also public-facing design documentation in some modules.

If you'd like references, see

  • this application note. Although the AN is for a different NXP processor, the USB driver design is the same.
  • the i.MX RT reference manuals, available from NXP. Go here, and select your processor. Then, go to "Documentation," and scroll down to "Reference Manual." You'll need a free NXP account to access the reference manuals.