Added commands for handling Toradex build&run

This commit is contained in:
Sparchatus 2022-03-25 08:37:21 +00:00
parent d58ae46282
commit 31e6421b83
3 changed files with 36 additions and 4 deletions

View File

@ -8,6 +8,7 @@
"containerEnv": { "containerEnv": {
"BFAOS": "${containerWorkspaceFolder}", "BFAOS": "${containerWorkspaceFolder}",
"BFBUILD": "${containerWorkspaceFolder}/build", "BFBUILD": "${containerWorkspaceFolder}/build",
"BFBUILD_QEMU": "${containerWorkspaceFolder}/build_qemu",
}, },
"extensions": [ "extensions": [
@ -15,6 +16,10 @@
"ms-vscode.cpptools-extension-pack", "ms-vscode.cpptools-extension-pack",
], ],
// allow access to the toradex board
"runArgs": ["--privileged"],
"mounts": ["type=bind,src=/dev/bus/usb,dst=/dev/bus/usb"],
"remoteUser": "vscode", "remoteUser": "vscode",
} }

33
.vscode/tasks.json vendored
View File

@ -2,9 +2,9 @@
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{ {
"label": "Initialize Build Directory", "label": "Initialize QEMU Build Directory",
"type": "shell", "type": "shell",
"command": "mkdir -p ${BFBUILD} && cd build && ${BFAOS}/hake/hake.sh -s ${BFAOS} && make -j7 QEMU", "command": "mkdir -p ${BFBUILD_QEMU} && cd ${BFBUILD_QEMU} && ${BFAOS}/hake/hake.sh -s ${BFAOS} && make -j7 QEMU",
"group": { "group": {
"kind": "build", "kind": "build",
"isDefault": true "isDefault": true
@ -13,7 +13,34 @@
{ {
"label": "Build and Run QEMU", "label": "Build and Run QEMU",
"type": "shell", "type": "shell",
"command": "cd build && make qemu_a57", "command": "cd ${BFBUILD_QEMU} && make qemu_a57",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Initialize Toradex Build Directory",
"type": "shell",
"command": "mkdir -p ${BFBUILD} && cd ${BFBUILD} && ${BFAOS}/hake/hake.sh -s ${BFAOS} -a armv8 && make -j7 QEMU",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Build and Run Toradex",
"type": "shell",
"command": "cd ${BFBUILD} && make -j7 imx8x && make usbboot_imx8x",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Toradex Console",
"type": "shell",
"command": "if ! picocom -b 115200 -f n /dev/ttyUSB0; then echo; echo !!!Make sure you installed the toradex udev rules to allow user access!!!; fi",
"group": { "group": {
"kind": "build", "kind": "build",
"isDefault": true "isDefault": true

View File

@ -5,4 +5,4 @@
bootdriver /armv8/sbin/boot_armv8_generic bootdriver /armv8/sbin/boot_armv8_generic
cpudriver /armv8/sbin/cpu_imx8x cpudriver /armv8/sbin/cpu_imx8x
module /armv8/sbin/init module /armv8/sbin/init
module /armv8/sbin/hello module /armv8/sbin/hello catch Aurel Jan Sandro