|
1 | 1 | { |
2 | 2 | "data": { |
| 3 | + "cwd": "${workspaceFolder}/<%= solution_folder %>", |
3 | 4 | "shell": { |
4 | 5 | "win32": { |
5 | 6 | "executable": "cmd.exe", |
|
13 | 14 | "executable": "/bin/bash", |
14 | 15 | "args": [ "-c" ] |
15 | 16 | } |
| 17 | + }, |
| 18 | + "program": "<%= symbol_files[0]?.file ?? '' %>", |
| 19 | + "programs": "<%= symbol_files.flatMap(e => (e.pname || !processors?.length) ? e : processors.map(p => ({ ...e, pname: p }))).groupedBy(v => v.pname ?? '') %>", |
| 20 | + "gdbServerPlugin": "${env:AVH_FVP_PLUGINS}<%= platform === 'win32' ? 'GDBServer.dll' : 'GDBServer.so' %>" |
| 21 | + }, |
| 22 | + "launch": { |
| 23 | + "singlecore-launch": { |
| 24 | + "name": "Arm-FVP@pyOCD (launch)", |
| 25 | + "type": "gdbtarget", |
| 26 | + "request": "launch", |
| 27 | + "cwd": "<%= data.cwd %>", |
| 28 | + "program": "<%= data.program %>", |
| 29 | + "gdb": "arm-none-eabi-gdb", |
| 30 | + "auxiliaryGdb": false, |
| 31 | + "initCommands": [ |
| 32 | + "<%= data.programs[pname]?.slice(1)?.map(p => p.file ? `add-symbol-file \"${p.file}\"\\n` : '')?.join('') %>", |
| 33 | + "monitor reset halt", |
| 34 | + "tbreak main" |
| 35 | + ], |
| 36 | + "customResetCommands": [ |
| 37 | + "monitor reset halt", |
| 38 | + "maintenance flush register-cache", |
| 39 | + "maintenance flush dcache", |
| 40 | + "tbreak main", |
| 41 | + "continue" |
| 42 | + ], |
| 43 | + "target": { |
| 44 | + "server": "<%= config.model %>", |
| 45 | + "serverParameters": [ |
| 46 | + "-D", |
| 47 | + "--plugin", "<%= data.gdbServerPlugin %>\n", |
| 48 | + "<% if (config['config-file']) { %>", |
| 49 | + "-f", "<%= config['config-file'] %>\n", |
| 50 | + "<% } %>", |
| 51 | + "<% if (Array.isArray(config.args) && config.args.length > 0) { %>", |
| 52 | + "<%= config.args.join('\\n') %>\n", |
| 53 | + "<% } %>", |
| 54 | + "<% else if (typeof config.args === 'string' && config.args.trim().length > 0) { %>", |
| 55 | + "<%= config.args.trim().split(/\\s+/).join('\\n') %>\n", |
| 56 | + "<% } %>", |
| 57 | + "<% const files = image_files.length ? image_files.map(s => s.file) : [data.program].filter(Boolean) %>", |
| 58 | + "<% for (const [idx, file] of files.entries()) { %>", |
| 59 | + "-a", "<%= file %><%= idx + 1 < files.length ? '\\n' : '' %>", |
| 60 | + "<% } %>" |
| 61 | + ], |
| 62 | + "port": "\"<%= ports.get(pname) %>\"" |
| 63 | + }, |
| 64 | + "cmsis": { |
| 65 | + "cbuildRunFile": "${command:cmsis-csolution.getCbuildRunFile}", |
| 66 | + "updateConfiguration": "auto" |
| 67 | + } |
16 | 68 | } |
17 | 69 | }, |
18 | 70 | "tasks": [{ |
19 | 71 | "label": "CMSIS Load+Run", |
20 | 72 | "type": "shell", |
21 | 73 | "command": "<%= config.model %>", |
22 | 74 | "options": { |
23 | | - "cwd": "${workspaceFolder}/<%= solution_folder %>", |
| 75 | + "cwd": "<%= data.cwd %>", |
24 | 76 | "shell": "<%= data.shell[process.platform] %>" |
25 | 77 | }, |
26 | 78 | "args": [ |
|
34 | 86 | "<%= config.args.trim().split(/\\s+/).join('\\n') %>\n", |
35 | 87 | "<% } %>", |
36 | 88 | "<% const files = image_files.map(s => s.file) %>", |
37 | | - "<% for (const file of files) { %>", |
38 | | - "-a", "<%= file %>\n", |
| 89 | + "<% for (const [idx, file] of files.entries()) { %>", |
| 90 | + "-a", "<%= file %><%= idx + 1 < files.length ? '\\n' : '' %>", |
39 | 91 | "<% } %>" |
40 | 92 | ], |
41 | 93 | "problemMatcher": [] |
|
0 commit comments