GithubHelp home page GithubHelp logo

lancaster-university / codal Goto Github PK

View Code? Open in Web Editor NEW
38.0 38.0 28.0 1.42 MB

The build system for Component Oriented Device Abstraction Layer (CODAL) devices.

Home Page: https://lancaster-university.github.io/codal/

License: MIT License

CMake 29.11% JavaScript 2.68% Python 67.86% C 0.35%

codal's People

Contributors

carlosperate avatar finneyj avatar jamesadevine avatar johnvidler avatar microbit-carlos avatar mmoskal avatar nedseb avatar pelikhan avatar ridajichi avatar tballmsft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codal's Issues

ATMEGA328P_ARDUINO_UNO: ARM assembler error

I'm trying to get the ATMEGA328P_ARDUINO_UNO target compiling on a mac.
I've got the latest Xcode CLI tools, but I'm running into the following issue:

-- The ASM compiler identification is AppleClang
-- Didn't find assembler
CMake Error at CMakeLists.txt:31 (enable_language):
  No CMAKE_ASM_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/Users/sam/pxt-arduino-uno/libs/blocksprj/built/codal/build/CMakeFiles/CMakeOutput.log".

Any ideas?

add @tannewt

hiya, can the manger please add tannewt (scott shawcroft) to this repo? he's working at adafruit on samd circuitplayground support and can help with and be helped by access :)
https://github.com/tannewt

Missing patches from microbit-v2-samples

I'll create a list here of missing patches from https://github.com/lancaster-university/microbit-v2-sample that might require some discussion before merging them here:

partial rebuilding

If I execute python build.py immediately after itself, I would have expected a much faster build time. It seems to be rebuilding all the files all over again.

VSCode support in generated layout

If you drop a .vscode/tasks.json file with the following content, a user can simply do Ctrl+Shift+B to build in VS Code.

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "command": "python build.py",
            "problemMatcher": [
                "$msCompile"
            ]
        }
    ]
}

rethink error codes/panics

From @finneyj :

Feels like we need a bit of a precedent on when we use fail-fast techniques like this and when we try to be tolerant and NOP etc to keep kids' code running... hmmm.....
If we go down the fail-fast route, maybe we should look at more specific panic codes, and make better use of DMESG
to provide feedback... thoughts?

The way I look at it, is that if we or some other C++ package writer makes a mistake, then it should be panic. Otherwise, we get issues that are difficult to debug. This includes situations when we run out of memory while allocating system resources, or we run out of component IDs. Maybe we can make this optional - i.e., have a macro PANIC(code, "message") that can be compiled to nothing.

If user supplies values out of range we should either ignore or clamp (i.e., IMHO analogWrite(1500) should be treated as analogWrite(1023)) - this is under assumption that it's easier to debug for the user if the code does nothing rather than crashes. This is especially true for stuff accessible from blocks.

This is in line with JavaScript semantics - i.e., undefined / 7 is NaN, some_array[100000] is undefined etc. One place where JavaScript throws is method call on null. But I don't think we want to deviate from JS semantics here.

The distinction between error in C++ and error in user code is of course up to a specific runtime, but I think it will be fairly clear in most cases.

CC @pelikhan @tballmsft @abchatra @MicrosoftSam @riknoll

Slow down of loop when servo used

Running this program on CPX + SG92R on pin A1,

  • on battery, it grinds to a locks within seconds.
  • on USB, it slows down to a grind after a minute
#include "CircuitPlayground.h"

CircuitPlayground cplay;

int main()
{
    int status = 0;
    while(1)
    {
        cplay.io.led.setDigitalValue(status);
        cplay.io.a1.setServoValue(30 + rand() % 15);
        cplay.sleep(20);
        status = !status;
    }
}

AnalogButton support for AnalogSensor

Request for a general purpose "AnalogButton" that wraps an analog sensor into a button. Currently, DeviceButton is meant for a digital pin and does not take into account thresholds set on the analog sensor.

For example, we could mount a button on a light sensor and just handle a "light click"!

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.