diff --git a/.gitignore b/.gitignore index e2c13598..09059a4d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ partition_table.h .Kconfig.prj *.bak .log/ -.vscode/ .cscope/ output/ /toolchain/ diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..b37fc248 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,177 @@ +{ + // Usage: + // 1. Modify the ELF file path + // 2. Modify the IP and Port of DebugServer + // 3. Modify the breakpoint define + "version": "0.2.0", + "configurations": [ + { + "name": "D12x/D13x Load", + "type": "cppdbg", + "request": "launch", + "cwd": "${workspaceFolder}", + "program": "${cwd}/output/d13x_demo88-nand_rt-thread_helloworld/images/d13x.elf", // FIXME + "args": [], + "stopAtEntry": false, + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + "miDebuggerPath": "${cwd}/toolchain/bin/riscv64-unknown-elf-gdb.exe", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "text": "set arch riscv:rv32" + }, + { + "text": "set height 0" + }, + { + "text": "mem 0x30040000 0x3013ffff rw" + }, + { + "text": "mem 0x10000000 0x19ffffff rw" + }, + { + "text": "mem 0x40000000 0x41ffffff rw" + }, + { + "text": "target remote 172.16.x.x:3333" // FIXME + }, + { + // MUST use full path + "text": "load e:/workspace/luban-lite/output/d13x_demo88-nand_rt-thread_helloworld/images/d13x.elf" // FIXME + }, + { + // MUST use full path + "text": "file e:/workspace/luban-lite/output/d13x_demo88-nand_rt-thread_helloworld/images/d13x.elf" // FIXME + }, + { + // FIXME + "text": "b rt_hw_board_init" + } + ] + }, + { + "name": "D12x/D13x connect only", + "type": "cppdbg", + "request": "launch", + "cwd": "${workspaceFolder}", + "program": "${cwd}/output/d13x_demo88-nand_rt-thread_helloworld/images/d13x.elf", // FIXME + "args": [], + "stopAtEntry": false, + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + "miDebuggerPath": "${cwd}/toolchain/bin/riscv64-unknown-elf-gdb.exe", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "text": "set arch riscv:rv32" + }, + { + "text": "set height 0" + }, + { + "text": "mem 0x30040000 0x3013ffff rw" + }, + { + "text": "mem 0x10000000 0x19ffffff rw" + }, + { + "text": "mem 0x40000000 0x41ffffff rw" + }, + { + "text": "target remote 172.16.x.x:3333" // FIXME + }, + { + // MUST use full path + "text": "file e:/workspace/luban-lite/output/d13x_demo88-nand_rt-thread_helloworld/images/d13x.elf" // FIXME + }, + { + // FIXME + "text": "b rt_hw_board_init" + } + ] + }, + { + "name": "D21x Load", + "type": "cppdbg", + "request": "launch", + "cwd": "${workspaceFolder}", + "program": "${cwd}/output/d21x_demo88-nand_rt-thread_helloworld/images/d21x.elf", // FIXME + "args": [], + "stopAtEntry": false, + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + "miDebuggerPath": "${cwd}/toolchain/bin/riscv64-unknown-elf-gdb.exe", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "text": "set height 0" + }, + { + "text": "target remote 172.16.x.x:3333" // FIXME + }, + { + // MUST use full path + "text": "load e:/workspace/luban-lite/output/d21x_demo88-nand_rt-thread_helloworld/images/d21x.elf" // FIXME + }, + { + // MUST use full path + "text": "file e:/workspace/luban-lite/output/d21x_demo88-nand_rt-thread_helloworld/images/d21x.elf" // FIXME + }, + { + // FIXME + "text": "b rt_hw_board_init" + } + ] + }, + { + "name": "D21x connect only", + "type": "cppdbg", + "request": "launch", + "cwd": "${workspaceFolder}", + "program": "${cwd}/output/d21x_demo88-nand_rt-thread_helloworld/images/d21x.elf", // FIXME + "args": [], + "stopAtEntry": false, + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + "miDebuggerPath": "${cwd}/toolchain/bin/riscv64-unknown-elf-gdb.exe", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "text": "set height 0" + }, + { + "text": "target remote 172.16.x.x:3333" // FIXME + }, + { + // MUST use full path + "text": "file e:/workspace/luban-lite/output/d21x_demo88-nand_rt-thread_helloworld/images/d21x.elf" // FIXME + }, + { + // FIXME + "text": "b rt_hw_board_init" + } + ] + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..90999662 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,21 @@ +{ + "terminal.integrated.profiles.windows": { + "PowerShell": { + "source": "PowerShell", + "icon": "terminal-powershell", + "args": ["${workspaceFolder}/win_cmd.bat"], + }, + "Command Prompt": { + "path": [ + "${env:windir}\\Sysnative\\cmd.exe", + "${env:windir}\\System32\\cmd.exe" + ], + "icon": "terminal-cmd", + "args": ["/K ${workspaceFolder}/win_cmd.bat"], + }, + "Git Bash": { + "source": "Git Bash", + "args": ["-c \"source ${workspaceFolder}/tools/onestep.sh\""], + }, + } +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..34888e21 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,89 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Luban-Lite make", + "type": "shell", + "command": "scons", + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": false, + } + }, + { + "label": "Luban-Lite menuconfig", + "type": "shell", + "command": "menuconfig", + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": false, + } + }, + { + "label": "Luban-Lite clean", + "type": "shell", + "command": "scons --clean", + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": false, + } + }, + { + "label": "Luban-Lite list", + "type": "shell", + "command": "scons --list-def", + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": false, + } + }, + { + "label": "Luban-Lite info", + "type": "shell", + "command": "scons --info", + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": false, + } + }, + { + "label": "Luban-Lite aicupg", + "type": "shell", + "command": "scons --aicupg", + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": false, + } + }, + ] +}