DRTIO port - satman firmware #136

Merged
sb10q merged 6 commits from mwojcik/artiq-zynq:drtio_satman into master 2021-10-08 16:04:50 +08:00
2 changed files with 2 additions and 88 deletions
Showing only changes of commit a3a6156db1 - Show all commits

View File

@ -10,12 +10,12 @@ fn main() {
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap()); let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
File::create(out.join("link.x")) File::create(out.join("link.x"))
.unwrap() .unwrap()
.write_all(include_bytes!("link.x")) .write_all(include_bytes!("../runtime/link.x"))
Outdated
Review

These files do not belong specifically to the runtime. Put them in their own folder?

These files do not belong specifically to the runtime. Put them in their own folder?

libbuild_zynq seems a proper candidate with shared build code, maybe? Or a linker folder, with just the linker script inside?

``libbuild_zynq`` seems a proper candidate with shared build code, maybe? Or a ``linker`` folder, with just the linker script inside?
Outdated
Review

libbuild_zynq would be ok I think.

``libbuild_zynq`` would be ok I think.
.unwrap(); .unwrap();
println!("cargo:rustc-link-search={}", out.display()); println!("cargo:rustc-link-search={}", out.display());
// Only re-run the build script when link.x is changed, // Only re-run the build script when link.x is changed,
// instead of when any part of the source code changes. // instead of when any part of the source code changes.
println!("cargo:rerun-if-changed=link.x"); println!("cargo:rerun-if-changed=../runtime/link.x");
build_zynq::cfg(); build_zynq::cfg();
} }

View File

@ -1,86 +0,0 @@
ENTRY(Reset);
MEMORY
{
SDRAM : ORIGIN = 0x00100000, LENGTH = 0x1FF00000
}
SECTIONS
{
__text_start = .;
.text :
{
KEEP(*(.text.exceptions));
*(.text.boot);
*(.text .text.*);
} > SDRAM
__text_end = .;
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > SDRAM
__exidx_end = .;
.ARM.extab :
{
* (.ARM.extab*)
} > SDRAM
.rodata : ALIGN(4)
{
*(.rodata .rodata.*);
} > SDRAM
.data : ALIGN(4)
{
*(.data .data.*);
} > SDRAM
.bss (NOLOAD) : ALIGN(4)
{
__bss_start = .;
*(.bss .bss.*);
. = ALIGN(4);
__bss_end = .;
} > SDRAM
.heap (NOLOAD) : ALIGN(8)
{
__heap0_start = .;
. += 0x8000000;
__heap0_end = .;
__heap1_start = .;
. += 0x8000000;
__heap1_end = .;
} > SDRAM
.stack1 (NOLOAD) : ALIGN(8)
{
__stack1_end = .;
. += 0x1000000;
__stack1_start = .;
} > SDRAM
.stack0 (NOLOAD) : ALIGN(8)
{
__stack0_end = .;
. += 0x20000;
__stack0_start = .;
} > SDRAM
.irq_stack1 (NOLOAD) : ALIGN(8)
{
__irq_stack1_end = .;
. += 0x100;
__irq_stack1_start = .;
} > SDRAM
.irq_stack0 (NOLOAD) : ALIGN(8)
{
__irq_stack0_end = .;
. += 0x100;
__irq_stack0_start = .;
} > SDRAM
}