-
Notifications
You must be signed in to change notification settings - Fork 1
FEATURE: Added arduino CLI support #15
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
usman1515
wants to merge
6
commits into
FPGA-Research:main
Choose a base branch
from
usman1515:arduino_cli_support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d126898
created a README that explains how to setup, compile and upload the s…
usman1515 3adfa7e
created a Makefile wiht multiple targets used to setup, compile and u…
usman1515 b2b31d8
created YAML config file for adding arduino core support for CH32 EVT…
usman1515 0cd0736
docs: made minor spelling and grammar chanes as requested.
usman1515 0f8b7aa
fix: target setup-arduino-cli updated with arg install_path
usman1515 6936b1c
fixed small typo in target list-boards
usman1515 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,17 +1,11 @@ | ||||||
# How to setup and upload code | ||||||
|
||||||
To flash the firmware for configuring the PLL chip to compatible MCUs we will be using [Arduino-CLI](https://github.com/arduino/arduino-cli). | ||||||
To flash the firmware for configuring the PLL chip to compatible MCUs we will be using the [Arduino-CLI](https://github.com/arduino/arduino-cli). | ||||||
|
||||||
## Procedure | ||||||
|
||||||
### Prerequisite | ||||||
|
||||||
- Add the following line in your `.bashrc` or `.zshrc`. | ||||||
```bash | ||||||
export PATH=$HOME/arduino_cli/bin:$PATH | ||||||
``` | ||||||
- Make sure to source your `.bashrc` or `.zshrc` after updating `$PATH`. | ||||||
|
||||||
- Install `libhidapi-hidraw0` library for USB serial communication. | ||||||
```bash | ||||||
# Ubuntu/Debian | ||||||
|
@@ -20,9 +14,33 @@ sudo apt install libhidapi-hidraw0 | |||||
``` | ||||||
|
||||||
### Install Arduino CLI | ||||||
- Move to directory `./software/clock_setup_using_arduino_code` which contains | ||||||
the Makefile required for setup, compilation and uploading the sketch. | ||||||
- Run `make setup-arduino-cli` which will install `arduino-cli`. | ||||||
- Move to directory `./software/clock_setup_using_arduino_code` which contains the Makefile required for setup, compilation and uploading the sketch. | ||||||
```bash | ||||||
# install Arduino CLI | ||||||
|
||||||
# NOTE: the CLI will be installed in the $PATH_INSTALL provided. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
# Default path: ~/arduino_cli | ||||||
|
||||||
make setup-arduino-cli PATH_INSTALL=<installation_path> | ||||||
``` | ||||||
- Once installation is complete add the following line in your `.bashrc` or `.zshrc` to update the `$PATH` variable. | ||||||
```bash | ||||||
# When using custom install path | ||||||
export PATH=<installation_path>/bin:$PATH | ||||||
|
||||||
# When using default install path | ||||||
export PATH=$HOME/arduino_cli/bin:$PATH | ||||||
``` | ||||||
- Source your `.bashrc` or `.zshrc` after updating `$PATH`. | ||||||
- Verify your installation. | ||||||
|
||||||
```bash | ||||||
# arduino CLI installation path | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
which arduino-cli | ||||||
|
||||||
# arduino CLI installed version | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
arduino-cli version | ||||||
``` | ||||||
|
||||||
### Install Board Files | ||||||
- Now we need to setup and add the board support files for our CH32 EVT chips which can be found [here](https://github.com/openwch/arduino_core_ch32). | ||||||
|
@@ -34,7 +52,7 @@ the Makefile required for setup, compilation and uploading the sketch. | |||||
# show all connected boards/chips via USB | ||||||
make list-boards | ||||||
``` | ||||||
- Make sure to check if Port value e.g. `/dev/ttyACM0` is the same as in the `Makefile`. If not, update it accordingly. | ||||||
- Make sure to check if the port e.g. `/dev/ttyACM0` is the same as in the `Makefile`. If not, update it accordingly. | ||||||
- To compile the sketch run: | ||||||
```bash | ||||||
make compile | ||||||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.