diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000000000000000000000000000000000..b9fff0ee4a1d980e62f357e320786b0c2f7d9133 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "webfreak.debug" + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000000000000000000000000000000000..798f18abb2f8ee0f9291e3dcf792d4e704ee3611 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "gdb", + "request": "attach", + "name": "Attach to Sextant", + "executable": "${workspaceFolder}/build/boot/sextant.elf", + "target": "localhost:1234", + "remote": true, + "cwd": "${workspaceRoot}", + "valuesFormatting": "parseText", + "windows": { + "gdbpath": "C:/sextant/ccompil/gdb7.exe", + "autorun": [ + ] + }, + "showDevDebugOutput": true, + "printCalls": true + }, + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 4c055a8823a832cf16b333c3aef1d8f4c41b9552..1a638678a84fe9ecdb4897f0558affe303a62609 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -9,15 +9,48 @@ "command": "ls -l" }, + { + "label": "Download and install the windows dependencies (Windows10)", + "type": "shell", + "windows": { + "command": [ + "if (Test-Path -Path 'C:\\sextant') {rmdir -r C:\\sextant};", + "if (Test-Path -Path 'C:\\extract_sextant') {rmdir -r C:\\extract_sextant};", + "Invoke-WebRequest http://www.menaud.fr/Cours/Systeme/Subjects/Codes/PS1/sextant_Win10_64.zip -O sextant_Win10_64.zip;", + "Expand-Archive -Force sextant_Win10_64.zip C:\\extract_sextant;", + "mv C:\\extract_sextant\\sextant C:\\sextant;", + "rmdir -r C:\\extract_sextant;", + "rm sextant_Win10_64.zip;" + ], + "options": { + "env": { + "PATH": "C:\\sextant\\ccompil" + } + } + }, + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, { "label": "Build Sextant", "type": "shell", "windows": { - "command": "C:\\Program Files\\nodejs\\node.exe" + "command": "make", + "options": { + "env": { + "PATH": "C:\\sextant\\ccompil" + } + } }, "linux": { "command": "make" }, + "osx": { + "command": "make" + }, "group": { "kind": "build", "isDefault": true @@ -28,12 +61,46 @@ "label": "Run Sextant", "type": "shell", "windows": { - "command": "C:\\Program Files\\nodejs\\node.exe" + "command": "cd build/boot; c:\\sextant\\qemu\\qemu.exe -L \"c:\\sextant\\qemu\" -net nic,model=ne2k_isa -net user -tftp ./ -cdrom grub.iso", + "options": { + "env": { + "PATH": "C:\\sextant\\ccompil" + } + } }, "linux": { "comments": "To quit Alt + 2 > quit", "command": "cd build/boot; qemu-system-x86_64 -net nic,model=ne2k_isa -net user,tftp=./ -cdrom grub.iso" }, + "osx": { + "comments": "To quit Alt + 2 > quit", + "command": "cd build/boot; qemu-system-x86_64 -net nic,model=ne2k_isa -net user,tftp=./ -cdrom grub.iso" + }, + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, + { + "label": "Debug Sextant", + "type": "shell", + "windows": { + "command": "cd build/boot; c:\\sextant\\qemu\\qemu.exe -S -s -L \"c:\\sextant\\qemu\" -net nic,model=ne2k_isa -net user -tftp ./ -cdrom grub.iso", + "options": { + "env": { + "PATH": "C:\\sextant\\ccompil" + } + } + }, + "linux": { + "comments": "To quit Alt + 2 > quit", + "command": "cd build/boot; qemu-system-i386 -S -s -net nic,model=ne2k_isa -net user,tftp=./ -cdrom grub.iso" + }, + "osx": { + "comments": "To quit Alt + 2 > quit", + "command": "cd build/boot; qemu-system-i386 -S -s -net nic,model=ne2k_isa -net user,tftp=./ -cdrom grub.iso" + }, "group": { "kind": "build", "isDefault": true @@ -50,6 +117,10 @@ "comments": "To quit Alt + 2 > quit", "command": "cd build/boot; qemu-system-x86_64 -curses -net nic,model=ne2k_isa -net user,tftp=./ -cdrom grub.iso" }, + "osx": { + "comments": "To quit Alt + 2 > quit", + "command": "cd build/boot; qemu-system-x86_64 -curses -net nic,model=ne2k_isa -net user,tftp=./ -cdrom grub.iso" + }, "group": { "kind": "build", "isDefault": true