A fork of clang/llvm is being maintained at
https://github.com/jacobly0/llvm-project. I further forked that to switch
to targeting binutils (by just changing the emitted assembly syntax a
little), which added Z80-family support last year some time. The llvm fork
isn't perfect - it produces fairly inefficient and occasionally bizarre
code, and has had a few errors in code generation that the fork maintainer
has been fast to fix.

I'm not sure how the Zilog tools manage debugging symbols but I would be
very surprised if it's from ELF objects with DWARF attributes given the
object files in the ZDS distribution appear to be a proprietary derivative
of COFF. I'll go out on a limb and say it probably wouldn't work, at least
not as far as debugging at the C level, but since the ZDI subsystem doesn't
care what compiled the code you should be able to debug machine code with
the ZPAK tools.

I control the ZDI pins via my USB serial IC, but I've built no support for
debug symbols yet. I haven't even tried a debug build.

I modified the build process to add an option to switch toolchains but I've
wound up needing to duplicate all the assembly files and slightly change
their syntax. I can put up a merge request to see if my changes still allow
the ZDS-II build to proceed, so I'll do that in the next few days.

-- 
Byron

On Fri, Feb 12, 2021 at 9:19 AM Gregory Nutt <spudan...@gmail.com> wrote:

> I developed the ez80 and used it in several projects.  I was working on
> a port when the quarantine lock-down made it impossible to get parts
> here in Costa Rica, at least temporarily.  I have not gotten back to
> working with those ez80 boards for a variety of reasons.
>
> I really like the ez80's.. lots of retro feel but faster updated so that
> you are not stuck in a 16-bit address space.
>
> I think it is important to continue supporting the official ZiLOG ZDS-II
> toolchains, however it would be great to have a clang/llvm alternative.
> I was unaware of such a beast.  Does it integrate with the ZiLOG tools
> for debugger support?
>
> There are lots of problems with the ZDS-II tools, like C89 and sometimes
> unpredictable compiler behavior.  But, again, I think that the official
> ZiLOG tools should be supported.  Other than additional complexity, I
> don't think that there is any reason that we could not support both with
> the appropriate options in arch/arm/src/ez80/Toolchain.defs and lots of
> changes to the build files.
>
> If you want to attempt such a thing, I could help out at least with some
> backward compatibility testing.
>
> Greg
>
> On 2/11/2021 5:07 PM, Byron Ellacott wrote:
> > Hi all,
> >
> > I'm wondering if there's anyone building NuttX for the eZ80. I've been
> > working on a build of NuttX for a custom eZ80-based board with reasonable
> > success so far, but I've made a pretty hefty change: I've switched from
> the
> > ZDS-II Windows-only toolchain to an unstable fork of clang/llvm targeting
> > the eZ80.
> >
> > If there's little interest in the eZ80, I'll keep my changes on my fork
> > rather than attempting to package up the toolchain. If there's no-one
> > building with the ZDS-II, I don't think I can reasonably offer merge
> > requests either, since I've no way to tell if the problems I've
> encountered
> > are due to my toolchain or not.
> >
> > Thanks,
> >    Byron
> >
>

Reply via email to