Notices
ECU Flash

How to setup free C compiler and assembler SH2

Thread Tools
 
Search this Thread
 
Old Apr 4, 2017, 06:13 AM
  #1  
Evolved Member
Thread Starter
 
jcsbanks's Avatar
 
Join Date: May 2006
Location: UK
Posts: 2,399
Likes: 0
Received 5 Likes on 4 Posts
How to setup free C compiler and assembler SH2

Been a while since I've been here, Evo long sold but never forgotten. Hope you're all well and happy.

Thought I would post a few comments and screenshots linking to a few hours playing with setting up HEW for SH2 as another group I am in had written some assembly and didn't seem to know how to build it, yet had an interesting sounding project for the Evo 9.

Back in the day I used KPIT Cummins GNU tools, and tend to prefer command line, but now it seems to be HEW with an IDE that is the free tool.

Don't PM me as I don't visit the forum often.

Download: https://www.renesas.com/en-eu/produc...html#downloads

Follow the pictures in order to see the setup steps I used to get C to compile and then load up in IDA.

Feel free to mangle, use, criticise and enjoy as you wish. No warranty deserved, use at your own risk, blah blah.

Second post to follow to show how to get asm to assemble.
Attached Thumbnails How to setup free C compiler and assembler SH2-1.jpg   How to setup free C compiler and assembler SH2-2.jpg   How to setup free C compiler and assembler SH2-3.jpg   How to setup free C compiler and assembler SH2-4.jpg   How to setup free C compiler and assembler SH2-5.jpg  

How to setup free C compiler and assembler SH2-6.jpg   How to setup free C compiler and assembler SH2-7.jpg   How to setup free C compiler and assembler SH2-8.jpg   How to setup free C compiler and assembler SH2-9.jpg  

Last edited by jcsbanks; Apr 4, 2017 at 06:22 AM.
The following 2 users liked this post by jcsbanks:
evl08 (May 19, 2019), Fox_IX (May 19, 2019)
Old Apr 4, 2017, 06:13 AM
  #2  
Evolved Member
Thread Starter
 
jcsbanks's Avatar
 
Join Date: May 2006
Location: UK
Posts: 2,399
Likes: 0
Received 5 Likes on 4 Posts
How to build assembly language and fix linker errors, define section. The code is relocatable until linked, so arbitrary 0 for address is OK if you are patching code from obj or other files.

-noprelink -nomessage -list="$(CONFIGDIR)\$(PROJECTNAME).map" -nooptimize -start=P/00 -nologo -output="$(CONFIGDIR)\$(PROJECTNAME).abs" -end -input="$(CONFIGDIR)\$(PROJECTNAME).abs" -form=stype -output="$(CONFIGDIR)\$(PROJECTNAME).mot" -exit

This goes into the highlighted box in 13.jpg.
Attached Thumbnails How to setup free C compiler and assembler SH2-10.jpg   How to setup free C compiler and assembler SH2-11.jpg   How to setup free C compiler and assembler SH2-12.jpg   How to setup free C compiler and assembler SH2-13.jpg  
The following users liked this post:
Construct (May 20, 2019)
Old Apr 16, 2017, 09:22 AM
  #3  
Evolved Member
 
burgers22's Avatar
 
Join Date: Jan 2006
Location: Oxfordshire
Posts: 953
Received 2 Likes on 2 Posts
Good to see you back if only for a fleeting time. Will check this out, hopefully it'll make sense now I have a little more coding experience.
Old May 19, 2019, 11:03 PM
  #4  
Evolving Member
iTrader: (2)
 
evl08's Avatar
 
Join Date: Apr 2005
Location: Melbourne, Australia
Posts: 112
Received 1 Like on 1 Post
Very interesting. Writing assembly has a steep learning curve for a higher level language developers like me, so this should help. Hopefully it also encourages some others to get into disassembly and pick up where you left off.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
ILoveAWD
Pacific Northwest
7
Jun 16, 2012 10:01 AM
logic
ECU Flash
24
Sep 28, 2010 03:33 AM
OakosAutomotive
Evo 'For Sale' Wheels / Tires
181
Jul 9, 2009 12:32 PM
Darius@AMS
Automotosports - Illinois
9
Apr 4, 2008 03:08 PM



Quick Reply: How to setup free C compiler and assembler SH2



All times are GMT -7. The time now is 08:28 PM.