Skip to content

Allow building outside of arduino environments #23

Closed

Description

@focalintent

For example, either with avr-g++ or avr-studio directly. This will require removing reliance on the arduino headers even existing (or, at the very least, careful checks around code for environments where the arudino headers don't exist).

Activity

  1. mYreme commented on Feb 6, 2014

    @mYreme

    Thats the reason why I cant get it to work on my ATmega32u2 as its pins are not defined.
    Impossible to compile via avr-g++ at the moment

  2. sjunnesson commented on Feb 16, 2014

    @sjunnesson

    I second this. Would make it much easier to port to things like the Spark Core for example.

  3. focalintent commented on Feb 16, 2014

    @focalintent
    ContributorAuthor

    The spark core isn't an example of this, surprisingly enough. It is effectively a cloud hosted arduino environment, it supports the wiring libraries that are among the things I need to remove reliance on to be able to build outside the arduino universe.

    There's two problems with spark core support. The first, which I have started working on, is the fact that the spark core is a different arm chip than either the due or the teensy 3 and I have to completely redo how I do accelerated pin access as well as direct hardware SPI access. This mostly involves time with the data sheet and a bunch of working/testing/tweaking.

    The bigger problem with spark core support that I haven't tackled yet is that it doesn't have a good mechanism for supporting third party libraries - the "just paste the header and cpp files into your code" doesn't work for multiple thousands of lines of code spread out over nearly two dozen files. I will tackle that issue (which will likely mean asking the spark core folks to host the library) once I get stuff running on the spark core at all.

  4. sjunnesson commented on Feb 16, 2014

    @sjunnesson

    I know about the issue with adding external libraries to the Spark Core and that is being worked on to find a solution. The latest I heard was that they were thinking of tying Github into it so that you can add your own repositories to be compiled through their web IDE. In the meantime I think most people build locally and then you can add libraries the normal way. So if that was possible that would be a great addition.

  5. focalintent commented on Feb 16, 2014

    @focalintent
    ContributorAuthor

    For reference, there's already an issue for tracking building for the spark core - #22

  6. gromain commented on Mar 19, 2014

    @gromain
    Contributor

    Just as I put on the G+ community, and for the record here:
    I think I managed to get the lib to compile in AVR Studio, I still have to run a sample code just to be sure.
    The solution might be as simple as just adding an #include <Arduino.h> inside the FastLED.h file.
    Maybe it should be wrapped in something like this:

    #if (ARDUINO >= 100)
       #include <Arduino.h>
    #endif
    

    Just to make sure we don't try to include the arduino.h file while not actually using an arduino!

    If you want, I can put these changes directly and send a pull request.

  7. added this to the Future backlog milestone on Apr 17, 2014
  8. self-assigned this
    on Apr 18, 2014
  9. focalintent commented on Sep 25, 2014

    @focalintent
    ContributorAuthor

    I had to do this for a contract project, and will be pulling that work over to 2.2.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions