New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create new z88dk/z88dk-libraries repository to hold third party library code for use with z88dk #386

Open
aralbrec opened this Issue Sep 17, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@aralbrec
Member

aralbrec commented Sep 17, 2017

Some discussion in #337 : #337 (comment)

The specific examples given are ChaN's FatFS, AVR time.h, and Free RTOS. We may not want to integrate these directly for reasons of compile time (each time the z80 library is built) / licensing / awaiting customization for z88dk but libraries like these could be useful for users.

Maybe what we can do is create a new repo to hold code like this so that it is available from a convenient location with all the necessary instructions for use and building using z88dk. We can use the new z88dk-lib utlity to install them for a target after building.

Thoughts?

@aralbrec aralbrec changed the title from create new z88dk/z88dk-libraries to hold third library code for use with z88dk to create new z88dk/z88dk-libraries repository to hold third library code for use with z88dk Sep 17, 2017

@aralbrec aralbrec changed the title from create new z88dk/z88dk-libraries repository to hold third library code for use with z88dk to create new z88dk/z88dk-libraries repository to hold third party library code for use with z88dk Sep 17, 2017

@feilipu

This comment has been minimized.

Show comment
Hide comment
@feilipu

feilipu Sep 17, 2017

Contributor

With regard to this third party library process, I have created an example library, and pushed it up to a repository. For want of a better name, I called it z88dk-libraries/time.

This is a fairly extensive time functions library supposedly close to fulfilling the ISO/IEC 9899 (C90) requirements.

I've been using it for some years in the avr-libc for AVR ATmega machines, and it seems to work pretty well.

The only change for z80 is the use of the intrinsic division and modulus z88dk newlib library functions, rather than special functions provided by the avr-libc.

The compiled libraries are organised so that the z88dk-lib tool works.
The sccz80 compiler has trouble with some of the function calls.
I've not fixed this, so it is sdcc only at this stage.

I consider this library fairly general, as it is usable by any Z80 machine that can generate a 1 second system_tick to increment the time_t _system_time variable. For Z180 machines, the PRT makes an ideal system_tick solution.

Happy for this to kick off a thought process. No requirement for this repository to remain in use, post resolution.

Contributor

feilipu commented Sep 17, 2017

With regard to this third party library process, I have created an example library, and pushed it up to a repository. For want of a better name, I called it z88dk-libraries/time.

This is a fairly extensive time functions library supposedly close to fulfilling the ISO/IEC 9899 (C90) requirements.

I've been using it for some years in the avr-libc for AVR ATmega machines, and it seems to work pretty well.

The only change for z80 is the use of the intrinsic division and modulus z88dk newlib library functions, rather than special functions provided by the avr-libc.

The compiled libraries are organised so that the z88dk-lib tool works.
The sccz80 compiler has trouble with some of the function calls.
I've not fixed this, so it is sdcc only at this stage.

I consider this library fairly general, as it is usable by any Z80 machine that can generate a 1 second system_tick to increment the time_t _system_time variable. For Z180 machines, the PRT makes an ideal system_tick solution.

Happy for this to kick off a thought process. No requirement for this repository to remain in use, post resolution.

@feilipu

This comment has been minimized.

Show comment
Hide comment
@feilipu

feilipu Sep 18, 2017

Contributor

Added the ChaN FatFs code. Still clunky, because it requires multiple headers, but I might integrate them into ff.h to save trouble.

I had a go at breaking the public functions out into their own files, which allows the library to be configured "maximally", so that the user doesn't need to reconfigure and recompile for every different need.

The private functions I've left in one file. It is a can of spaghetti to untangle it all.
May be, one day, I'll untangle it all.

Messy work. I hope I've not broken anything.
Update: seems nothing is obviously broken.

Contributor

feilipu commented Sep 18, 2017

Added the ChaN FatFs code. Still clunky, because it requires multiple headers, but I might integrate them into ff.h to save trouble.

I had a go at breaking the public functions out into their own files, which allows the library to be configured "maximally", so that the user doesn't need to reconfigure and recompile for every different need.

The private functions I've left in one file. It is a can of spaghetti to untangle it all.
May be, one day, I'll untangle it all.

Messy work. I hope I've not broken anything.
Update: seems nothing is obviously broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment