
Implementing a New CPU Architecture for Ghidra [slides] - guedou
https://docs.google.com/presentation/d/1b955DV2ii-Dgv6YR4kUrJtjGugEqXD3FffTHRfvVSYo/edit?usp=sharing
======
mappu
This builds upon your previous
[https://news.ycombinator.com/item?id=17725189](https://news.ycombinator.com/item?id=17725189)
?

I tried to read more about MeP architecture but there is very little
"conventional" info about it

\- GCC 3.4 port abandoned
[http://people.redhat.com/dj/mep/](http://people.redhat.com/dj/mep/) , what
compiler is commonly used?

\- Wikipedia page [https://en.wikipedia.org/wiki/Media-
embedded_processor](https://en.wikipedia.org/wiki/Media-embedded_processor) ,
well, compare it to RISC-V that contains assembly and microarchitecture
details

~~~
guedou
Yes,the idea is to use the Ghidra decompiler to ease reversing new parts of
the FlashAir firmware.

The MeP-c4 datasheet is available at
[https://www.datasheetarchive.com/pdf/download.php?id=6693e80...](https://www.datasheetarchive.com/pdf/download.php?id=6693e804e3df834cc0ce6f53df8c5cf03850f3&type=P&term=MeP%2520c-4)

I had success compiling GCC with MeP support using git and the commit before
the removal. Yet, I believe that FlashAir are not compiled with gcc.

------
saagarjha
As far as I'm aware, there's really no way to add support to IDA Pro's
decompiler for custom architectures, so I'm really glad that Ghidra has the
tools to do this!

~~~
dmitrygr
That is false. I wrote an IDA plugin to support the VMU CPU. It is actually
quite well documented in the IDA SDK.
[http://dmitry.gr/?r=05.Projects&proj=25.%20VMU%20Hacking](http://dmitry.gr/?r=05.Projects&proj=25.%20VMU%20Hacking)

~~~
arthurcolle
Impressive work! How hard was porting over Flappy Bird over to the VMU? Did
you just hand-design the graphics?

~~~
dmitrygr
I wrote it in c. Source is on the site :)

~~~
arthurcolle
Unfortunately I can't run it locally. Do you have an alternative version for
local dev? Ideally for macOS? I'd love to play around with it!

~~~
dmitrygr
compile the source for SDL?

or, i also published a VMU emulator (in source) which will build on macos. you
can run the cortex-m23 emulator i wrote in it, and then the game in that

~~~
arthurcolle
Awesome I'll give that a shot

