You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generating tags of arduino sketch in one command for code tracing.
3
+
Generating database of cscope/ctags from Arduino sketch in one command for code tracing.
4
4
5
5
## Introduction
6
6
7
-
Arduino is a convenient environment for developing embedding application. Sometimes tracing the code of Arduino core can help us to realize how the lower-level function was implemented and futher assist debugging. However, it's a tough work that tracing code with vanilla Arduino IDE, especially with third party core variants like ESP32.
7
+
Arduino is a convenient environment for developing embedding application. On the other hand, tracing the code of Arduino core can help us to realize how the lower-level function was implemented and futher assist us in debugging. However, it's a tough work that tracing code with vanilla Arduino IDE, especially with third party core variants like ESP32.
8
8
Thus, the purpose of this tool is to simplify the work to generate the symbol database of cscope and ctags from Arduino sketch. Once the database is generated, you can begin tracing the code use cscope/ctags with other text editor like vim, emacs, vscode or sublime text.
9
9
10
10
## How to use
@@ -13,11 +13,26 @@ clear the cache /tmp/arduino-core-cache
13
13
14
14
## How to install
15
15
16
-
1. Install python3.6, arduino-cli, cscope and ctags via the package manage of your distrubution.
16
+
### Dependencies
17
+
18
+
This tool depends on python, [arduino-cli](https://github.com/arduino/arduino-cli), [cscope](http://cscope.sourceforge.net/) and [ctags](https://github.com/universal-ctags/ctags).
19
+
Specifically, this tool was developed and be tested on the following platform.
20
+
21
+
- ArchLinux 5.11.16-arch1-1
22
+
- Python 3.6
23
+
- Arduino-cli 0.18.3
24
+
- Cscope 15.9
25
+
- Universal Ctags 5.9.0
26
+
27
+
It shouldn't be any problem if you are using Linux based operating system and python 3.6~3.9. But working on other platform is not guaranteed. If you are encounting any problem to get this tool work, please kindly let me know. The contacting informations are listed below.
28
+
29
+
### Installing instruction
30
+
31
+
1. Install python3.6, arduino-cli, cscope and ctags via the package manager of your distrubution.
- fqbn : The Fully Qualified Board Name (FQBN) of your target board. It can be obtained by command `arduino-cli board listall`. e.g.: arduino:avr:uno
70
+
- sketch_path : The path to your Arduino sketch. Must containing at least one '.ino' file.
71
+
72
+
### Optional arguments
73
+
74
+
- -h, --help : show this help message and exit
75
+
- -o DB_OUTPUT, --db-output DB_OUTPUT
76
+
- The base output folder related to your sketch directory. Default is the '.tags' folder in your sketch directory.
44
77
45
78
## How to contribute
79
+
80
+
Any contribution are welcomed.
81
+
If you encounterd some problem, make a issue on GitHub and we will help you as soon as possible.
82
+
If you have any idea to improve this tool, please let us know through the issue or pull request functionality on GitHub.
83
+
Cause the tested platforms are limited. If this tool works fine on your platform, please create an issue on GitHub with the detailed version of your platform.
84
+
You can also contact us via the e-mail _iftnt1999 [at] gmail.com_. We will apprciate if hearing any feedback from you.
parser.add_argument("-o", "--db-output", help="The base output folder related to your sketch directory. Default is the '.tags' folder in your sketch directory.", default=".tags")
125
+
parser.add_argument("fqbn", help="The Fully Qualified Board Name (FQBN) of your target board. It can be obtained by command `arduino-cli board listall`. e.g.: arduino:avr:uno")
126
+
parser.add_argument("sketch_path", help="The path to your Arduino sketch. Must containing at least one '.ino' file.")
127
+
args=parser.parse_args()
128
+
129
+
ifnotPath(args.sketch_path).is_dir():
130
+
print(f"{args.sketch_path} is not a directory. Please check whether it had been existed.")
0 commit comments