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  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
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.
Reply
Old Apr 4, 2017 | 06:13 AM
  #2  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
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  
Reply
Old Apr 16, 2017 | 09:22 AM
  #3  
burgers22's Avatar
Evolved Member
 
Joined: Jan 2006
Posts: 953
Likes: 2
From: Oxfordshire
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.
Reply
Old May 19, 2019 | 11:03 PM
  #4  
evl08's Avatar
Evolving Member
20 Year Member
Liked
Loved
iTrader: (2)
 
Joined: Apr 2005
Posts: 114
Likes: 1
From: Melbourne, Australia
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.
Reply
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




All times are GMT -7. The time now is 06:07 AM.