Skip to content

Commit

Permalink
Merge branch 'master' into kiki-lee-pre-thanx
Browse files Browse the repository at this point in the history
  • Loading branch information
kiki-lee authored Dec 5, 2024
2 parents 04254e8 + a1153b8 commit 6fd2d8f
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
49 changes: 49 additions & 0 deletions docs/developer/local-cpp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Local C++ development setup

Install ARM GCC https://developer.arm.com/downloads/-/gnu-rm 10.3

```bash
npm install -g pxt # cmd line tool
cd pxt-arcade
npm install
pxt link ../pxt
pxt link ../pxt-common-packages
pxt serve --rebundle # and stop it
mkdir -p projects/myprj
cd projects/myprj
```

Create the following files (replacing with rp2040 with the target you need):

`pxt.json`

```json
{
"name": "myprj",
"version": "0.0.0",
"dependencies": {
"hw": "file:../../libs/hw---rp2040",
"device": "file:../../libs/device"
},
"files": [
"main.ts"
],
"supportedTargets": [
"arcade"
]
}
```

`main.ts`

```typescript
let mySprite = sprites.create(sprites.duck.duck1)
mySprite.ay = 50
mySprite.setStayInScreen(true)
```

To build the native binary:

```bash
PXT_FORCE_LOCAL=yes PXT_NODOCKER=yes PXT_RUNTIME_DEV=yes PXT_ASMDEBUG=yes pxt build
```
Binary file modified docs/static/hardware/newbit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions targetconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@
"variant": "hw---samd51"
},
{
"name": "micro:bit Newbit Shield",
"description": "Use the micro:bit with an expansion board from Kittenbot",
"name": "Newbit Arcade Shield",
"description": "Use the micro:bit with an expansion board from KittenBot",
"imageUrl": "/static/hardware/newbit.png",
"url": "https://www.kittenbot.cc/products/newbit-arcade-shield",
"variant": "hw---n3"
Expand Down

0 comments on commit 6fd2d8f

Please sign in to comment.