Back to

Trying to compile

First of all, I’m not a linux guy.

The outdoor case and its solar components are almost ready, so I need to compile the power optimized firmware. I’ve setup a Ubuntu VM, installed or upgraded phyton3, pip and platformio. I’ve cloned the git as instructed in

unfortunately, when I try to compile the firmware by using “./ sam” I only get “no such file of directory”. I’m in the root of the cloned directory seeing esp, lib, sam etc.

Any hint what i?m doing wrong?

Best regards from switzerland!

Hi @martin.zh

So cool you try it!

I think the biggest issue is we need to update the firmware documentation properly. I know @victor is working on it. We did a lot of changes lately.

Quickly you’ll need to do:

pip3 install platformio

git clone --recursive
cd smartcitizen-kit-21

python3 -v build sam

Sometimes, the first time you run fails but it just gets fixed by running again python3 -v build sam again.

That is how I do it on my Mac but it should work in Linux almost the same. Anyway, @victor should be able to add more details here as he is the lead developer and a Linux user, too.

Also, keep in mind that it should be possible to fully compile the firmware on Windows as Platformio and all our toolchains are Python-based, and there are good examples on running Python on windows.

1 Like

Works on the second try! :slight_smile:

Hi there,

Just updated the Edit the Firmware guide!!

1 Like


Just upgraded my sensor with the self-complied firmware - and its still working! :-):heart_eyes::grinning:


If you find any problem write us!