Skip to content
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

include structure #7

Open
cpldcpu opened this issue Sep 6, 2020 · 1 comment
Open

include structure #7

cpldcpu opened this issue Sep 6, 2020 · 1 comment

Comments

@cpldcpu
Copy link
Member

cpldcpu commented Sep 6, 2020

I think the includes should be structured in a way where they clearly separate system wide includes and local ones.

Right now there are some files like "millis.h" that are in the include root directory and are included with include "". If these are to be used system wide, I would suggest to put them into pdk/ or pdk/util. Otherwise they should reside within the example code directory.

@serisman
Copy link
Collaborator

serisman commented Oct 5, 2020

I'll have to think about this a bit more.

I don't think they should go into pdk/ repo because they are more of a minimal framework than device definitions, and we aren't suggesting that they get included into SDCC.

Also, they need to be refactored so there isn't 'code' in .h files. This probably means a lib/ folder with some changes to the Makefiles in order to compile and link each independent method as their own .a (lib) files. This will allow SDCC to only include methods when they are actually used. Currently there is an issue where SDCC will include the methods within the .h files multiple times (once per .c file that references a .h file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants