@@ -75,10 +75,18 @@ async function getBoardlistWest(setupState: SetupState, folder: vscode.Uri | und
75
75
}
76
76
77
77
let prevError : any ;
78
- if ( setupState . zephyrVersion === undefined ) { return ; }
78
+ console . log ( "zephyrVersion" ) ;
79
+ console . log ( setupState . zephyrVersion ) ;
80
+
81
+ if ( setupState . zephyrVersion === undefined ) {
82
+ console . log ( "Returning because zephyrVersion is not set" ) ;
83
+ return ;
84
+ }
79
85
let res ;
80
86
let has_qualifiers = false ;
81
87
let has_revisions = false ;
88
+ console . log ( "Getting board list" ) ;
89
+
82
90
if ( isVersionNumberGreater ( setupState . zephyrVersion , 4 , 1 , 0 ) ) {
83
91
res = await executeShellCommandInPythonEnv ( "west boards -f '{name};{dir};{qualifiers};{revisions};{revision_default}'" + boardRootString , setupState . setupPath , setupState , false ) ;
84
92
has_qualifiers = true ;
@@ -89,6 +97,8 @@ async function getBoardlistWest(setupState: SetupState, folder: vscode.Uri | und
89
97
} else {
90
98
res = await executeShellCommandInPythonEnv ( "west boards -f '{name};{dir}'" + boardRootString , setupState . setupPath , setupState , false ) ;
91
99
}
100
+ console . log ( "Got board list" ) ;
101
+
92
102
93
103
if ( ! res . stdout ) {
94
104
output . append ( prevError ) ;
@@ -155,7 +165,7 @@ export async function pickBoard(setupState: SetupState, rootPath: string) {
155
165
const boardDirectoriesQpItems : QuickPickItem [ ] = boardDirectories . map ( label => ( { label } ) ) ;
156
166
157
167
const title = "Board Picker" ;
158
-
168
+ console . log ( "picking directories" ) ;
159
169
let pickPromise = showQuickPick ( {
160
170
title,
161
171
step : 1 ,
@@ -176,6 +186,7 @@ export async function pickBoard(setupState: SetupState, rootPath: string) {
176
186
177
187
let relBoardDir : string | undefined = path . relative ( rootPath , ( pick . label ) ) ;
178
188
if ( pick . label === "Select Other Folder" ) {
189
+ console . log ( "selecting other folder" ) ;
179
190
const boarddir = await vscode . window . showOpenDialog ( {
180
191
canSelectFiles : false ,
181
192
canSelectFolders : true ,
@@ -192,13 +203,19 @@ export async function pickBoard(setupState: SetupState, rootPath: string) {
192
203
}
193
204
194
205
let boardList ;
206
+ console . log ( "getting board list" ) ;
207
+ console . log ( relBoardDir ) ;
208
+
195
209
if ( relBoardDir ) {
196
210
boardList = await getBoardlistWest ( setupState , vscode . Uri . file ( path . join ( rootPath , relBoardDir ) ) ) ;
197
211
} else {
198
212
boardList = await getBoardlistWest ( setupState , undefined ) ;
199
213
}
214
+ console . log ( "finished getting boar lsit" ) ;
200
215
201
216
if ( ! boardList ) {
217
+ console . log ( "empty board list" ) ;
218
+
202
219
return ;
203
220
}
204
221
@@ -213,12 +230,17 @@ export async function pickBoard(setupState: SetupState, rootPath: string) {
213
230
activeItem : undefined
214
231
} ) . catch ( ( error ) => {
215
232
console . error ( error ) ;
233
+
234
+ console . log ( "Pick Board error" ) ;
216
235
return undefined ;
217
236
} ) ;
218
237
pick = ( await pickPromise as QuickPickItem ) ;
219
238
if ( ! pick ) {
239
+ console . log ( "Pick error" ) ;
240
+
220
241
return ;
221
242
} ;
243
+ console . log ( pick ) ;
222
244
223
245
let pick_data = ( pick as BoardItem ) ;
224
246
@@ -256,17 +278,20 @@ export async function pickBoard(setupState: SetupState, rootPath: string) {
256
278
activeItem : revisionQPItems [ revisionIndex ]
257
279
} ) . catch ( ( error ) => {
258
280
console . error ( error ) ;
281
+
282
+ console . log ( "pick rev error" ) ;
259
283
return undefined ;
260
284
} ) ;
261
285
let pick = ( await pickPromise as QuickPickItem ) ;
262
286
if ( ! pick ) {
287
+
288
+ console . log ( "pick error" ) ;
263
289
return ;
264
290
} ;
265
291
revision = pick . label ;
266
292
}
267
293
268
-
269
-
294
+ console . log ( "returning board config" ) ;
270
295
let boardConfig = {
271
296
board : board ,
272
297
relBoardDir : relBoardDir ,
@@ -280,6 +305,7 @@ export async function buildSelector(context: ExtensionContext, setupState: Setup
280
305
const title = 'Add Build Configuration' ;
281
306
282
307
async function pickBoardStep ( input : MultiStepInput , state : Partial < BuildConfig > ) {
308
+ console . log ( "picking board" ) ;
283
309
let boardData = await pickBoard ( setupState , rootPath ) ;
284
310
if ( boardData ) {
285
311
state . relBoardDir = boardData . relBoardDir ;
0 commit comments