mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-10 06:02:09 +00:00
Add support for NEC uPD78 micro-controllers
8-bit micro-controllers with skip-next-if style branching.
This commit is contained in:
parent
92a1c0dccf
commit
fe3783f4ec
8
Ghidra/Processors/upd78/LICENSE.txt
Normal file
8
Ghidra/Processors/upd78/LICENSE.txt
Normal file
@ -0,0 +1,8 @@
|
||||
Ghidra software is released under the Apache 2.0 license. In addition,
|
||||
there are numerous 3rd party components that each have their
|
||||
own license. The license file for each of these licenses can be found
|
||||
in the licenses directory in the installation root directory.
|
||||
|
||||
The 3rd party files in this module are as follows:
|
||||
languages/* Licensed under Apache 2.0 license by Vesa-Pekka Palmu
|
||||
|
0
Ghidra/Processors/upd78/Module.manifest
Normal file
0
Ghidra/Processors/upd78/Module.manifest
Normal file
54
Ghidra/Processors/upd78/data/build.xml
Normal file
54
Ghidra/Processors/upd78/data/build.xml
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
+ Compile sleigh languages within this distribution language module via Eclipse or
|
||||
+ a command shell.
|
||||
+
|
||||
+ * Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
||||
+
|
||||
+ * From command line (requires ant install)
|
||||
+ - cd to data directory containing this file
|
||||
+ - run ant
|
||||
+
|
||||
+ Sleigh compiler options are read from sleighArgs.txt.
|
||||
-->
|
||||
|
||||
<project name="privateBuildDistribution" default="sleigh-compile">
|
||||
|
||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
||||
|
||||
<target name="sleigh-compile">
|
||||
|
||||
<property name="framework.path" value="../../../Framework"/>
|
||||
|
||||
<path id="sleigh.class.path">
|
||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
||||
<include name="*.jar"/>
|
||||
</fileset>
|
||||
<fileset dir="${framework.path}/Generic/lib">
|
||||
<include name="*.jar"/>
|
||||
</fileset>
|
||||
<fileset dir="${framework.path}/Utility/lib">
|
||||
<include name="*.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
||||
|
||||
<fail unless="sleigh.compile.exists" />
|
||||
|
||||
<java classname="${sleigh.compile.class}"
|
||||
classpathref="sleigh.class.path"
|
||||
fork="true"
|
||||
failonerror="true">
|
||||
<jvmarg value="-Xmx2048M"/>
|
||||
<arg value="-DBaseDir=../../../../../" /> <!-- Ghidra install directory -->
|
||||
<arg value="-i"/>
|
||||
<arg value="sleighArgs.txt"/>
|
||||
<arg value="-a"/>
|
||||
<arg value="./languages"/>
|
||||
</java>
|
||||
|
||||
</target>
|
||||
|
||||
</project>
|
31
Ghidra/Processors/upd78/data/languages/upd78.cspec
Normal file
31
Ghidra/Processors/upd78/data/languages/upd78.cspec
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<compiler_spec>
|
||||
<global>
|
||||
<range space="ram"/>
|
||||
</global>
|
||||
<stackpointer register="SP" space="ram" growth="negative"/>
|
||||
<default_proto>
|
||||
<prototype name="__stdcall" extrapop="-2" stackshift="-2">
|
||||
<input>
|
||||
<pentry minsize="1" maxsize="1">
|
||||
<register name="A"/>
|
||||
</pentry>
|
||||
<pentry minsize="1" maxsize="1">
|
||||
<register name="B"/>
|
||||
</pentry>
|
||||
</input>
|
||||
<output>
|
||||
<pentry minsize="1" maxsize="1">
|
||||
<register name="A"/>
|
||||
</pentry>
|
||||
<pentry minsize="2" maxsize="2">
|
||||
<register name="EA"/>
|
||||
</pentry>
|
||||
</output>
|
||||
<unaffected>
|
||||
<register name="SP"/>
|
||||
</unaffected>
|
||||
</prototype>
|
||||
</default_proto>
|
||||
</compiler_spec>
|
15
Ghidra/Processors/upd78/data/languages/upd78.ldefs
Normal file
15
Ghidra/Processors/upd78/data/languages/upd78.ldefs
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<language_definitions>
|
||||
<language processor="upd78"
|
||||
endian="little"
|
||||
size="16"
|
||||
variant="default"
|
||||
version="1.0"
|
||||
slafile="upd78.sla"
|
||||
processorspec="upd78.pspec"
|
||||
id="upd78:LE:16:default">
|
||||
<description>NEC uPD78</description>
|
||||
<compiler name="default" spec="upd78.cspec" id="default"/>
|
||||
</language>
|
||||
</language_definitions>
|
28
Ghidra/Processors/upd78/data/languages/upd78.pspec
Normal file
28
Ghidra/Processors/upd78/data/languages/upd78.pspec
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<processor_spec>
|
||||
<programcounter register="PC"/>
|
||||
<context_data>
|
||||
<tracked_set space="ram">
|
||||
<set name="PSW" val="0"/>
|
||||
</tracked_set>
|
||||
</context_data>
|
||||
<register_data>
|
||||
<register name="PSW" group="Flags"/>
|
||||
<register name="VA_" group="Alt"/>
|
||||
<register name="BC_" group="Alt"/>
|
||||
<register name="DE_" group="Alt"/>
|
||||
<register name="HL_" group="Alt"/>
|
||||
<register name="EA_" group="Alt"/>
|
||||
</register_data>
|
||||
<default_symbols>
|
||||
<symbol name="RST0" address="ram:0000" entry="true"/>
|
||||
<symbol name="NMI" address="ram:0004" entry="false"/>
|
||||
<symbol name="INTT0_INTT1" address="ram:0008" entry="false"/>
|
||||
<symbol name="INT1_INT2" address="ram:0010" entry="false"/>
|
||||
<symbol name="INTE0_INTE1" address="ram:0018" entry="false"/>
|
||||
<symbol name="INTEIN_INTAD" address="ram:0020" entry="false"/>
|
||||
<symbol name="INTSR_INTST" address="ram:0028" entry="false"/>
|
||||
<symbol name="SOFTI" address="ram:0060" entry="false"/>
|
||||
<symbol name="CALL_TABLE" address="ram:0080" entry="false"/>
|
||||
</default_symbols>
|
||||
</processor_spec>
|
1569
Ghidra/Processors/upd78/data/languages/upd78.slaspec
Normal file
1569
Ghidra/Processors/upd78/data/languages/upd78.slaspec
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Ghidra/Processors/upd78/data/manuals/87AD_series_user_manual.pdf
Normal file
BIN
Ghidra/Processors/upd78/data/manuals/87AD_series_user_manual.pdf
Normal file
Binary file not shown.
1
Ghidra/Processors/upd78/data/sleighArgs.txt
Normal file
1
Ghidra/Processors/upd78/data/sleighArgs.txt
Normal file
@ -0,0 +1 @@
|
||||
-t
|
Loading…
Reference in New Issue
Block a user