diff --git a/docs/developer/local-cpp.md b/docs/developer/local-cpp.md new file mode 100644 index 0000000000..a7147701e5 --- /dev/null +++ b/docs/developer/local-cpp.md @@ -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 +``` diff --git a/docs/static/hardware/newbit.png b/docs/static/hardware/newbit.png index d2fe92b6ed..617fc595b0 100644 Binary files a/docs/static/hardware/newbit.png and b/docs/static/hardware/newbit.png differ diff --git a/targetconfig.json b/targetconfig.json index d39ad71480..1339e0e3c1 100644 --- a/targetconfig.json +++ b/targetconfig.json @@ -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"