Skip to content

Commit

Permalink
Merge pull request qclic#4 from qclic/dev/new
Browse files Browse the repository at this point in the history
Dev/new
  • Loading branch information
ZR233 authored Jan 20, 2025
2 parents bec4468 + 72f93da commit a252cca
Show file tree
Hide file tree
Showing 136 changed files with 4,981 additions and 4,095 deletions.
1 change: 0 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ runner = "ostool cargo-test"

[build]
target = "aarch64-unknown-none"

18 changes: 12 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,21 @@ jobs:
run: sudo apt update && sudo apt install qemu-system -y
- name: Install libudev-dev
run: sudo apt update && sudo apt install libudev-dev -y
- name: Install cargo-binutils
run: cargo install cargo-binutils
- name: Install ostool
run: cargo install ostool

- name: Install toolchain
run: rustup show
- name: Check rust version
run: rustc --version --verbose

- uses: Swatinem/rust-cache@v2
with:
workspaces: "."

- name: Install cargo-binutils
run: cargo install cargo-binutils
- name: Install ostool
run: cargo install ostool
- name: Add Target
run: rustup target add aarch64-unknown-none
- name: Check code format
run: cargo fmt --all -- --check

Expand Down Expand Up @@ -62,7 +68,7 @@ jobs:
- name: Test sparreal-macros
if: ${{ always() }}
working-directory: crates/sparreal-macros
run: cargo test
run: cargo test --target x86_64-unknown-linux-gnu

- name: Test page-table-arm
if: ${{ always() }}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/target
/*.log
.project*
Empty file removed .gitmodules
Empty file.
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions .idea/deployment.xml

This file was deleted.

588 changes: 0 additions & 588 deletions .idea/editor.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

30 changes: 0 additions & 30 deletions .idea/sparreal-os.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

25 changes: 7 additions & 18 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,19 @@
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "xtask",
"cargo": {
"args": [
"build",
"-p",
"xtask"
]
},
"args": ["elf", "kernel/hal/bsp/aarch64/raspi4.toml"]
},
// lldb 不支持 riscv,需要用此配置调试
{
"type": "cppdbg",
"name": "KDebug Riscv",
"name": "KDebug cppdbg",
"request": "launch",
"miDebuggerServerAddress": "localhost:1234",
"program": "${workspaceFolder}/target/riscv64gc-unknown-none-elf/debug/kernel",
"miDebuggerPath": "gdb-multiarch.exe",
"program": "${workspaceFolder}/target/kernel.elf",
"miDebuggerPath": "gdb-multiarch",
"cwd": "${workspaceRoot}",
"preLaunchTask": "qemu debug"
},
{
"name": "KDebug",
"name": "KDebug lldb",
"type": "lldb",
"request": "custom",
"initCommands": [
Expand All @@ -39,7 +27,8 @@
],
"processCreateCommands": [
"gdb-remote localhost:1234" // Connect to the GDB Server
]
],
"preLaunchTask": "qemu debug"
}
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"rust-analyzer.cargo.allTargets": false,
"rust-analyzer.checkOnSave": false,
"rust-analyzer.checkOnSave": true,
"rust-analyzer.check.command": "clippy",
"lldb.displayFormat": "auto",
"lldb.dereferencePointers": true,
Expand Down
29 changes: 25 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "qemu debug",
"type": "shell",
"command": "cargo xtask -d"
"label": "qemu debug",
"command": "ostool",
"args": [
"run",
"qemu",
"-d"
],

"options": {
"cwd": "${workspaceFolder}",
},
"problemMatcher": {
"base": "$rustc",
"background": {
"activeOnStart": true,
"beginsPattern": "^.*",
"endsPattern": "^qemu-system.*"
}
},
"group": {
"kind": "test",
"isDefault": true
},
"detail": "断点调试 test 测试用例",
"isBackground": true,
}
]
}
Loading

0 comments on commit a252cca

Please sign in to comment.