Skip to content

Commit

Permalink
Merge Develop into Main for v1.4.3 Release (#11)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Jake-Carter authored Aug 2, 2022
1 parent ad624c3 commit 8558542
Show file tree
Hide file tree
Showing 22 changed files with 417 additions and 629 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build
buildlogs*
__pycache__
__pycache__
MaximSDK/Template/.vscode/readme.md
8 changes: 8 additions & 0 deletions MaximSDK/Inject/.vscode/flash.gdb
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ define flash_m4
compare-sections
monitor reset halt
end

define flash_m4_run
set architecture armv7e-m
target remote | openocd -c "gdb_port pipe;log_output flash.log" -s $arg0/scripts -f interface/$arg1 -f target/$arg2 -c "init; reset halt"
load
compare-sections
monitor resume
end
35 changes: 33 additions & 2 deletions MaximSDK/Inject/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,56 @@
"label": "flash",
"type": "shell",
"command": "arm-none-eabi-gdb",
"args": [
"--cd=\"${workspaceFolder}\"",
"--se=\"build/${config:program_file}\"",
"--symbols=build/${config:symbol_file}",
"-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
"--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
"--batch"
],
"group": "build",
"problemMatcher": [],
"dependsOn":["build"]
},
{
"label": "flash & run",
"type": "shell",
"command": "arm-none-eabi-gdb",
"args": [
"--cd=\"${workspaceFolder}\"",
"--se=\"build/${config:program_file}\"",
"--symbols=build/${config:symbol_file}",
"-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
"--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
"--ex=\"flash_m4_run ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
"--batch"
],
"group": "build",
"problemMatcher": [],
"dependsOn":["build"]
},
{
"label": "erase flash",
"type": "shell",
"command": "openocd",
"args": [
"-s", "${config:OCD_path}/scripts",
"-f", "interface/${config:M4_OCD_interface_file}",
"-f", "target/${config:M4_OCD_target_file}",
"-c", "\"init; reset halt; max32xxx mass_erase 0;\"",
"-c", "exit"
],
"group":"build",
"problemMatcher": [],
"dependsOn":[]
},
{
"label": "openocd (m4)",
"type": "shell",
"command": "openocd",
"args": [
"-s",
"${config:MAXIM_PATH}/Tools/OpenOCD/scripts",
"${config:OCD_path}/scripts",
"-f",
"interface/${config:M4_OCD_interface_file}",
"-f",
Expand Down
8 changes: 8 additions & 0 deletions MaximSDK/New_Project/.vscode/flash.gdb
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ define flash_m4
compare-sections
monitor reset halt
end

define flash_m4_run
set architecture armv7e-m
target remote | openocd -c "gdb_port pipe;log_output flash.log" -s $arg0/scripts -f interface/$arg1 -f target/$arg2 -c "init; reset halt"
load
compare-sections
monitor resume
end
35 changes: 33 additions & 2 deletions MaximSDK/New_Project/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,56 @@
"label": "flash",
"type": "shell",
"command": "arm-none-eabi-gdb",
"args": [
"--cd=\"${workspaceFolder}\"",
"--se=\"build/${config:program_file}\"",
"--symbols=build/${config:symbol_file}",
"-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
"--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
"--batch"
],
"group": "build",
"problemMatcher": [],
"dependsOn":["build"]
},
{
"label": "flash & run",
"type": "shell",
"command": "arm-none-eabi-gdb",
"args": [
"--cd=\"${workspaceFolder}\"",
"--se=\"build/${config:program_file}\"",
"--symbols=build/${config:symbol_file}",
"-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
"--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
"--ex=\"flash_m4_run ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
"--batch"
],
"group": "build",
"problemMatcher": [],
"dependsOn":["build"]
},
{
"label": "erase flash",
"type": "shell",
"command": "openocd",
"args": [
"-s", "${config:OCD_path}/scripts",
"-f", "interface/${config:M4_OCD_interface_file}",
"-f", "target/${config:M4_OCD_target_file}",
"-c", "\"init; reset halt; max32xxx mass_erase 0;\"",
"-c", "exit"
],
"group":"build",
"problemMatcher": [],
"dependsOn":[]
},
{
"label": "openocd (m4)",
"type": "shell",
"command": "openocd",
"args": [
"-s",
"${config:MAXIM_PATH}/Tools/OpenOCD/scripts",
"${config:OCD_path}/scripts",
"-f",
"interface/${config:M4_OCD_interface_file}",
"-f",
Expand Down
8 changes: 8 additions & 0 deletions MaximSDK/Template/.vscode/flash.gdb
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ define flash_m4
compare-sections
monitor reset halt
end

define flash_m4_run
set architecture armv7e-m
target remote | openocd -c "gdb_port pipe;log_output flash.log" -s $arg0/scripts -f interface/$arg1 -f target/$arg2 -c "init; reset halt"
load
compare-sections
monitor resume
end
35 changes: 33 additions & 2 deletions MaximSDK/Template/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,56 @@
"label": "flash",
"type": "shell",
"command": "arm-none-eabi-gdb",
"args": [
"--cd=\"${workspaceFolder}\"",
"--se=\"build/${config:program_file}\"",
"--symbols=build/${config:symbol_file}",
"-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
"--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
"--batch"
],
"group": "build",
"problemMatcher": [],
"dependsOn":["build"]
},
{
"label": "flash & run",
"type": "shell",
"command": "arm-none-eabi-gdb",
"args": [
"--cd=\"${workspaceFolder}\"",
"--se=\"build/${config:program_file}\"",
"--symbols=build/${config:symbol_file}",
"-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
"--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
"--ex=\"flash_m4_run ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
"--batch"
],
"group": "build",
"problemMatcher": [],
"dependsOn":["build"]
},
{
"label": "erase flash",
"type": "shell",
"command": "openocd",
"args": [
"-s", "${config:OCD_path}/scripts",
"-f", "interface/${config:M4_OCD_interface_file}",
"-f", "target/${config:M4_OCD_target_file}",
"-c", "\"init; reset halt; max32xxx mass_erase 0;\"",
"-c", "exit"
],
"group":"build",
"problemMatcher": [],
"dependsOn":[]
},
{
"label": "openocd (m4)",
"type": "shell",
"command": "openocd",
"args": [
"-s",
"${config:MAXIM_PATH}/Tools/OpenOCD/scripts",
"${config:OCD_path}/scripts",
"-f",
"interface/${config:M4_OCD_interface_file}",
"-f",
Expand Down
Loading

0 comments on commit 8558542

Please sign in to comment.