IDA and Microcontrollers

If you ever used IDA to analyze embedded stuff, you would immediately notice its pc-centric nature. While any embedded SDK targets specific devices with real-world part numbers, IDA just provides you with a universal analysis framework. You are supposed to know how the device works, its idiosyncrasies, programming model, memory organization, and all other practical stuff. If there is an automatic way to determine the entry point or interrupt vectors, IDA will use it but in general you will have to find out the correct parameters yourself.
The following tutorial fills the gap for C166 (and explains many other things!):
http://andywhittaker.com/ECU/DisassemblingaBoschME755/tabid/96/Default.aspx
Thanks, Andy!

This entry was posted in IDA Pro. Bookmark the permalink.

3 Responses to IDA and Microcontrollers

  1. asdf says:

    One thing I’ve missed when working with IDA on microcontroller code is the ability to specify address space aliases. In many micros the top bits of the address specify how the cache is to be handled, and the disassembly breaks if the code eg. jumps into uncached address space. The way I see it there are two ways to do this. The simple way is to just specify an address mask, but this can not account for eg. on-chip registers that live in a special address range. The other way would be to be able to specify exact address ranges and how they alias each other.
    In the past I’ve abused the segment functionality to load the same code into the aliasing address ranges, but this is obviously far from ideal.

  2. Ilfak Guilfanov says:

    Unfortunately it is impossible to create a universal memory mapping mechanism, there are too many places in the source code where addresses must be mapped, including third-party plugins. Some processor modules define their own memory mapping options. If you know the processor well, please contact me with the details so we can work it out together. Thanks

  3. Visalakshmi Sadhu says:

    Hi,
    I am working on Infineon’s C167CS processor. I need to decompile binary file to c language. Can I use IDA PRO for C166 and decompile it to C>Does this toolw ork for this task. If not what is the other alternative to get intended output. Please suggest . Looking fwd eagerly for your valuable suggestion on this.