From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15322 invoked by alias); 6 Jan 2003 06:50:16 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 15309 invoked from network); 6 Jan 2003 06:50:15 -0000 Received: from unknown (HELO sohm.kpit.com) (203.129.230.82) by 209.249.29.67 with SMTP; 6 Jan 2003 06:50:15 -0000 Subject: New targets to Binutils for H8 series MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Mon, 06 Jan 2003 07:45:00 -0000 content-class: urn:content-classes:message Message-ID: <69595093233BB547BB70CF5E492B63F2B0589F@sohm.kpit.com> X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Shrinivas Atre" To: , , X-SW-Source: 2003-01/txt/msg00262.txt.bz2 Hi, Could any one please comment on following or suggest any ideas ? Background: ----------- The H8 port of GNU identifies three targets. 1. H8/300 - ".h8300" in assembly file and linker script 2. H8/300H - ".h8300h" in assembly file and linker script 3. H8S - ".h8300s" in assembly file and linker script For H8S and H8/300H there is no provision to identify the mode of operation= =20 i.e. if the executable is for normal mode or advanced mode.=20 Due to this we cannot run executables of Normal mode using the GDB/simulato= r.=20 Same problem occurs when the normal mode executable is being debugged. What I have tried ? ------------------- 1. Providing the command line switch ( -n -S or -n -h ) while running=20 the simulator. 2. Addition of one "set mode" command to select the operating mode in the G= DB=20 while debugging the normal mode executable. Issues: ------- 1. Using these switches for advanced mode executable and not using these=20 switches for normal mode executable *may* crash the GDB/Simulator.=20 This is because the GDB/Simulator will misinterpret the data based upon= =20 these switches. And there is no way to ensure this from within executabl= e. 2. When any program is compiled for normal mode with the default linker scr= ipt=20 ( Default linker script uses 24 bit memory area) there will be code/code= =20 references beyond 64K memory in the executable. Now the normal mode assu= mes=20 that the target has 64K memory and will crash if the memory access beyon= d 64K=20 is done. To solve this, the executable for normal mode must be created w= ith=20 the linker script which uses 64K memory. Permanent Solution: ------------------- 1. I feel, we should add two new targets in the GCC and Binutils for H8S=20 and H8/300H normal mode. e.g. "h8300hn" and "h8300sn".=20 Existing ".h8300h" and ".h8300s" will denote advanced mode.=20 These targets will be automatically used when -mn switch is=20 used while compiling the file. 2. For these additional modes the default linker script will be with=20 64K memory region. 3. This will ensure that every executable will contain full target=20 information including the operating mode.=20 This will need few changes in GCC and major changes in Binutils.=20 Also corresponding changes in the GDB/Simulator will have to be made. Impact: ------- 1. All existing executables (and libraries) compiled with -mn switch will=20 have to be rebuilt. The volume of such executables (or libraries ),=20 I feel, is less. This is because normal mode support just been added=20 to the H8 port of GNU. Could any one tell me if there are any others issues involved in this ?=20 What could be other possible alternative to achieve this ? Has any one tried such things before ? Regards, Shrinivas ---------------------------------------------------------------------------= -- Free download of GNUSH and GNUH8 tool chains for Hitachi's SH and H8 Series. The following site also offers free support to European customers. Read more at http://www.kpit.com/products/support.htm Latest versions of GNUSH and GNUH8 are released on October 1, 2002. ---------------------------------------------------------------------------= --