Skip to content

Commit

Permalink
feat: add support for moddable four + nrf52 device setup (#138)
Browse files Browse the repository at this point in the history
* feat: add support for nrf52

* feat(ejectfix): add setup, teardown process for notification preference changes on macos

* fix(run): close background serial2xsbug process on SIGINT

* fix(build/run): add support for contributed examples

* fix(nrf52): attempt to set user permission for ttyUSB0 on Linux

* docs: add xs utils requirement, update links

* chore
: pnpm dedupe

* fix: remove forked cli reference
  • Loading branch information
HipsterBrown committed Aug 11, 2023
1 parent 01634f6 commit 85b5e73
Show file tree
Hide file tree
Showing 18 changed files with 680 additions and 1,122 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,24 @@ The Moddable SDK and associated dev board tooling is incredibly empowering for e

_If you've never installed Node.js before, check out the [getting started guide for xs-dev](https://hipsterbrown.github.io/xs-dev/guide/00-prepare#nodejs-package-manager-optional)._

[XZ utils](https://tukaani.org/xz/) are required to install the CLI due to a dependency for decompressing the ARM toolchain used for nrf52 development.

It can be installed with Homebrew on MacOS:

```
brew install xz
```

Or as `xz-utils` on Linux distributions like [Ubunutu](https://packages.ubuntu.com/search?keywords=xz-utils):

```
apt-get install xz-utils
```

**On Linux:**

Setup commands rely on [`ssh-askpass`](https://packages.ubuntu.com/bionic/ssh-askpass) to prompt for permission when installing other tools and dependencies.
Setup commands rely on [`ssh-askpass`](https://packages.ubuntu.com/focal/ssh-askpass) to prompt for permission when installing other tools and dependencies.


## Install

Expand Down
12 changes: 12 additions & 0 deletions docs/src/content/docs/features/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ This process mostly automates the instructions provided by [Moddable's "Getting

[Homebrew](https://brew.sh/) is assumed to be installed.

[XZ utils](https://tukaani.org/xz/) are required to install the CLI due to a dependency for decompressing the ARM toolchain used for nrf52 development. It can be installed with homebrew:

```
brew install xz
```

The [Xcode Command Line tools](https://developer.apple.com/xcode/) are required; `setup` will check for their existence before continuing.

A symlink for [`xsbug.app`](https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/xs/xsbug.md) is created in `/Applications` for easy access through Launchpad.
Expand Down Expand Up @@ -74,3 +80,9 @@ There are some utilities that are not included in the Moddable SDK or other plat
```
xs-dev setup --tool fontbm
```

`ejectfix`: not a downloadable tool, rather a environment preference to disable the `DISK NOT EJECTED PROPERLY` notification while working with the nrf52 on MacOS. This will automate the process described by [the Adafruit blog](https://blog.adafruit.com/2021/05/11/how-to-tone-down-macos-big-surs-circuitpy-eject-notifications/):

```
xs-dev setup --tool ejectfix
```
2 changes: 1 addition & 1 deletion docs/src/content/docs/guide/00-prepare.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Check out the [npm docs](https://docs.npmjs.com/resolving-eacces-permissions-err

## Linux Permissions

Setup commands rely on [`ssh-askpass`](https://packages.ubuntu.com/bionic/ssh-askpass) to prompt for permission when installing other tools and dependencies.
Setup commands rely on [`ssh-askpass`](https://packages.ubuntu.com/focal/ssh-askpass) to prompt for permission when installing other tools and dependencies.

## Choose your hardware adventure

Expand Down
2 changes: 1 addition & 1 deletion docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "astro/tsconfigs/strict"
}
}
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
"@octokit/rest": "^19.0.3",
"axios": "^1.2.1",
"gluegun": "^5.1.2",
"node-liblzma": "^1.1.9",
"serialport": "^10.3.0",
"serve-handler": "^6.1.3",
"solid-js": "^1.4.3",
"simple-plist": "^1.3.1",
"tar-fs": "^2.1.1",
"unzip-stream": "^0.3.1",
"usb": "^2.2.0",
Expand Down Expand Up @@ -76,6 +77,7 @@
"prettier": "^2.5.1",
"release-it": "^15.11.0",
"rollup": "^2.78.1",
"solid-js": "^1.4.3",
"tailwindcss": "^3.0.24",
"ts-jest": "^27.1.2",
"ts-node": "^10.9.1",
Expand All @@ -101,7 +103,9 @@
"ansi-regex@>=3.0.0 <3.0.1": ">=3.0.1",
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
"minimatch@<3.0.5": ">=3.0.5",
"conventional-changelog-conventionalcommits": ">=5.0.0"
"conventional-changelog-conventionalcommits": ">=5.0.0",
"string-width": "<5.0.0",
"ansi-regex": "<6.0.0"
}
},
"release-it": {
Expand Down
Loading

0 comments on commit 85b5e73

Please sign in to comment.