C++ Development in MakeCode GitHub Integration

Does anyone know if it’s possible to add .cpp files in the MakeCode GitHub integration when you’re developing an extension?
@peli @abchatra

@peli @abchatra @jwunderl
Any thoughts on this?

I’ve tried repeatedly to get my offline MakeCode build working properly, and just had it sorted when MakeCode switched to v4, and now the v4.0stable won’t work properly - there need to be instructions on the pxt-microbit page which are actually up to date with the MakeCode release.

I used to be able to do offline C++ development and created a few extensions with .cpp & shims included, seemingly the MakeCode updates etc just meant the dev environment I’ve got just isn’t up to scratch. Again, there aren’t really any helpful instructions other than “Install Docker”.

Help is really needed as this is holding up extension writing. Thanks.

@AlasdairAtKitronik I have a set of notes I could share from setting things up on an M1 Mac. They would mostly work for other Macs too, but cmake was confused by architecture and I had to hack it a bit for the M1. They aren’t terribly useful on PC/Linux since I used Homebrew, which is a Mac-specific package manager.

That being said, I’ve just followed the instructions to install pxt and I also installed the local compiler tools (yotta, srecord, cmake, ninja, and arm-none-eabi-gcc). I do almost all testing from a command prompt based development environment. To build a repo locally I do the following:

# Get and go to the repo dir
git clone REPO 
cd REPO-DIR
# Install microbit target
pxt target microbit
pxt install
# Disable docker for local builds
export PXT_NODOCKER=1  

Then to build/test (auto run the test.ts on any connected micro:bit. It detects v1 or v2 as needed and deploys it):

# May have to redo export  PXT_NODOCKER=1 bit if you work in a different shell or close/open it again
pxt deploy --local  

Bill