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
{{ message }}
This repository was archived by the owner on Jul 16, 2024. It is now read-only.
As a convinenece, the build has built in `deploy` command which builds, deploys, and starts the current source code on a coprocessor.
100
+
101
+
An architecture override is required to specify the deploy target's architecture.
102
+
103
+
.. tab-set::
104
+
105
+
.. tab-item:: Linux
106
+
107
+
``./gradlew clean``
108
+
``./gradlew deploy -PArchOverride=linuxarm64``
109
+
110
+
.. tab-item:: macOS
111
+
112
+
``./gradlew clean``
113
+
``./gradlew deploy -PArchOverride=linuxarm64``
114
+
115
+
.. tab-item:: Windows (cmd)
116
+
117
+
``gradlew clean``
118
+
``gradlew deploy -PArchOverride=linuxarm64``
119
+
120
+
The ``deploy`` command is tested against Raspberry Pi coprocessors. Other similar coprocessors may work too.
121
+
96
122
Using PhotonLib Builds
97
123
~~~~~~~~~~~~~~~~~~~~~~
98
124
@@ -139,10 +165,10 @@ After adding the generated vendordep to your project, add the following to your
139
165
}
140
166
141
167
142
-
Debugging a local PhotonVision build
143
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
168
+
Debugging PhotonVision Running Locally
169
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144
170
145
-
One way is by running the program using gradle with the :code:`--debug-jvm` flag. Run the program with :code:`./gradlew run --debug-jvm`, and attach to it with VSCode by adding the following to launch.json. Note args can be passed with :code:`--args="foobar"`.
171
+
One way is by running the program using gradle with the :code:`--debug-jvm` flag. Run the program with :code:`./gradlew run --debug-jvm`, and attach to it with VSCode by adding the following to :code:`launch.json`. Note args can be passed with :code:`--args="foobar"`.
146
172
147
173
.. code-block::
148
174
@@ -165,6 +191,39 @@ One way is by running the program using gradle with the :code:`--debug-jvm` flag
165
191
166
192
PhotonVision can also be run using the gradle tasks plugin with :code:`"args": "--debug-jvm"` added to launch.json.
167
193
194
+
195
+
Debugging PhotonVision Running on a CoProcessor
196
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
197
+
198
+
Set up a VSCode configuration in :code:`launch.json`
199
+
200
+
.. code-block::
201
+
202
+
{
203
+
// Use IntelliSense to learn about possible attributes.
204
+
// Hover to view descriptions of existing attributes.
205
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
206
+
"version": "0.2.0",
207
+
"configurations": [
208
+
{
209
+
"type": "java",
210
+
"name": "Attach to CoProcessor",
211
+
"request": "attach",
212
+
"hostName": "photonvision.local",
213
+
"port": "5801",
214
+
"projectName": "photon-core"
215
+
},
216
+
]
217
+
}
218
+
219
+
Stop any existing instance of PhotonVision.
220
+
221
+
Launch the program with the following additional argument to the JVM: :code:`java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=photonvision.local:5801`
222
+
223
+
Once the program says it is listening on port 5801, launch the debug configuration in VSCode.
224
+
225
+
The program will wait for the VSCode debugger to attach before proceeding.
0 commit comments