Comments (3)
Ok, there is a one but it's pic14/pic16regs.h and this pulls the relevant file in via the -p command line (i.e -p12f629). Your generic loading of the pic16regs.h wont work.
from sdcc-examples.
Hi,
It works for me so it might be related to a different SDCC version?
In the blink_led.c
, modifying the Makefile
to use PROC=12f629
:
#include <pic14regs.h>
loads sdcc/non-free/include/pic14/pic14regs.h
which loads sdcc/non-free/include/pic14/pic12f629.h
. OK.
If I modify blink_led.c
to #include <pic16regs.h>
instead, it works as well:
#include <pic16regs.h>
loads sdcc/include/pic14/pic16regs.h
which loads sdcc/non-free/include/pic14/pic12f629.h
. OK.
I didn't know about pic16regs.h
, I had always used pic14regs.h
. I'll try to understand the difference but both work for me.
Can you indicate which SDCC version you're using?
from sdcc-examples.
Something of particular interest here is that pic16regs.h is not located within the non-free section -- I expect that using this header allows for using free support when it exists and falls back to non-free if it doesn't (or errors more usefully if non-free isn't available, maybe??)
The pic14regs.h is a rather interesting dynamic hack that essentially uses the preprocessor to "build itself" based on all of the files that are in the pic14/ directory. So although it may not look like it works, it does work. That said, having it spelled out in pic16regs.h looks to be safer and/or easier to follow, though I can't comment as to why it's called pic16regs.h given it is all pic14 chips, unless the overarching idea here is to make building 14bit and 16bit hex possible from the same C code?
from sdcc-examples.
Related Issues (3)
- config words : && instead of & HOT 1
- Relocation "_cinit" HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdcc-examples.