diff --git a/apps/rust-hello/build.rs b/apps/rust-hello/build.rs index 7883f81..4e50d21 100644 --- a/apps/rust-hello/build.rs +++ b/apps/rust-hello/build.rs @@ -6,7 +6,7 @@ fn main() { println!("cargo:rustc-link-arg-bin=rust-hello=-T../common/linker.ld"); let bindings = bindgen::Builder::default() - .header("../../common/uvm32_sys.h") + .header("uvm32_headers.h") .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) .generate() .expect("Unable to generate bindings"); diff --git a/apps/rust-hello/uvm32_headers.h b/apps/rust-hello/uvm32_headers.h new file mode 100644 index 0000000..ed6218e --- /dev/null +++ b/apps/rust-hello/uvm32_headers.h @@ -0,0 +1,2 @@ +#include "../../common/uvm32_sys.h" +#include "../../common/uvm32_common_custom.h" diff --git a/common/uvm32_common_custom.h b/common/uvm32_common_custom.h index 82bb6f4..6739938 100644 --- a/common/uvm32_common_custom.h +++ b/common/uvm32_common_custom.h @@ -1,4 +1,5 @@ -// Definitions needed by both host and target +// Syscall definitions needed by both host and target for sample apps +// These are not required when building a custom host target code with uvm32 // syscalls for exposed host functions, start at 0 #define UVM32_SYSCALL_PUTC 0x00000000 diff --git a/common/uvm32_sys.h b/common/uvm32_sys.h index 0829864..7caa737 100644 --- a/common/uvm32_sys.h +++ b/common/uvm32_sys.h @@ -1,8 +1,15 @@ +#ifndef UVM32_SYS_H +#define UVM32_SYS_H 1 + +// Common definitions used by both uvm32.c and any code running inside VM + // System provided UVM32_SYSCALLs, start at 0x10000000 #define UVM32_SYSCALL_HALT 0x1000000 #define UVM32_SYSCALL_YIELD 0x1000001 #define UVM32_SYSCALL_STACKPROTECT 0x1000002 +// Address of External RAM, when offered by host #define UVM32_EXTRAM_BASE 0x10000000 -#include "uvm32_common_custom.h" +#endif + diff --git a/precompiled/self.bin b/precompiled/self.bin index d5be60a..69db4b1 100755 Binary files a/precompiled/self.bin and b/precompiled/self.bin differ