racemaniac wrote:And what's the difference between the cores that are being discussed here? I've been playing around a bit in the maple core for what i'm currently doing with driving the i2c hardware directly. Why would we want to move to a different core?
Oh, I'm not discussing moving
to a different core; I'm stating that Adafruit copied Roger's github core which Roger copied from Bob Cumming which Bob copied from Leaflabs which Leaflabs seems to have copied from Perry Hung. In this context, "copying" is actually branching or forking
the code. It also seems that Adafruit put in some effort to rework some of the core files - enhancements? Unknown since she never offered Roger a "pull request" so that issues that were resolved could be incorporated (after testing) with our current base. Of course, since this is open source code, there is no requirement to offer a pull, but generally it is considered a nice thing to do; assuming there were fixes. The changes made may have been strictly to accommodate the specific F2 chip that is being utilized in her design.
When core files are written as classes, the end-coder or library writer can inherit
the class in their code and modify it... adding or subtracting as needed. When code is written as functions, then the user cannot inherit, but they can completely rewrite a function as they need that function to work.
On my Linux box, the I2C core files are located in this path:
Code: Select all
and I would include that core code by doing #include <i2c.h> in my Arduino sketch.
What is probably causing some confusion here is that some of the core code is in the libmaple as shown above and some are also located in
Code: Select all
Leaflabs split these files because (IMO) they wanted to completely separate the Maple effort from previous work done on the Arduino AVR, some of which is found in the second (higher level) directory reference. But, IMO, core files are core files and subordinate directory structures are just a convenience.
As of March 2015, the LeafLabs Maple line and the libmaple library are end-of-life and no longer supported by LeafLabs. The design files for Maple and Maple Mini will remain available on GitHub, under a CC-BY-SA 2.0 license, for anyone who wants to recreate or reimagine these boards. libmaple will also stay on GitHub, and we will continue to take community patches.
but i'm starting to wonder what you're doing with all those other cores, and what the goal is (and what to expect in the near future, will you break my projects when a new core is used XD).
Maybe! But that is why there are two branches (actually more, but 2 normally used) in Roger's github account: Master
and we want all newbies to be on the Master branch and those that are proofing and testing should be on the Development branch. Every once in a while, Roger will announce a merge of the two. So, when someone who has forked Roger's STM32 has made important enhancements or fixes, they send Roger a pull-request which Roger will analyze and if it looks appropriate, then he will merge it into the Development branch and announce that. If you keep pulling the Development branch, then you can regression test and report back, either through Github directly (preferred) or on the forum.
Now, most importantly, part of anySDLC
is to have your own set of test-cases. I have a basic set that I donated which is on github:https://github.com/rogerclarkmelbourne/Arduino_STM32/tree/master/examples/MrBrunetteExamples
and I compile each everytime I update my STM32 files. This is quiet simple stuff, so nothing should break. I also have projects which I have published here
that I will recompile just to be certain nothing has broken. As you are a seasoned programmer, I'm not going to embarrass myself about SDLC; I mentioned it here for completeness.