- Ghidra / Sleigh 11.4
- Language Id:
ARM:LE:32:v8-m
ARM8m_le.sla
ARMCortex.pspec
Target MCU: RP2350 Cortex-M33
Sample program: The Official Raspberry Pi Pico Examples Repo (adc_dma_capture)
Compiled ELF Image: adc_dma_capture.elf.gz
Navigate to the function generic_save_state at address 0x10001778.
The Sleigh decompiler cannot handle the mrrc2 instruction at 0x1000177c.
10001778 <$t>:
10001778 <generic_save_state>:
10001778: b086 sub sp, #0x18
1000177a: b403 push {r0, r1}
1000177c: fc51 0408 mrrc2 p4, #0x0, r0, r1, c8
10001780: e9cd 0102 strd r0, r1, [sp, #8]
10001784: fc51 0409 mrrc2 p4, #0x0, r0, r1, c9
10001788: e9cd 0104 strd r0, r1, [sp, #16]
1000178c: ec51 040a mrrc p4, #0x0, r0, r1, c10
10001790: e9cd 0106 strd r0, r1, [sp, #24]
10001794: bc03 pop {r0, r1}
10001796: 47f0 blx lr
I have verified that sleigh can correctly decompile all opcodes except for the mrr* opcodes.
From the RP2350 Datasheet:
Hypothesis
However:
Impact
The Cortex-M33 with coprocessor extensions is a wildly popular combination... the RP2350 is one, and the NXP MCX N94x/54x as well.
I believe the Renasas RA8 Cortex-M85 Series also use the coprocessor extensions...
ARM:LE:32:v8-mARM8m_le.slaARMCortex.pspecTarget MCU:
RP2350Cortex-M33Sample program: The Official Raspberry Pi Pico Examples Repo (
adc_dma_capture)Compiled ELF Image: adc_dma_capture.elf.gz
Navigate to the function
generic_save_stateat address0x10001778.The Sleigh decompiler cannot handle the
mrrc2instruction at0x1000177c.I have verified that sleigh can correctly decompile all opcodes except for the
mrr*opcodes.From the RP2350 Datasheet:
Hypothesis
ARM8m_le.slaspec:
T_VARIANT ""CDE ""ARM.sincARM_CDE.sincARM_CDE.sincdoes not define anymrr*instructionsmrrc2is defined in the following two files:ARMinstructions.sincARMTHUMBinstructionss.sincHowever:
CDEis not defined (and it is)Impact
The Cortex-M33 with coprocessor extensions is a wildly popular combination... the RP2350 is one, and the NXP MCX N94x/54x as well.
I believe the Renasas RA8 Cortex-M85 Series also use the coprocessor extensions...