http://forum.miata.net/vb/showthread.php?t=536601

Hey all!

About 5 years ago, there was a great thread on reverse engineering the NC ECU (http://forum.miata.net/vb/showthread.php?t=341366). In the spirit of that thread, I wanted to continue the discussion here for anyone remotely interested in the ecu’s inner workings. MX-Five (Clive) and Jim Boemler have done some solid work on this already, and I’m hoping we can rekindle further exploration. Please, no pissing matches between folks with regards to tunes and tuners… the end goal here is discovery, and sharing information. If any tuners have technical knowledge that doesn't compromise their tuning strategies, I’m sure you’d have a captive audience. All ears, or eyes, or whatever.. you know what I mean!  Anyway, to start things off I’ve consolidated some information on the tools needed for disassembling the ROM should anyone want to explore.

---

DOCUMENTATION

Renesas sh7058 manual
https://googledrive.com/host/0B3_pF8...sas_sh7058.pdf

Sega SH-4 manual (has C equivalents of the SH instruction set, kinda helpful)
https://googledrive.com/host/0B3_pF8...ZDQ/SHC_PM.pdf

---

TOOLS

KPIT Gnu Tools & Renesas High-Performance Embedded Workshop
http://www.kpitgnutools.com/index.php

A compiler/debugger/simulator that's extremely useful! Step thru code, access RAM, registers, i/o simulation (haven’t quite figured that out), etc. It requires registering a free account, and will take a day or so for confirmation granting access to downloads. Once confirmed, go to free downloads > all downloads.

Download the following and install.
HEW 4.08-ntc for KPIT GNU Tools with Simulators
GNUV850 v12.02 Windows Tool Chain

Setup
* run HEW
* from popup or file menu, select create a new project workspace
* give workspace/project a name
* set CPU family to 'SuperH RISC enginge’
* set toolchain to 'KPIT GNUSH [ELF]'
* leave project at default (C application)
* press ok 
* (new popup) leave toolchain version at default
* set CPU series to 'SH-2e'
* set CPU type to ‘SH7058F'
* press next
* (option setting popup) press next
* (library generator settings popup) select 'enable all', then press next
* (target system for debugging popup) select targets 'SH-2E' check box
* set target type to 'SH-2E' (should be default)
* press next
* select finish
* (summary popup) press ok, and the workspace will load
* select debug > debug settings
* set target to 'SH-2E Simulator'
* set debug format to ‘Binary'
* select browse, and then select your ROM file
* press ok to confirm
* press ok again to get out of debug settings popup
* (warning popup) select ‘YES’ to continue
* (peripheral function simulation popup), press ok
* look at the project browser pane to the left
* right-click your ROM, and select download
* go debug menu and select 'reset CPU'
* disassembly visible, and now you can step thru the code

One additional step I'm unsure if required for accessing RAM is going to setup > simulator > memory resource.. then setting up both Memory Map and Memory Resource according to Table 9.3 in the Renesas manual. One quirk, memory settings don't stick when reloading project.

IDA Pro - Probably reversings #1 tool (both legitimate and fringe)
https://www.hex-rays.com/index.shtml

Setup
* drag ROM into ida
* set processor type to Renesas SH4B
* check box to create RAM section
* set RAM start address to 0xffff0000
* set RAM size to FFFF
* press ok
* popup will ask chose device name, select SH7058
* press ‘G’ (goto) and enter 0000 (you are likely at the top anyway)
* press ‘D’ three times (you will see hex convert to long value.. for example, mine says "data.l unk_C0C”)
* double click that reference, or press ‘G’ and type it in (only the hex)
* press ‘C’ - you will see some disassembled code
* goto options > analysis > kernal options 1, then check the box 'final analysis pass' and press ok
* goto options > analysis, then press reanalyze program
* rom disassembled, now the hard part.. what does it all mean?

IDA Register Definitions for SH7055 / SH7058 by dshultz over at the romraider forum. 
https://raw.githubusercontent.com/ds...rc/IDA/sh3.cfg
Copy file to your IDA cfg directory, and replace sh3.cfg which should already exist. 
Interrupts will be labeled on reanalysis.

IDA Consonance Theme - Eye strain relief from the default color theme!
https://github.com/eugeneching/ida-consonance

转载于:https://www.cnblogs.com/shangdawei/p/4552170.html

Reverse Engineering the NC ECU (revisited) -- SH7508相关推荐

  1. Clustering method in protocol reverse engineering for industrial protocols

    工业协议逆向工程中的聚类方法 一.摘要 二.介绍 (一)流量收集 (二)信息提取 (三)基于大小的消息聚类 (四)基于相似性的消息聚类 (五)字段提取 (六)会话分析 三.实验评估 (一)流量收集 ( ...

  2. Reverse Engineering Custom DataTypes - GUID() in SQL Server to PostgreSQL

    Reverse Engineering Custom DataTypes -> GUID() in SQL Server to PostgreSQL 原文 https://archive.sap ...

  3. 逆向工程(Reverse Engineering)

    逆向工程(Reverse Engineering),又称反向工程,是一种技术过程,即对一项目标产品进行逆向分析及研究,从而演绎并得出该产品的处理流程.组织结构.功能性能规格等设计要素,以制作出功能相近 ...

  4. Part 1 – Reverse engineering using Androguard

    Welcome to the very first article of this series on "Reverse Engineering android applications&q ...

  5. hibernate reverse engineering 中没有java src folder

    当用hibernate reverse engineering而无法选择java src folder时的解决办法 要么是该工程已经支持了hibernate特性,而.project文件中没有添加该特性 ...

  6. picoCTF,Reverse Engineering,逆向类,42/55

    picoCTF,Reverse Engineering,42/55 2019 picoCTF 01.vault-door-training,50分 02.vault-door-1,100分 03.va ...

  7. Reverse Engineering AI Algorithms with XAI

    Is it possible to reverse-engineer AI algorithms to understand their process? Can we use a model agn ...

  8. NETPLIER: Probabilistic Network Protocol Reverse Engineering from Message Traces代码复现记录

      NETPLIER论文对应链接为https://www.ndss-symposium.org/wp-content/uploads/ndss2021_4A-5_24531_paper.pdf,源码对 ...

  9. 《Reverse Engineering for Beginners》读书笔记(一):前言

    研究逆向工程<RE for beginners>一定是本好书,我只能去找英文看,为什么不看中文的原因就不解释了.这本书英文有1000多页,工程量有点大! 看看这些目录,真心佩服老外写的书, ...

最新文章

  1. mongodb的聚合操作
  2. MATLAB编写ode文件,MATLABODE45问题M文件为br/functiondq 爱问知识人
  3. 【测试面试题】偶数和奇数
  4. Class 'PDO' not found 错误
  5. Python Twisted介绍
  6. 庆元宵,12本Python图书签名送
  7. pytorch ner
  8. 东航期货行情接口和交易接口(20190509)
  9. 罗列几个Android插件化开发框架
  10. Rhino Grasshopper 参数化建模 资源合集
  11. wps云盘和zotero的结合(一)
  12. postfix邮件服务器迁移,记一次搭建Postfix邮件服务器(上篇)
  13. XMind2020安装教程
  14. Django——admin功能、注册模型类、模型管理类
  15. linux系统修改时区
  16. IPv6技术精要--第9章 无状态地址自动配置SLACC
  17. 联想微型计算机主机怎么打开,联想台式机怎么进入bios|联想台式电脑按什么键进bios设置-系统城...
  18. T/CMSA 0027-2022 区域陆地碳汇评估技术指南
  19. SQLServer2008密钥
  20. 使用Python下载抖音无水印视频

热门文章

  1. android app 按键精灵,安卓按键精灵的,关闭app程序问题!
  2. 69A.Young Physicist
  3. 关联分析(Association Analysis)--挖掘啤酒与尿布的关联规则
  4. 乾颐堂安德华为数通HCNA真题解析版(第2部分)
  5. Codeforces Round #521 (Div. 3) B. Disturbed People 思维
  6. 育网云盘签约北京市大兴区黄村镇第一中心小学云端租赁服务
  7. Java和C++程序员待遇问题
  8. 基于Python的网络爬虫爬取天气数据可视化分析
  9. 祝所有的程序猿春节愉快,好好休息
  10. Android 解决65536