esaulenka / ghidra_stm8 Goto Github PK
View Code? Open in Web Editor NEWGhidra STM8 processor module
License: Apache License 2.0
Ghidra STM8 processor module
License: Apache License 2.0
Hi,
Can you pls give little bit cue on importing stm8 to Ghidra. Current copying to extension folder didnt help me.
Also i couldnt find the language on tool.
Is there any SVD file that you know for stm8s?
Hi, I'm trying to decompile a binary using the extension, but it's not disassembling it correctly:
I also disassembled it using naken_util, and it was correctly disassembled:
This is my first time playing around with Ghidra, am I doing something wrong, or is the plugin broken on my Ghidra version, 10.0.4 ?
Could somebody help me?
Thanks!
Error occurred when importing stm8 flash bin to Ghidra Project.
org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 1; Content is not allowed in prolog.
java.lang.RuntimeException: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 1; Content is not allowed in prolog.
at ghidra.xml.ThreadedXmlPullParserImpl.checkForException(ThreadedXmlPullParserImpl.java:122)
at ghidra.xml.ThreadedXmlPullParserImpl.waitForNextElement(ThreadedXmlPullParserImpl.java:168)
at ghidra.xml.ThreadedXmlPullParserImpl.hasNext(ThreadedXmlPullParserImpl.java:154)
at ghidra.xml.AbstractXmlPullParser.start(AbstractXmlPullParser.java:90)
at ghidra.app.plugin.processors.sleigh.SleighLanguage.restoreXml(SleighLanguage.java:897)
at ghidra.app.plugin.processors.sleigh.SleighLanguage.readSpecification(SleighLanguage.java:889)
at ghidra.app.plugin.processors.sleigh.SleighLanguage.initialize(SleighLanguage.java:149)
at ghidra.app.plugin.processors.sleigh.SleighLanguage.<init>(SleighLanguage.java:111)
at ghidra.app.plugin.processors.sleigh.SleighLanguageProvider.getNewSleigh(SleighLanguageProvider.java:112)
at ghidra.app.plugin.processors.sleigh.SleighLanguageProvider.getLanguage(SleighLanguageProvider.java:99)
at ghidra.program.util.DefaultLanguageService$LanguageInfo.lambda$getLanguage$0(DefaultLanguageService.java:385)
at ghidra.util.task.TaskBuilder$TaskBuilderTask.run(TaskBuilder.java:306)
at ghidra.util.task.Task.monitoredRun(Task.java:134)
at ghidra.util.task.TaskRunner.lambda$startTaskThread$0(TaskRunner.java:106)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 1; Content is not allowed in prolog.
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1243)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
at ghidra.xml.ThreadedXmlPullParserImpl$ContentHandlerRunnable.run(ThreadedXmlPullParserImpl.java:267)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 3 more
---------------------------------------------------
Build Date: 2022-May-21 0030 CEST
Ghidra Version: 10.1.4
Java Home: /usr/lib/jvm/java-11-openjdk
JVM Version: Oracle Corporation 11.0.15
OS: Linux 5.15.45-1-lts amd64
The documentation indicates that when calling the CALL operand, only two bytes are added to the stack instead of three
PCH, and the PCL byte of the PCE is ignored.
As far as I can read the isa description of the STM8 in the .sinc file the two instructions ":CALLF Addr24" and ":CALLF [Addr16DW]" are defined in a very similar way. But doesn't the ":CALLF [Addr16DW]" need one dereferencing?
I do not have code here which uses this instruction so I cannot check.
Is there any way to create a Ghidra function ID database from the (Cosmic or other) compiler's clib? Are these available somewhere? Too many unknown functions :-)
Error when tracing and emulating the instruction [90 fd] = > CALL (Y)
debugging at the chip level and in the Ghidra program showed that the instruction in the STM8S controller works differently than in the documentation.
How it works
CALL (Y) is equivalent to CALL Y without a request to address a jump by the value of register Y and the same with register X
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.