Giter Site home page Giter Site logo

ghidra-cypress-fx2's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

thezedwards

ghidra-cypress-fx2's Issues

Error running ApplyCypressFX2RegisterEnums

Hi,
getting this error when running the script.

Thanks for sharing!

ApplyCypressFX2RegisterEnums.java> Running...
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_BREAKPT
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_CPUCS
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP1INCFG
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP1OUTCFG
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP2CFG
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP2FIFOCFG
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP2FIFOPFH
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP2ISOINPKTS
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP4CFG
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP4FIFOCFG
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP4FIFOPFH
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP4ISOINPKTS
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP6CFG
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP6FIFOCFG
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP6FIFOPFH
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP6ISOINPKTS
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP8CFG
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP8FIFOCFG
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP8FIFOPFH
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_EP8ISOINPKTS
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_FIFOPINPOLAR
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_FIFORESET
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_IFCONFIG
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_INPKTEND
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_OUTPKTEND
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_PINFLAGSAB
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_PINFLAGSCD
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_REVCTL
ApplyCypressFX2RegisterEnums.java> FX2_REG_BITS_UART230
ApplyCypressFX2RegisterEnums.java> FX2_REG_VAL_GPIFHOLDTIME
ApplyCypressFX2RegisterEnums.java> Enum count: 30

Error running script: ApplyCypressFX2RegisterEnums.java
java.lang.ClassCastException: class ghidra.program.database.data.EnumDB cannot be cast to class ghidra.program.model.data.EnumDataType (ghidra.program.database.data.EnumDB and ghidra.program.model.data.EnumDataType are in unnamed module of loader ghidra.GhidraClassLoader @22a71081)
at ApplyCypressFX2RegisterEnums.run(ApplyCypressFX2RegisterEnums.java:62)
at ghidra.app.script.GhidraScript.executeNormal(GhidraScript.java:395)
at ghidra.app.script.GhidraScript.doExecute(GhidraScript.java:250)
at ghidra.app.script.GhidraScript.execute(GhidraScript.java:228)
at ghidra.app.plugin.core.script.RunScriptTask.run(RunScriptTask.java:47)
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:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)

more info needed

Hello @gsuberland

Unfortunately, the description isn't detailed enough.

I found that adding a section to 8051.ldefs file is also needed, I tried my best but still don't know if that's right.

  <language processor="Cypress FX2"
            endian="big"
            size="16"
            variant="default"
            version="2.0"
            slafile="8051.sla"
            processorspec="cypress_fx2.pspec"
            id="8051:BE:16:fx2">
    <description>8051 Cypress FX2</description>
    <compiler name="Cypress FX2" spec="8051.cspec" id="default"/>
  </language>

You wrote that the java script has to be run, but I don't know where. Should I compile the .java file and then run it in the console, or load it inside ghidra somehow?

Thank you for your answers
J.

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.