From be54131898dcf13b9f10da55bd3175d84ff99ae4 Mon Sep 17 00:00:00 2001 From: Prashanth Mundkur Date: Mon, 11 Jun 2018 16:06:11 -0700 Subject: Put the riscv model's output on stderr, leaving stdout for the platform terminal. --- riscv/platform.ml | 4 ++-- riscv/platform_main.ml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/riscv/platform.ml b/riscv/platform.ml index 8d93ad4a..81d2c90a 100644 --- a/riscv/platform.ml +++ b/riscv/platform.ml @@ -93,8 +93,8 @@ let term_read () = let init elf_file = Elf.load_elf elf_file; - Printf.printf "\nRegistered htif_tohost at 0x%Lx.\n" (Big_int.to_int64 (Elf.elf_tohost ())); - Printf.printf "Registered clint at 0x%Lx (size 0x%Lx).\n%!" P.clint_base P.clint_size; + Printf.eprintf "\nRegistered htif_tohost at 0x%Lx.\n" (Big_int.to_int64 (Elf.elf_tohost ())); + Printf.eprintf "Registered clint at 0x%Lx (size 0x%Lx).\n%!" P.clint_base P.clint_size; let start_pc = Elf.Big_int.to_int64 (Elf.elf_entry ()) in let rom = make_rom start_pc in diff --git a/riscv/platform_main.ml b/riscv/platform_main.ml index cb379cdd..c4421cce 100644 --- a/riscv/platform_main.ml +++ b/riscv/platform_main.ml @@ -64,7 +64,7 @@ let elf_arg = Arg.parse options (fun s -> opt_file_arguments := !opt_file_arguments @ [s]) usage_msg; ( match !opt_file_arguments with - | f :: _ -> print_endline ("Loading ELF file " ^ f); f + | f :: _ -> prerr_endline ("Loading ELF file " ^ f); f | _ -> (prerr_endline "Please provide an ELF file."; exit 0) ) -- cgit v1.2.3