-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroadster.resc
50 lines (36 loc) · 1.01 KB
/
roadster.resc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
:name: Roadster
:description: This script runs unmodified Tesla Roadster VMS firmware.
$name?="Roadster"
$bin?=$ORIGIN/linux.bin
$image?=$ORIGIN/vms.image
i $ORIGIN/src/CANDecoder.cs
using sysbus
mach create $name
machine LoadPlatformDescription @platforms/cpus/lpc2294.repl
machine LoadPlatformDescriptionFromString
"""
canuart: CAN.CANToUART @ sysbus
rxFromCANId: 0x7fd
txToCANId: 0x7fe
"""
machine SamsungK9NANDFlashFromFile $ORIGIN/flash.bin 0x80000000 "flash" nonPersistent=true
emulation CreateCANHub "canuarthub"
canuarthub AttachTo canuart
canuarthub AttachTo can4
machine LoadPlatformDescriptionFromString "decoder: CAN.CANDecoder @ sysbus"
emulation CreateCANHub "canhub"
canhub AttachTo can1
canhub AttachTo can2
canhub AttachTo can3
canhub AttachTo decoder
showAnalyzer canuart
logFile $ORIGIN/roadster.log
logLevel 3 sysbus
macro reset
"""
sysbus ZeroRange <0x81400000 0x200000>
sysbus LoadBinary $image 0x81400000
sysbus LoadBinary $bin 0x81000000
cpu PC 0x81000000
"""
runMacro $reset