Skip to content

Commit 8558542

Browse files
authored
Merge Develop into Main for v1.4.3 Release (#11)
* Re-work test script * Update generator with support for compiler definitions * Add 'flash & run' utility task * Make template search independent of cwd * Improve generator performance, move SDK modules out - Match generator with AI8x implementation - Template replace on one single string instead of iterating line by line - Move SDK modules out of repo. These live in msdk-internal now * Add overwrite option and check for modifications * Fix bug in OpenOCD utility task * Update gitignore * Remove unused imports * Add flash erase utility task * Add another note about backslashes to readme * Update test script * Update test script * Add CLI for test functions * Update example existence check * Update maintenance script * Update installer package for v1.4.3 release
1 parent ad624c3 commit 8558542

File tree

22 files changed

+417
-629
lines changed

22 files changed

+417
-629
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build
22
buildlogs*
3-
__pycache__
3+
__pycache__
4+
MaximSDK/Template/.vscode/readme.md

MaximSDK/Inject/.vscode/flash.gdb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,11 @@ define flash_m4
55
compare-sections
66
monitor reset halt
77
end
8+
9+
define flash_m4_run
10+
set architecture armv7e-m
11+
target remote | openocd -c "gdb_port pipe;log_output flash.log" -s $arg0/scripts -f interface/$arg1 -f target/$arg2 -c "init; reset halt"
12+
load
13+
compare-sections
14+
monitor resume
15+
end

MaximSDK/Inject/.vscode/tasks.json

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,56 @@
2626
"label": "flash",
2727
"type": "shell",
2828
"command": "arm-none-eabi-gdb",
29+
"args": [
30+
"--cd=\"${workspaceFolder}\"",
31+
"--se=\"build/${config:program_file}\"",
32+
"--symbols=build/${config:symbol_file}",
33+
"-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
34+
"--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
35+
"--batch"
36+
],
37+
"group": "build",
38+
"problemMatcher": [],
39+
"dependsOn":["build"]
40+
},
41+
{
42+
"label": "flash & run",
43+
"type": "shell",
44+
"command": "arm-none-eabi-gdb",
2945
"args": [
3046
"--cd=\"${workspaceFolder}\"",
3147
"--se=\"build/${config:program_file}\"",
3248
"--symbols=build/${config:symbol_file}",
3349
"-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
34-
"--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
50+
"--ex=\"flash_m4_run ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
3551
"--batch"
3652
],
3753
"group": "build",
3854
"problemMatcher": [],
3955
"dependsOn":["build"]
4056
},
57+
{
58+
"label": "erase flash",
59+
"type": "shell",
60+
"command": "openocd",
61+
"args": [
62+
"-s", "${config:OCD_path}/scripts",
63+
"-f", "interface/${config:M4_OCD_interface_file}",
64+
"-f", "target/${config:M4_OCD_target_file}",
65+
"-c", "\"init; reset halt; max32xxx mass_erase 0;\"",
66+
"-c", "exit"
67+
],
68+
"group":"build",
69+
"problemMatcher": [],
70+
"dependsOn":[]
71+
},
4172
{
4273
"label": "openocd (m4)",
4374
"type": "shell",
4475
"command": "openocd",
4576
"args": [
4677
"-s",
47-
"${config:MAXIM_PATH}/Tools/OpenOCD/scripts",
78+
"${config:OCD_path}/scripts",
4879
"-f",
4980
"interface/${config:M4_OCD_interface_file}",
5081
"-f",

MaximSDK/New_Project/.vscode/flash.gdb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,11 @@ define flash_m4
55
compare-sections
66
monitor reset halt
77
end
8+
9+
define flash_m4_run
10+
set architecture armv7e-m
11+
target remote | openocd -c "gdb_port pipe;log_output flash.log" -s $arg0/scripts -f interface/$arg1 -f target/$arg2 -c "init; reset halt"
12+
load
13+
compare-sections
14+
monitor resume
15+
end

MaximSDK/New_Project/.vscode/tasks.json

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,56 @@
2626
"label": "flash",
2727
"type": "shell",
2828
"command": "arm-none-eabi-gdb",
29+
"args": [
30+
"--cd=\"${workspaceFolder}\"",
31+
"--se=\"build/${config:program_file}\"",
32+
"--symbols=build/${config:symbol_file}",
33+
"-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
34+
"--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
35+
"--batch"
36+
],
37+
"group": "build",
38+
"problemMatcher": [],
39+
"dependsOn":["build"]
40+
},
41+
{
42+
"label": "flash & run",
43+
"type": "shell",
44+
"command": "arm-none-eabi-gdb",
2945
"args": [
3046
"--cd=\"${workspaceFolder}\"",
3147
"--se=\"build/${config:program_file}\"",
3248
"--symbols=build/${config:symbol_file}",
3349
"-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
34-
"--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
50+
"--ex=\"flash_m4_run ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
3551
"--batch"
3652
],
3753
"group": "build",
3854
"problemMatcher": [],
3955
"dependsOn":["build"]
4056
},
57+
{
58+
"label": "erase flash",
59+
"type": "shell",
60+
"command": "openocd",
61+
"args": [
62+
"-s", "${config:OCD_path}/scripts",
63+
"-f", "interface/${config:M4_OCD_interface_file}",
64+
"-f", "target/${config:M4_OCD_target_file}",
65+
"-c", "\"init; reset halt; max32xxx mass_erase 0;\"",
66+
"-c", "exit"
67+
],
68+
"group":"build",
69+
"problemMatcher": [],
70+
"dependsOn":[]
71+
},
4172
{
4273
"label": "openocd (m4)",
4374
"type": "shell",
4475
"command": "openocd",
4576
"args": [
4677
"-s",
47-
"${config:MAXIM_PATH}/Tools/OpenOCD/scripts",
78+
"${config:OCD_path}/scripts",
4879
"-f",
4980
"interface/${config:M4_OCD_interface_file}",
5081
"-f",

MaximSDK/Template/.vscode/flash.gdb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,11 @@ define flash_m4
55
compare-sections
66
monitor reset halt
77
end
8+
9+
define flash_m4_run
10+
set architecture armv7e-m
11+
target remote | openocd -c "gdb_port pipe;log_output flash.log" -s $arg0/scripts -f interface/$arg1 -f target/$arg2 -c "init; reset halt"
12+
load
13+
compare-sections
14+
monitor resume
15+
end

MaximSDK/Template/.vscode/tasks.json

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,56 @@
2626
"label": "flash",
2727
"type": "shell",
2828
"command": "arm-none-eabi-gdb",
29+
"args": [
30+
"--cd=\"${workspaceFolder}\"",
31+
"--se=\"build/${config:program_file}\"",
32+
"--symbols=build/${config:symbol_file}",
33+
"-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
34+
"--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
35+
"--batch"
36+
],
37+
"group": "build",
38+
"problemMatcher": [],
39+
"dependsOn":["build"]
40+
},
41+
{
42+
"label": "flash & run",
43+
"type": "shell",
44+
"command": "arm-none-eabi-gdb",
2945
"args": [
3046
"--cd=\"${workspaceFolder}\"",
3147
"--se=\"build/${config:program_file}\"",
3248
"--symbols=build/${config:symbol_file}",
3349
"-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
34-
"--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
50+
"--ex=\"flash_m4_run ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
3551
"--batch"
3652
],
3753
"group": "build",
3854
"problemMatcher": [],
3955
"dependsOn":["build"]
4056
},
57+
{
58+
"label": "erase flash",
59+
"type": "shell",
60+
"command": "openocd",
61+
"args": [
62+
"-s", "${config:OCD_path}/scripts",
63+
"-f", "interface/${config:M4_OCD_interface_file}",
64+
"-f", "target/${config:M4_OCD_target_file}",
65+
"-c", "\"init; reset halt; max32xxx mass_erase 0;\"",
66+
"-c", "exit"
67+
],
68+
"group":"build",
69+
"problemMatcher": [],
70+
"dependsOn":[]
71+
},
4172
{
4273
"label": "openocd (m4)",
4374
"type": "shell",
4475
"command": "openocd",
4576
"args": [
4677
"-s",
47-
"${config:MAXIM_PATH}/Tools/OpenOCD/scripts",
78+
"${config:OCD_path}/scripts",
4879
"-f",
4980
"interface/${config:M4_OCD_interface_file}",
5081
"-f",

0 commit comments

Comments
 (0)