{"id":18111658,"url":"https://github.com/laymer/grisplasp","last_synced_at":"2025-04-06T08:22:11.521Z","repository":{"id":67404779,"uuid":"123289400","full_name":"Laymer/GrispLasp","owner":"Laymer","description":"Support material for Lasp applications on Grisp boards.","archived":false,"fork":false,"pushed_at":"2018-05-28T20:01:53.000Z","size":4639,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-12T13:56:52.340Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Laymer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-28T13:34:00.000Z","updated_at":"2018-07-22T02:27:34.000Z","dependencies_parsed_at":"2023-07-03T10:46:22.316Z","dependency_job_id":null,"html_url":"https://github.com/Laymer/GrispLasp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laymer%2FGrispLasp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laymer%2FGrispLasp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laymer%2FGrispLasp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laymer%2FGrispLasp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Laymer","download_url":"https://codeload.github.com/Laymer/GrispLasp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247452777,"owners_count":20941167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-01T01:07:05.196Z","updated_at":"2025-04-06T08:22:11.498Z","avatar_url":"https://github.com/Laymer.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Running Lasp Language on GRiSP boards\nThis is a repository intended to gather information and provide useful support for design and configuration of applications written in [Lasp](https://lasp-lang.readme.io/) and running on [GRiSP](https://www.grisp.org/) boards.\n\n## Proposed design\nBased on the principles of edge computing specified by [LightKone](https://www.lightkone.eu/), the distributed nodes should be able to replicate a fraction of the state and operate locally. As an attempt to implement that pattern, the following design is proposed for an edge node :\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"Untitled Diagram.png\" alt=\"Design\"/\u003e\n\u003c/p\u003e\n\n## Cloning/Copying existing project :\nIf the rebar3 grisp build command returns an error code that contains anything similar to :\n```\nconfigure: error: C compiler cannot create executables\n```\nEventhough the toolchain path is correctly set in the rebar.config of the project, emptying the rebar3 cache and rebuilding in a new project should provide a workaround. It can be done with the following commands (shell) :\n\n```\nrm -rdf {~/.cache/rebar3/*,/path/to/defect/project}\nrebar3 new grispapp=newproject dest=/path/to/sd\ncp -a /path/to/defect/project/{grisp,rebar.config,src} /path/to/newproject \u0026\u0026 cd /path/to/newproject \u0026\u0026 rebar3 grisp build\n```\n\nSince the environment and path can be altered if builds/deployments have been made if sudo was previously called, the files in otp/20.2/build/make can contain incorrect references when the configuration is run after a build. Erasing the cache and building from a new app folder can solve this issue.\n\n### Dependencies source files inclusion :\nIf the sources of the application's dependencies are not correctly included in the build for the SD card, cleaning the previous build and unlocking the rebar lock file can be helpful :\n\n```\ncd /path/to/project \u0026\u0026 rm -rdf {_build,_grisp}\nrebar3 unlock \u0026\u0026 rebar3 grisp build \u0026\u0026 rebar3 compile\n\nrm -rdf ~/.cache/rebar3/plugins/* \u0026\u0026 rm -rdf _build/grisp \u0026\u0026 rm -rdf _grisp \u0026\u0026 rebar3 unlock \u0026\u0026 rebar3 grisp build\n```\n\nNOTE : when calling commands cp and rm on multiple targets such as {file1,file2,...}, the files must always be separated by commas that are never followed by spaces e.g. never {file1, file2, ...} otherwise the shell is unable to locate them.\n\n## Auto-deployment script usage :\n\nThe script detects when the SD Card is inserted and compiles the project, deploys and unmounts the card automatically. The script requires sudo privilegies for unmounting.\n\nNote : the rebar.config must not call unmount/umount in the post_script argument for the grisp plugin.\n\nUsage :\n\n```\n$ sudo ./grisp_deploy.sh -s /Path/to/GRISP -a /Path/to/application/ [-n \u003cname\u003e]\n```\nWhere the parameters are the following :\n\n- `-s` : SD Card path e.g. : `-s /Volumes/GRISP`\n\n- `-a` : Path to the target application root folder e.g. : `-a /GRISP/robot/`\n\n- `n` : (optional) Name of the target application e.g. : robot. If not supplied, the first found module will be deployed.\n\n## Installation :\n\nDocumentation is available in the [Grisp wiki](https://github.com/grisp/grisp/wiki/). This section describes specific encountered installation cases and further remarks/notes.\n\n\n\n### Ubuntu 16.04.3 LTS\n\nOnce Rebar3 has been installed with the help of\n\n```\n$ mkdir ~/bin\n$ curl -o ~/bin/rebar3 https://s3.amazonaws.com/rebar3/rebar3\n$ chmod +x ~/bin/rebar3\n```\n\nRunning the `rebar3` command resulted in an error of type :\n\n```\nNo command 'rebar3' found\n```\n\nThe following commands must be executed :\n\n```\ncd ~/bin/\n./rebar3 local install\n```\n\nAnd after appending the resulting line to the `~/.bashrc` file :\n\n```\nexport PATH=$HOME/.cache/rebar3/bin:$PATH\n```\n\nThe `rebar3 plugins list` command can be runned in order to check whether the binary can now be executed.\n\nAfter creating a new grispapp and adding the toolchain in the `rebar.config` of that app, it can be built using :\n\n```\ncd \u003cgrisp app name\u003e\nrebar3 grisp build\n```\n\n## Configuring Grisp's network\n\nConfiguring the network layer of Grisp boards has not yet been implemented and therefore needs the following manipulation to manually change the network layer on Grisp:\n\nIn the existing `node` folder, you will need to change the `erl_main.c` located at `_build/default/lib/grisp/grisp/grisp_base/sys/`.\n\nAfter changing the file, run the following command :\n\n```\nrebar3 grisp build\n```\n\nThe Grisp plugin for rebar will build the custom OTP version used in Grisp and will replace OTP's default version of `erl_main.c` with the file you previously modified.\n\nYou can verify that your `erl_main.c` has been included in OTP's build by viewing the latter which is located at : `_grisp/otp/20.2/build/erts/emulator/sys/unix/erl_main.c`\n\nNote: An example is provided in `node/grisp/grisp_base/sys/erl_main.c`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaymer%2Fgrisplasp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaymer%2Fgrisplasp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaymer%2Fgrisplasp/lists"}