File tree Expand file tree Collapse file tree 4 files changed +17
-14
lines changed Expand file tree Collapse file tree 4 files changed +17
-14
lines changed Original file line number Diff line number Diff line change
1
+ [target.msp430]
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",
11
+ ]
Original file line number Diff line number Diff line change 1
- DEVICE = msp430g2553
2
- TARGET = target/$(DEVICE ) /release/msp
1
+ TARGET = target/msp430/release/msp
3
2
4
3
all :
5
- xargo build --release --target $( DEVICE )
4
+ xargo build --release --target msp430
6
5
msp430-elf-objdump -Cd $(TARGET ) > $(TARGET ) .lst
7
6
msp430-elf-size $(TARGET )
8
7
Original file line number Diff line number Diff line change 16
16
* Build the project: ` $ make `
17
17
* or you can build it using xargo directly (if you don't like ` make ` )
18
18
19
- ` $ xargo build --release --target msp430g2553 `
19
+ ` $ xargo build --release --target msp430 `
20
20
* Flash the firmware using mspdebug: ` $ make prog `
21
21
22
22
## How it works
@@ -44,10 +44,9 @@ Steps:
44
44
45
45
To run this code on the other boards and MCUs, you need to change it in few places:
46
46
* Get a linker script for your MCU from msp430-elf-gcc include directory, and place it
47
- inside ` ldscripts ` folder.
48
- * Rename ` msp430g2553.json ` and modify it to point to the right liker script from step 1
47
+ inside ` ldscripts ` folder. (Don't forget to get ` *_symbols.ld ` one as well).
48
+ * Modify ` .cargo/config ` file so it would point to your ld script from step 1.
49
49
* Modify ` msp-gcc.sh ` so it would pass the right mcu name to the gcc.
50
- * Modify ` DEVICE ` variable inside a Makefile.
51
50
52
51
## Board
53
52
Original file line number Diff line number Diff line change 2
2
"arch" : " msp430" ,
3
3
"data-layout" : " e-m:e-p:16:16-i32:16:32-a:16-n8:16" ,
4
4
"executables" : true ,
5
- "features" : " -ext" ,
6
5
"llvm-target" : " msp430" ,
7
6
"max-atomic-width" : 0 ,
8
7
"no-integrated-as" : true ,
11
10
"relocation-model" : " static" ,
12
11
"target-endian" : " little" ,
13
12
"target-pointer-width" : " 16" ,
14
- "linker" : " ./msp-gcc.sh" ,
15
- "post-link-args" : [
16
- " -Lldscripts" ,
17
- " -Tmsp430g2553.ld" ,
18
- " -nostartfiles"
19
- ]
13
+ "vendor" : " unknown"
20
14
}
You can’t perform that action at this time.
0 commit comments