File tree 5 files changed +27
-10
lines changed 5 files changed +27
-10
lines changed Original file line number Diff line number Diff line change 1
1
[target.msp430]
2
2
rustflags = [
3
- "-C",
4
- "linker=./msp-gcc.sh",
5
- "-C",
6
- "link-arg=-Lldscripts",
7
- "-C",
8
- "link-arg=-Tmsp430g2553.ld",
9
- "-C",
10
- "link-arg=-nostartfiles",
3
+ "-C", "link-arg=-Tmsp430g2553.ld",
4
+ "-C", "link-arg=-mmcu=msp430g2553",
5
+ "-C", "link-arg=-nostartfiles",
11
6
]
Original file line number Diff line number Diff line change 1
1
[package ]
2
+ build = " build.rs"
2
3
name = " msp"
3
4
version = " 0.1.0"
4
5
authors = [
" Vadzim Dambrouski <[email protected] >" ]
Original file line number Diff line number Diff line change
1
+ use std:: env;
2
+ use std:: fs:: File ;
3
+ use std:: io:: Write ;
4
+ use std:: path:: PathBuf ;
5
+
6
+ fn main ( ) {
7
+ let out = & PathBuf :: from ( env:: var_os ( "OUT_DIR" ) . unwrap ( ) ) ;
8
+ File :: create ( out. join ( "msp430g2553.ld" ) )
9
+ . unwrap ( )
10
+ . write_all ( include_bytes ! ( "ldscripts/msp430g2553.ld" ) )
11
+ . unwrap ( ) ;
12
+ File :: create ( out. join ( "msp430g2553_symbols.ld" ) )
13
+ . unwrap ( )
14
+ . write_all ( include_bytes ! ( "ldscripts/msp430g2553_symbols.ld" ) )
15
+ . unwrap ( ) ;
16
+ println ! ( "cargo:rustc-link-search={}" , out. display( ) ) ;
17
+
18
+ println ! ( "cargo:rerun-if-changed=build.rs" ) ;
19
+ println ! ( "cargo:rerun-if-changed=ldscripts/msp430g2553.ld" ) ;
20
+ println ! ( "cargo:rerun-if-changed=ldscripts/msp430g2553_symbols.ld" ) ;
21
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
{
2
2
"arch" : " msp430" ,
3
+ "asm-args" : [" -mcpu=msp430" ],
3
4
"data-layout" : " e-m:e-p:16:16-i32:16:32-a:16-n8:16" ,
4
5
"executables" : true ,
6
+ "linker" : " msp430-elf-gcc" ,
5
7
"llvm-target" : " msp430" ,
6
8
"max-atomic-width" : 0 ,
7
9
"no-integrated-as" : true ,
You can’t perform that action at this time.
0 commit comments