I wrote a nice ARM assembler routine a few years back and it has done its job beautifully over the years on the ARM embedded systems it was designed f开发者_如何学编程or. Now, the time has come to port it on to non-ARM systems and I was wondering if there was tool or some sort of method to take my original ARM assembler source and get a rudimentory C file from it. I could probably do it myself in a couple of days, but it would be nice to have a starting point. Nicer still if the app or method was free :)
Any suggestions?
Hex-Rays Decompiler plugin for IDA Pro can decompile ARM. It's somewhat expensive, so probably not the best choice if you need just one routine.
I don't know such a tool unfortunately... Would be nice... ; )
So the only suggestion I can give is to concentrate on the logic.
You wrote assembly code. So you know what to code is supposed to do. Converting it to C code shouldn't be that hard, even with ARM assembly.
I mean porting C to ARM assembly can be a difficult task. But for the reverse option, if you know the code logic, and if you know how to write C, it should be just ok...
Creates C structures to ease the memory regions you are working with. About the algorithms, they won't change. Just translate what you are doing from assembly to C, with the help of some structs, etc...
Sorry I can give you such a tool...
Good luck : )
You can using radare2 decompiler plugin (r2dec
), it convert asm to pseudo-C. But I think converting manually very interesting.
精彩评论