z88dk forums

z80 Development Kit

You are not logged in.

#1 2017-08-14 10:37:10

Rurigan
New member
Registered: 2017-08-14
Posts: 6

[z88dk-dev] make

Hi there

I am trying to make a new target for the compiler. I ran into a trivial problem when trying to rebuild the clib.

How do you handle the RM command in the Makefile when you run it on a Windows platform.

Regards



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Offline

 

#2 2017-08-14 13:08:33

pscust
Well known member
Registered: 2011-06-23
Posts: 194

Re: [z88dk-dev] make

Usually we run in a Linux-type environment in Windows, such as cygwin
or mingw32.

On 8/14/17, Rurigan (sa19620821@...) <lists@...> wrote:

Hi there

I am trying to make a new target for the compiler. I ran into a trivial
problem when trying to rebuild the clib.

How do you handle the RM command in the Makefile when you run it on a
Windows platform.

Regards



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Offline

 

#3 2017-08-14 15:25:55

alvin
Administrator
Registered: 2007-07-16
Posts: 1932

Re: [z88dk-dev] make

Usually we run in a Linux-type environment in Windows, such as cygwin
or mingw32.

On 8/14/17, Rurigan (sa19620821@...) <lists@...> wrote:

Hi there

I am trying to make a new target for the compiler. I ran into a trivial
problem when trying to rebuild the clib.

It will also depend on which clib you are adding the target to.

If it's the classic lib rooted in z88dk/libsrc that you are looking at, it will have to be done with cygwin, msys, etc.

If it's the newlib rooted in z88dk/libsrc/_DEVELOPMENT then there are two "makefiles" maintained.  One is "Makefile" for Linux&co and the other is "Winmake.bat" for windows.  Adding a target means adding it to both these files.  Then windows can build the libraries by running "Winmake all" or a specific target's library by running "Winmake zx" (for example).  "Winmake" on its own will list the available targets.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Offline

 

#4 2017-08-14 16:21:14

Rurigan
New member
Registered: 2017-08-14
Posts: 6

Re: [z88dk-dev] make

Usually we run in a Linux-type environment in Windows, such as cygwin
or mingw32.

On 8/14/17, Rurigan (sa19620821@...) <lists@...> wrote:

Hi there

I am trying to make a new target for the compiler. I ran into a trivial
problem when trying to rebuild the clib.

It will also depend on which clib you are adding the target to.

If it's the classic lib rooted in z88dk/libsrc that you are looking at, it will have to be done with cygwin, msys, etc.

If it's the newlib rooted in z88dk/libsrc/_DEVELOPMENT then there are two "makefiles" maintained.  One is "Makefile" for Linux&co and the other is "Winmake.bat" for windows.  Adding a target means adding it to both these files.  Then windows can build the libraries by running "Winmake all" or a specific target's library by running "Winmake zx" (for example).  "Winmake" on its own will list the available targets.

I will throw it in the development then. Actually it is development any way. I am not keen on switching to Linux at the moment even though I have two installations running (one on my old laptop and the on on my Pi. I am working on a Z80 design for a FPGA. All other software I am using is running on window.

Additional could you point me to some description of how the memory layout is working with the compiler. WHat I have been seeing so far don't give any clear picture. It is probably simple when you get into it. Any other hints is welcome and highly appreciated.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Offline

 

#5 2017-08-14 16:32:36

Rurigan
New member
Registered: 2017-08-14
Posts: 6

Re: [z88dk-dev] make

Well well...

To a look at the development. I don't find a usable solution for me. It is development for a new version of the whole library as I see it.

I think I just redefine the RM macro so it will run with the gnu make for windows i use.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Offline

 

#6 2017-08-14 17:23:56

Rurigan
New member
Registered: 2017-08-14
Posts: 6

Re: [z88dk-dev] make

For get the RM problem. I installed Cygwin and it runs fine. That is the RM command works but of course it can't find the assembler and other tools. I guess I have to ad the search path. Well I will get to it.

But I am still very interested in some hints on the memory setup for the compiler

Thanks for pointing me to Cygwin seems to be a good solution.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Offline

 

#7 2017-08-14 17:43:34

alvin
Administrator
Registered: 2007-07-16
Posts: 1932

Re: [z88dk-dev] make

To a look at the development. I don't find a usable solution for me. It is development for a new version of the whole library as I see it.

It's a second library that exists in parallel with the classic.  It's being done as fresh re-implementation to achieve a subset of C11 and to clear out some of the cruft that always happens in a long existing project.  It's in active use, it should not be considered in development, although of course nothing is ever "not in development" big_smile  and there are a few things that still need doing.

Each target gets its own directory in z88dk/libsrc/_DEVELOPMENT/target and a good place to look for a generic z80 system is the generic z80 target in that directory.  What makes the generic z80 target different from the others is that it has no hardware specific functionality in it whereas the others may have drivers for display, input, etc and specific code for audio and video.

Some technical information on the z80 target for newlib:
https://www.z88dk.org/wiki/doku.php?id= … t_embedded

The memory map you define although you can just use what z88dk supplies as it will be perfectly adequate for any 64k system.  New sections would have to be defined for bankswitched systems.  The linker will not automatically generate programs that bankswitch but the tools will easily place things in memory where you tell them to with the actual banking under program responsibility.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Offline

 

#8 2017-08-14 18:04:41

Rurigan
New member
Registered: 2017-08-14
Posts: 6

Re: [z88dk-dev] make

great thank you. big_smile



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Offline

 

#9 2017-08-14 18:15:29

alvin
Administrator
Registered: 2007-07-16
Posts: 1932

Re: [z88dk-dev] make

great thank you. big_smile

Np, with cygwin you have a choice.

Setting up requires setting PATH and defining ZCCCFG:
https://www.z88dk.org/wiki/doku.php?id= … stallation

But make sure you are using a current version - there have been more than a thousand commits since the sourceforge release in January.  Some of those things are bugfixes.

For windows (and mac osx) you can get the nightly build which will include everything and only requires setting the PATH & ZCCCFG:
http://nightly.z88dk.org/

For everything else and cygwin, you can use github to clone and build it all:
https://github.com/z88dk/z88dk

Then updating is a matter of either git update + rebuild or erasing an old nightly install and replacing with a new one.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Offline

 

#10 2017-08-14 18:44:46

Rurigan
New member
Registered: 2017-08-14
Posts: 6

Re: [z88dk-dev] make

great thank you. big_smile

Np, with cygwin you have a choice.

Setting up requires setting PATH and defining ZCCCFG:
https://www.z88dk.org/wiki/doku.php?id= … stallation

But make sure you are using a current version - there have been more than a thousand commits since the sourceforge release in January.  Some of those things are bugfixes.

For windows (and mac osx) you can get the nightly build which will include everything and only requires setting the PATH & ZCCCFG:
http://nightly.z88dk.org/

For everything else and cygwin, you can use github to clone and build it all:
https://github.com/z88dk/z88dk

Then updating is a matter of either git update + rebuild or erasing an old nightly install and replacing with a new one.

I forked the repository and prepared it exactly as described. I have had no problems doing the build with VisualStudio.

Any way. I just read through the documentation on the embedded target you pointed me to. It seems like it is so flexible that I can use that unchanged. At least for now. So I stick to that and use my time on the FPGA design I am trying to build (using SystemVerilog and this https://opencores.org/project,a-z80)

Thank you again.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Offline

 

#11 2017-08-14 20:23:31

alvin
Administrator
Registered: 2007-07-16
Posts: 1932

Re: [z88dk-dev] make

I forked the repository and prepared it exactly as described. I have had no problems doing the build with VisualStudio.

Awesome.  One C compiler is maintained outside of z88dk (zsdcc and its preprocessor zsdcpp).  This is because it originates in the sdcc project and has not yet been brought in as a git submodule.  You can get the windows binaries from the nightly build - just copy them to z88dk/bin.  For windows, m4 is something else added that is external to z88dk and it too is in the nightly build bin.  So for windows, it's better to prime your z88dk/bin directory with binaries from the nightly build and then go about your business building with vs.

Any way. I just read through the documentation on the embedded target you pointed me to. It seems like it is so flexible that I can use that unchanged. At least for now. So I stick to that and use my time on the FPGA design I am trying to build (using SystemVerilog and this https://opencores.org/project,a-z80)

Nice, going down to the gate level would have taken some work!

Yes, the generic z80 target is meant to work with any z80 system minus hw specific things.  If you need to modify its behaviour via pragmas, the best route is to store those in a separate zpragma.inc file and then just include that on the compile line by adding "-pragma-include:zpragma.inc"



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson