Reverse Engineering the NC ECU (revisited) -- SH7508
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
Reverse Engineering the NC ECU (revisited) -- SH7508的更多相关文章
- Reverse Engineering Custom DataTypes -> GUID() in SQL Server to PostgreSQL
原文 https://archive.sap.com/discussions/thread/3641585 First you reverse engineer from a script where ...
- reverse engineering in ax
install Visio2010 Premium(UML model template). not work in Visio 2013 and other version.
- MyEclipse的Hibernate Reverse Engineering失败解决方法
当使用MyEclipse的Hibernate逆向工程功能时,有时出现不成功的情况,点击finish按钮后对应的源文件目录没有生产相关对象,这时应该如何解决呢? 在国内的网站找了很久没找到,最后在国外的 ...
- MyEclipse Hibernate Reverse Engineering 找不到项目错误
解决办法:在项目下找到.project文件,在最后的natures标签加入下面红色的一行代码. <natures> <nature>com.genuitec.ec ...
- radare, the reverse engineering framework
History The radare project [http://radare.org/] started in February of 2006 aiming to provide a free ...
- symfony2已有数据表导入实体时报错 Doctrine does not support reverse engineering from tables that don't have a primary key
先在配置文件 app/config/config.yml中配置 schema_filter: /^(?!(tablename))/ 即可,或者在出现问题表都加上一个id 然后再使用命令 php app ...
- (转)EntityFrameword “Reverse Engineer Code First” 连接 MySql
转自:http://stackoverflow.com/questions/19676624/error-trying-to-reverse-engineer-code-first-mysql-dat ...
- OtterCTF - Reverse - Msg Me This
原文地址:Msg Me This 题目 Category: Reverse Engineering Points: 500 Solves: 15 Description: Rick created a ...
- 基于ARM处理器的反汇编器软件简单设计及实现
写在前面 2012年写的毕业设计,仅供参考 反汇编的目的 缺乏某些必要的说明资料的情况下, 想获得某些软件系统的源代码.设计思想及理念, 以便复制, 改造.移植和发展: 从源码上对软件的可靠性和安全性 ...
随机推荐
- go 切片的 插入、删除
package main import ( "fmt" ) func InsertSpringSliceCopy(slice, insertion []string, index ...
- [转]python与numpy基础
来源于:https://github.com/HanXiaoyang/python-and-numpy-tutorial/blob/master/python-numpy-tutorial.ipynb ...
- 读书笔记--C陷阱与缺陷(六)
第六章 1.预处理器:预处理器先对代码进行必要的转换处理,简化编程者的工作. 它的重要原因有以下两点: a. 假如要将程序中出现的所有实例都加以修改,但希望只改动程序一处数值,重新编译实现. 预处理器 ...
- No.12 selenium for python 截屏
一.selenium for python 提供的几种截图方法 从上至下,很容易理解 1.as_file 获取当前window的截图,参数filename则表示截图的路径以及名称 出现IOError时 ...
- hdu 5137 去掉一个点 使得最短路最大(2014广州现场赛 K题)
题意:从2~n-1这几个点中任意去掉一个点,使得从1到n的最短路径最大,如果任意去掉一个点1~n无通路输出Inf. Sample Input4 51 2 31 3 71 4 502 3 43 4 23 ...
- HP 打印机监控
http://www.ttlsa.com/zabbix/zabbix-monitor-hp-printer/ https://www.cnblogs.com/losbyday/articles/583 ...
- 组件库按需加载 借助babel-plugin-import实现
前段时间一直在基于webpack进行前端资源包的瘦身.在项目中基于路由进行代码分离,http://www.cnblogs.com/legu/p/7251562.html.对于公司内部的组件库,所有内容 ...
- day6作业--游戏人生
本节作业: 熟练使用类和模块,写一个交互性强.有冲突的程序. 思路: 1.各个模块之间的调用关系,如何使用类,各种方法的使用上面: 2.学了类,以为能用来解决所有问题,东西都要写在类里面: 3.下面自 ...
- [水煮 ASP.NET Web API2 方法论](1-4)从 MVC Controller 链接到 API Controller 以及反向链接
问题 想创建一个从 ASP.NET MVC controller 到 ASP.NET Web API controller 的直接链接,或者反向链接. 解决方案 可以使用 System.Web.Htt ...
- doc元素select 取值