From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4044 invoked from network); 25 Jul 2023 14:08:28 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 25 Jul 2023 14:08:28 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id D1EFA42A46; Wed, 26 Jul 2023 00:08:24 +1000 (AEST) Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by minnie.tuhs.org (Postfix) with ESMTPS id 554C042A46 for ; Wed, 26 Jul 2023 00:08:15 +1000 (AEST) Received: by mail-yb1-xb34.google.com with SMTP id 3f1490d57ef6-cb19b1b9a36so6232166276.0 for ; Tue, 25 Jul 2023 07:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccc.com; s=google; t=1690294094; x=1690898894; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZclpnmzSe5tNxWLzAJPLDB+Q8tH32GM0jdJTcvbfUT4=; b=lcFUqM++rx/imZj4ZpwKBbtHO2+Yo64g2YiPHI9acXwWfX9ZkfrMf/TgbmV1p+iqY0 gsRbb/qJG4ulegFgvJink6QcWB4WLRwDSaUv8S1y3nE/zpMGDaTGNt3WraewSIOIDtNU sOTg7t+d0BHqrfN6KPBkVegNlJ8WTxGMK4cr8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690294094; x=1690898894; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZclpnmzSe5tNxWLzAJPLDB+Q8tH32GM0jdJTcvbfUT4=; b=Cwl02Glh1zKrjX7WM115L7XQHsIDpbrvsEukh9oo2doFlcQRB5Go0csisSZLTWVUSt maFFm7FSsQLdEYY41vf5mpKthWv6LfBz7Rq+8BVFyWw/OQJJqy64XSFtqFqu2tcRFu+n QAZJlDoeZAyP8diJxK907/qqQIKUPgKMvFxSujbSo2xikuM9EjaP1U362xEElaaAcxYk qd9QflRiTjxGAjCN0JlhJRNrDMcspF1qQMLnnJX/n6QGX1vcUBVXe6xrw+Wmm9y5LgpN EGlfIKJH2dUzmDstR3V3Y1uBYCuzVw3Ss7wikJCzGShq5qLpH6SbqJua8hRGMD27tIO1 elrA== X-Gm-Message-State: ABy/qLZEpx2lV9XHzORsfqiPVqI58CekzQGegN/fiRYfPdU6y8RmGuCH PIUE2ViVCnX357OY97NKOnSo9xyfs0RkAQVL1W597LiGxU95zyyt X-Google-Smtp-Source: APBJJlE3VftmVSBwO9o8y0uiRBlw/nqb2p+/nNqjF63Q8+YHWs4BD0lxIXYjlzufZrH73mEwDgJz0MbuFKl1DmIN0fM= X-Received: by 2002:a25:acdc:0:b0:d07:87b0:f2a8 with SMTP id x28-20020a25acdc000000b00d0787b0f2a8mr7864798ybd.21.1690294093685; Tue, 25 Jul 2023 07:08:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Clem Cole Date: Tue, 25 Jul 2023 10:07:37 -0400 Message-ID: To: Warren Toomey Content-Type: multipart/alternative; boundary="000000000000053dc3060150436b" Message-ID-Hash: 24CNPKRNRZVN2DUF32JX3C546UXUABP7 X-Message-ID-Hash: 24CNPKRNRZVN2DUF32JX3C546UXUABP7 X-MailFrom: clemc@ccc.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: coff@tuhs.org X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [COFF] Re: Wanted: 16-bit big-endian Unix-like environment and/or libc List-Id: Computer Old Farts Forum Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --000000000000053dc3060150436b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Warren - can not help you other than some thoughts/pointers for some next steps. 1. https://www.noicedebugger.com/ - it's not FOSS and you have to buy it. No idea how good it is. 2. OS9 was a Unix-like system for the MC6809 back in the day -- maybe look for tools for that. 3. http://www.compilers.de/vbcc.html is a full ISO C99 C compiler that is very portable and targets a number of 8-bit and 16-bit processors including the MC6809 4. WRT to the symbolic debugger, the issue will be 8/16-bit and big-endian. There were numerous ports of Mark Linton's dbx (it should = be on the 4.2 BSD - tape it was his thesis). Dbx was the predecessor to g= db and was used to make a number of MC68K debuggers such as the original on= es at Masscomp and Sun. But address space is likely to be an issue since Ma= rk wrote it for a vax originally. 5. Since the MOS6502 was so ubiquitous and it is also big-endian since its "parent" was the MC6800 (Moto developed the MC6809 as the MC6800 fol= low on, in response to it when Peddle and team left Moto to build the MOS65= 01 and MC6502). So you might look for tools for it and retarget - there ar= e numerous "C 6502" tool kits in the wild. There are simulators that I kn= ow about and often they have an embedded, but I never looked for a pure debugger. https://github.com/unoCamel/6502-Debugger claims its a debugger but I think it more of simulator. 6. I believe that https://lng.sourceforge.net/ had a debugger in it, which might be place to start - it was suppose to target a couple of processors like the 6502 7. Check out: https://en.wikipedia.org/wiki/GNO/ME GNO github sources which was a UNIX clone for the Apple-II =E1=90=A7 =E1=90=A7 =E1=90=A7 On Tue, Jul 25, 2023 at 3:44=E2=80=AFAM Warren Toomey via COFF wrote: > Hi all, I'm looking for a 16-bit big-endian Unix-like development > environment with a reasonably new C compiler and a symbolic debugger. > And/or, a libc with source code suitable for a 16-bit big-endian > environment. > > Rationale: I've designed and built a 6809 single board computer (SBC) wit= h > 8K ROM, 2K I/O space for a UART and block storage, and 56K RAM. It's a > big-endian platform and the C compiler has 16-bit ints by default. I've > been able to take the filesystem code from XV6 and get it to fit into > the ROM with a hundred bytes spare. The available Unix-like system calls > are: > > dup, read, write, close, fstat, link, > unlink, open, mkdir, chdir, exit, spawn > > and the spawn is like exec(). There is no fork() and no multitasking. > I've got many of the existing XV6 userland programs to run along with a > small shell that can do basic redirection. > > Now I'm trying to bring up a libc on the platform. I'm currently trying > the libc from FUZIX but I'm not wedded to it, so alternative libc > recommendations are most welcome. > > There's no debugging environment on this SBC. I do have a simulator that > matches the hardware, but I can only breakpoint at addresses and > single-step > instructions. It makes debugging pretty tedious! So I was thinking of > using an existing Unix-like platform to bring up the libc. That way, if > there are bugs, I can use an existing symbolic debugger on the platform. > > I could use 2.11BSD as the dev platform but it's little-endian; I'm worri= ed > that there might be endian issues that stop me finding bugs that will ari= se > on the 16-bit 6809 platform. > > As for which libc: I looked at the 2.11BSD libc/include and there's so > much stuff I don't need (networking etc.) that it's hard to winnow down > to just what I need. The FUZIX libc looks good. I just came across Elks > and that might be a possible alternative. Are there others to consider? > > Anyway, thanks in advance for your suggestions. > > Cheers, Warren > > References: > > XV6: https://github.com/mit-pdos/xv6-public > FUXIZ: https://github.com/EtchedPixels/FUZIX/tree/master/Library > Elks: https://github.com/jbruchon/elks/tree/master/libc > --000000000000053dc3060150436b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Warren - can not help you other than some thoughts/poin= ters for some next steps.

  1. https://www.noicedebugger.com/= - it's not FOSS and you=C2=A0have to buy it.=C2=A0 No idea how good it= is.
  2. OS9 was a Unix-like system for the MC6809 back in the day -- m= aybe look for tools for that.
  3. http://www.compilers.de/vbcc.html is a full = ISO C99 C compiler that is very portable and targets a number of 8-bit and = 16-bit processors including the MC6809
  4. WRT to the symbolic debu= gger, the issue will be 8/16-bit and big-endian.=C2=A0 =C2=A0There were num= erous=C2=A0ports of Mark Linton's dbx (it should be on the 4.2 BSD - ta= pe it was his thesis).=C2=A0 Dbx=C2=A0 was the predecessor=C2=A0to gdb and = was used to make a number of MC68K debuggers such as the=C2=A0original=C2= =A0ones at Masscomp and Sun. But address space is likely to be an issue sin= ce Mark wrote it for a vax originally.
  5. Since the MOS6502 was so= ubiquitous and it is also big-endian since its=C2=A0"parent" was= the MC6800 (Moto developed the MC6809 as the MC6800 follow on, in response= to it when Peddle and team left Moto to build=C2=A0 the MOS6501 and MC6502= ).=C2=A0 So you might look for tools for it and retarget - there are numero= us=C2=A0"C 6502" tool kits in the wild.=C2=A0 There are simulator= s that I know about and often they have an embedded, but I never looked for= a pure debugger.=C2=A0 =C2=A0=C2=A0https://github.com/unoCamel/6502-Debugger<= /a> claims its a debugger but I think it more of simulator.=C2=A0
  6. I= believe that=C2=A0https://lng.sourceforge.net/ had a debugger in it, which might be pl= ace to start - it was suppose to target a couple of processors like the 650= 2
  7. Check out:=C2=A0https://en.wikipedia.org/wiki/GNO/ME GNO github sources=C2=A0which wa= s a UNIX clone for the Apple-II
3D""=E1=90=A7
3D""=E1=90=A7
3D""=E1=90=A7

On Tue, Jul 25, 2023 at 3:4= 4=E2=80=AFAM Warren Toomey via COFF <coff@tuhs.org> wrote:
Hi all, I'm looking for a 16-bit big-endia= n Unix-like development
environment with a reasonably new C compiler and a symbolic debugger.
And/or, a libc with source code suitable for a 16-bit big-endian environmen= t.

Rationale: I've designed and built a 6809 single board computer (SBC) w= ith
8K ROM, 2K I/O space for a UART and block storage, and 56K RAM. It's a<= br> big-endian platform and the C compiler has 16-bit ints by default. I've=
been able to take the filesystem code from XV6 and get it to fit into
the ROM with a hundred bytes spare. The available Unix-like system calls ar= e:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 dup, read, write, close, fstat, link,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 unlink, open, mkdir, chdir, exit, spawn

and the spawn is like exec(). There is no fork() and no multitasking.
I've got many of the existing XV6 userland programs to run along with a=
small shell that can do basic redirection.

Now I'm trying to bring up a libc on the platform. I'm currently tr= ying
the libc from FUZIX but I'm not wedded to it, so alternative libc
recommendations are most welcome.

There's no debugging environment on this SBC. I do have a simulator tha= t
matches the hardware, but I can only breakpoint at addresses and single-ste= p
instructions. It makes debugging pretty tedious! So I was thinking of
using an existing Unix-like platform to bring up the libc. That way, if
there are bugs, I can use an existing symbolic debugger on the platform.
I could use 2.11BSD as the dev platform but it's little-endian; I'm= worried
that there might be endian issues that stop me finding bugs that will arise=
on the 16-bit 6809 platform.

As for which libc: I looked at the 2.11BSD libc/include and there's so<= br> much stuff I don't need (networking etc.) that it's hard to winnow = down
to just what I need. The FUZIX libc looks good. I just came across Elks
and that might be a possible alternative. Are there others to consider?

Anyway, thanks in advance for your suggestions.

Cheers, Warren

References:

XV6:=C2=A0 =C2=A0https://github.com/mit-pdos/xv6-public FUXIZ: https://github.com/EtchedPixels/FUZI= X/tree/master/Library
Elks:=C2=A0 https://github.com/jbruchon/elks/tree/m= aster/libc
--000000000000053dc3060150436b--