MSP430 decompiler does not show any functions #2755
Replies: 1 comment
-
Ghidra uses information obtained from the binary format to determine what areas are code, data, etc. Loading it as a raw binary isn't the problem per say but it doesn't help. Functions are typically found by scanning the executable sections for known entry and exit patterns. I took a look at MSP430 processor directory in the repository and these patterns are not yet present. If you know where the entry point is I would start there. Processors that use far pointers are a bit of hit or miss at the moment with the decompiler. The patterns for the functions are easy to create and are an xml like format. You can see examples in other processors in the repository. You should begin to see a pattern after manually finding a few functions. Once the pattern files have been created the "Function Start Search" analyzer will appear in the list of analyzers. You will need to restart the code browser or ghidra entirely after creating the pattern files. |
Beta Was this translation helpful? Give feedback.
-
(I posted this on Stack Overflow originally).
I'm experimenting with Ghidra and decompiling code intended for the MSP430 FR4133 Launchpad. I'm not sure if it's supported but Ghidra appeared to support MSP430 devices.
For a simple test, I'm using the example code at this link for the MSP EXP430FR4133 Launchpad.
This link contains a simple source program in this directory MSP-EXP430FR4133_Software_Examples_windows\Firmware\Source\OutOfBox_MSP430FR4133. It's a simple program with a stop watch and temperature sensor.
I decided to load the binary that's also there in the Binary folder. Then I selected TI MSP430 16-bit and let Ghidra do the analysis. The problem is that the decompiler doesn't provide any functions. I'm wondering if I've selected the wrong architecture or option?
I'm posting two extra images which show two functions but there's nothing of any significance.
An answer given was that I'm using a TI-TXT image. Ghidra supports similar formats (Intel HEX or Motorola S-Records), but not TI-TXT. I'm after some guidance on how to use Ghidra here.
Beta Was this translation helpful? Give feedback.
All reactions