瀏覽代碼

Small fix

luojia65 4 年之前
父節點
當前提交
1412cd4088
共有 3 個文件被更改,包括 7 次插入1 次删除
  1. 1 0
      platform/k210/.gitignore
  2. 5 0
      platform/k210/justfile
  3. 1 1
      platform/k210/link-k210.ld

+ 1 - 0
platform/k210/.gitignore

@@ -0,0 +1 @@
+kflash.py

+ 5 - 0
platform/k210/justfile

@@ -4,6 +4,8 @@ build-path := "../../target/" + target + "/" + mode + "/"
 m-firmware-file := build-path + "rustsbi-k210"
 m-bin-file := build-path + "rustsbi-k210.bin"
 
+k210-serialport := "/dev/ttyS17"
+
 objcopy := "rust-objcopy --binary-architecture=riscv64"
 
 build: firmware
@@ -11,3 +13,6 @@ build: firmware
 
 firmware:
     @cargo build --target={{target}}
+
+run: build
+    @python3 ./kflash.py --port {{k210-serialport}} --terminal {{m-bin-file}}

+ 1 - 1
platform/k210/link-k210.ld

@@ -3,7 +3,7 @@ MEMORY {
     SRAM : ORIGIN = 0x80000000, LENGTH = 2M
 }
 
-_max_hart_id = 2; 
+_max_hart_id = 1; 
 
 PROVIDE(_stext = 0x80000000);
 PROVIDE(_heap_size = 128K);