Picproje Elektronik Sitesi

MİKRODENETLEYİCİLER => ARM => Konuyu başlatan: Klein - 27 Ocak 2017, 19:50:55

Başlık: CORTEX M3 (STM32F103) Disassembler
Gönderen: Klein - 27 Ocak 2017, 19:50:55
Stm32F103 için disasseembler lazım. Mümkünse free. Bildiğiniz bir program var mı?
Başlık: Ynt: CORTEX M3 (STM32F103) Disassembler
Gönderen: mufitsozen - 28 Ocak 2017, 15:27:20
Alıntı yapılan: Klein - 27 Ocak 2017, 19:50:55
Stm32F103 için disasseembler lazım. Mümkünse free. Bildiğiniz bir program var mı?

Klein hocam size ozelden mesaj attim.
Başlık: Ynt: CORTEX M3 (STM32F103) Disassembler
Gönderen: Cemre. - 28 Ocak 2017, 16:48:34
Mümkün mü @mufitsozen hocam?
Başlık: Ynt: CORTEX M3 (STM32F103) Disassembler
Gönderen: Klein - 28 Ocak 2017, 17:13:11
Neden mümkün olmasın ki?
Başlık: Ynt: CORTEX M3 (STM32F103) Disassembler
Gönderen: Cemre. - 28 Ocak 2017, 17:46:13
@Klein hocam, siz soruyu sorduğunuzda google'lamıştım, demek istediğim evet dönüştürülebilir mümkündür ama, misal örnek vereyim, Bülent hoca oturdu asm ile led blink kodu yazdı, derledi bize gönderdi, onun yazdığı gibi geri dönüştürebilir miyiz? Bu mümkün mü?
Başlık: Ynt: CORTEX M3 (STM32F103) Disassembler
Gönderen: Burak B - 28 Ocak 2017, 18:11:40
Alıntı yapılan: Cemre. - 28 Ocak 2017, 17:46:13
... ama, misal örnek vereyim, Bülent hoca oturdu asm ile led blink kodu yazdı, derledi bize gönderdi, onun yazdığı gibi geri dönüştürebilir miyiz? Bu mümkün mü?

Evet mümkün.
Başlık: Ynt: CORTEX M3 (STM32F103) Disassembler
Gönderen: Cemre. - 28 Ocak 2017, 18:16:08
Alıntı yapılan: Burak B - 28 Ocak 2017, 18:11:40
Evet mümkün.

Ben okuduklarımdan bunun mümkün olmadığını anlamıştım. O zaman sorun yok :)
Başlık: Ynt: CORTEX M3 (STM32F103) Disassembler
Gönderen: Zoroaster - 28 Ocak 2017, 18:21:06
Otursan disassembleri kendin bile yazarsın. Ne okudun ki bu karara vardın?

Geri dönüşümle kodu elde edersin de label ve değişken adları kodu yazanın kullandığı isimler kadar anlamlı olmaz.
Başlık: Ynt: CORTEX M3 (STM32F103) Disassembler
Gönderen: Cemre. - 28 Ocak 2017, 18:39:30
http://reverseengineering.stackexchange.com/questions/11650/how-can-i-decompile-an-arm-coretex-m0-hex-file-to-c

Short answer: You can't.

At least, don't expect a readable, and compilable, C source code. There's discussion why elsewhere on this site, so i won't get into details.

Also, note there's not an easy walk-through or how-to. You need to experiment, and you'll need some experience as well.

To get you started, you might:

convert the .hex file into a raw binary file, for example using Hex2bin
use that binary file with the retargetable Decompiler selecting "raw machine code" and probably "ARM+Thumb" as architecture
If the results of of the retargetable decompiler are unsatisfactory (it didnt work well for me, last time i tried), you might want to try the Online Disassembler to get assembly code
Of course, the ultimate tool is IDA, but the freeware version can't handle ARM, and the price is probably a bit steep for a hobby project.

Galiba bu noktadan sonra okumayı bırakıp, uğraşacak iş değil bu demiştim :D Şimdi hatırlayamadım.

ek; @Zoroaster hocam, ne oldu bitti mi taşınma işi? Bittiyse geçmiş olsun... Sorular birikiyor :(
Başlık: Ynt: CORTEX M3 (STM32F103) Disassembler
Gönderen: mufitsozen - 28 Ocak 2017, 18:49:54
Alıntı yapılan: Cemre. - 28 Ocak 2017, 18:39:30
http://reverseengineering.stackexchange.com/questions/11650/how-can-i-decompile-an-arm-coretex-m0-hex-file-to-c

Short answer: You can't.

At least, don't expect a readable, and compilable, C source code. There's discussion why elsewhere on this site, so i won't get into details.

Also, note there's not an easy walk-through or how-to. You need to experiment, and you'll need some experience as well.

To get you started, you might:

convert the .hex file into a raw binary file, for example using Hex2bin
use that binary file with the retargetable Decompiler selecting "raw machine code" and probably "ARM+Thumb" as architecture
If the results of of the retargetable decompiler are unsatisfactory (it didnt work well for me, last time i tried), you might want to try the Online Disassembler to get assembly code
Of course, the ultimate tool is IDA, but the freeware version can't handle ARM, and the price is probably a bit steep for a hobby project.

Galiba bu noktadan sonra okumayı bırakıp, uğraşacak iş değil bu demiştim :D Şimdi hatırlayamadım.

ek; @Zoroaster hocam, ne oldu bitti mi taşınma işi? Bittiyse geçmiş olsun... Sorular birikiyor :(

(https://i.stack.imgur.com/ubvGP.png)

verdigin linkte cok ESKI ve kullanilmayan bir mimari icin bir tool araniyor. (Aceleden Cortex-M0 icin oldugunu gormemisim. arm mimarisi icin bircok tool var) Modern butun CPUlar icin oldukca kolay kullanimli ve anlasilabilir kod yaratan programlar mevcut. Hatta asm ile yazilan bir programi analiz edip onu duzgun bir sekilde structured (goto olmadan) c programina ceviren programlarda var.

Kendi basina yapmak isteyenler ise maalesef Ida Pro gibi bir programi yazmanin herkesin harci olmadigini bilmesi lazim.

(forumda eksik/yanlis bilgi paylasilmamasi icin bu yorumu yaziyorum)