Git Product home page Git Product logo

mcudude_corefiles's People

Contributors

cburstedde avatar dritanium avatar jackjan4 avatar mcudude avatar per1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mcudude_corefiles's Issues

Replace macros with "proper" functions

The macros below should be replaced by proper functions, or perhaps template functions for ultimate flexibility.

#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define abs(x) ((x)>0?(x):-(x))
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
#define round(x)     ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
#define sq(x) ((x)*(x))

More info about why these macros are terrible and should never have been added in the first place can be found here:
https://forum.arduino.cc/index.php?topic=84364.0

A few solutions are provided here:
arduino/Arduino#2069

@SpenceKonde this is relevant for your cores as well

Update CI script?

Maybe we should consider updating the Travis CI script? Right now the current build is failing (caused by a missing directory it seems), and testing for MiniCore is not implemented.

How on earth do I update this subtree?

I've committed a change to Tone.cpp, and I'm trying to update MCUdude_corefiles (which is a subtree within MegaCore) without luck. I wrote a simple guide for myself when I worked with this half a year ago, but it somewhat fails. Do you remember how this was done @per1234?

Guide:

# MegaCore must be up to date/identical to the one upstream 
(cd into MegaCore folder)

# Add subtree (not sure if this should be done every time?)
$ git remote add -f avr/cores/MCUdude_corefiles https://github.com/MCUdude/MCUdude_corefiles.git

# Fetch
$ git fetch https://github.com/MCUdude/MCUdude_corefiles.git master # --squash
$ git subtree add --prefix avr/cores/MCUdude_corefiles https://github.com/MCUdude/MCUdude_corefiles.git master --squash

# Update subtree
$ git subtree pull --prefix avr/cores/MCUdude_corefiles https://github.com/MCUdude/MCUdude_corefiles.git master --squash

Actual output:

$ git remote add -f avr/cores/MCUdude_corefiles https://github.com/MCUdude/MCUdude_corefiles.git
fatal: remote avr/cores/MCUdude_corefiles already exists.

$ git fetch https://github.com/MCUdude/MCUdude_corefiles.git master # --squash
From https://github.com/MCUdude/MCUdude_corefiles
 * branch            master     -> FETCH_HEAD

$ git subtree add --prefix avr/cores/MCUdude_corefiles https://github.com/MCUdude/MCUdude_corefiles.git master --squash
prefix 'avr/cores/MCUdude_corefiles' already exists.

$ git subtree pull --prefix avr/cores/MCUdude_corefiles https://github.com/MCUdude/MCUdude_corefiles.git master --squash
From https://github.com/MCUdude/MCUdude_corefiles
 * branch            master     -> FETCH_HEAD
Can't squash-merge: 'avr/cores/MCUdude_corefiles' was never added.

Travis fails

@per1234 would you look into this? It seems like its having problems downloading all the different IDE versions.

gitlab CI

Hello @MCUdude and @per1234,
I would like to use arduino-ci-script with gitlab-ci, is it possible? How can I do?
Thank for reply

Accurate delayMicroseconds for 14.7456 MHz, 11.0592 MHz, 7.3728 MHz, 3.6864 MHz and 1.8432 MHz

I've just pushed a commit where I've added accurate micros for these clock frequencies. However, I'm not that good with cycle accurate timing that I feel qualified for this job.

I'm sorry to bother you again @Jackjan4, but you did such a wonderful job with the other clock frequencies a few months ๐Ÿฅ‡ I fully understand if you don't have time or simply don't want to spend time on this, but if you want to contribute I'll promise to do all the testing with my signal generator as clock source.

If this turns out to be a success I'm sure ATTinyCore could benefit from this code as well, since it's missing accurate delayMicroseconds for these frequencies too.

Thanks!

Unified tab spacing and line feed

I think this would be the the most important repo to implement tab spacing and line feed checks. Most of the code in this repo is untouched, and I suspect it might contain lots of [tabs] and [CRs].

Compatibility of delayMicroseconds

Arduino specifies a maximum input value to delayMicroseconds of16383. For several of the functions here, the limit is lower since we multiply by numbers greater than 4 (such as 4.125, 5, 6). These roll over, which produces spurious delays.

It would be relatively easy to fix this by adding NOPs to the busy loop and calling it less times, and I wouldn't mind looking into it. It would mean another test cycle for most of the higher clock frequencies though.

I also have three more exact frequencies, namely 16.5 MHz (favorite for overclocking, and contrary to 16 Mhz millis never jumps by 2), 10 MHz (wouldn't have done it but there were comments that needed fixing) and 6 MHz (there is currently a large gap between 7.37 and 4 MHz). Might do this at the same time so we only have to test everything once.

Radical suggestion

Currently you have minicore, mightycore, majorcore and megacore...
Each of these has one entry in the tools -> board menu for each part...

I have a bold and radical suggestion (and certainly one that I would expect you to think long and hard about...

Why not combine them all into one core? It would cover all the classic megaAVR parts. Replace the board menu entries with the families, ie
"ATmega 328/168/88/48"
"ATmega 1284/644/324/32/16"
and then a tools submenu to choose which part after selecting that board....

That way, people would have to install fewer cores, and there would be less clutter in the tools menu, and you'd only need to maintain one package.

I have another idea for reducing clutter in menus from our board packages too... need to to a bit more research first though..... (and yes, I AM getting sick of the way that my menus are now several screens long, what gave it away?)

But yeah, it's something to think about...

Atmega8a-PU (DIP-28) @ internal 8Mhz issue

New Bitmap Image

I am working on a project with Atemga8a-pu (DIP-28) controller.
I want to use all the IO pins including Tx and RX pins and without external crystal oscillator,
so I decided to program the controller using ISP method and with internal @ 8Mhz.
The test program is working fine with 16Mhz external crystal and not working with 8 Mhz internal.

please suggest...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.