Coder Social home page Coder Social logo

ghidra_stm8's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ghidra_stm8's Issues

Couldnt import to Ghidra

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?

Failing to disassemble, help wanted

Hi, I'm trying to decompile a binary using the extension, but it's not disassembling it correctly:

Import Results Summary

CodeBrowser

I also disassembled it using naken_util, and it was correctly disassembled:

naken

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!

Task Error: Loading language 'STM8:BE:24:default' - Uncaught Exception: java.lang.RuntimeException

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

Stack operation and emulation error

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.

Is :CALLF [Addr16DW] wrong?

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.

FunctionID

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)

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.