Back to Smartcitizen.me

Firmware compile error

I am trying to compile the latest firmware on my MacBook Pro. I had install & setup Platformio and recursive clone the repo. I am able to compile the ESP firmware without error. However, when I try to compile SAM using command: “python3 make.py -v build sam” I had encountered quite few errors. Most of them I can fix by changing the lib_deps requirement in platformio.ini. Eg. ArduinoJson encounter Wstring, it seem to be deprecated and fixed in the latest ArduinoJson, I can change the ArduinoJson to latest version in Platformio.ini lib_deps to fix it. I had encountered some other error as well. It is very tedious to fix one after another error as each error need some digging to figure out the compile issue. Instead of me trying to fix one after another error, have I miss something? Or is there any git branch that I can use to compile the latest SAM firmware without having to spend time fixing the error?

Hi!

In principle, this shouldn’t happen as the platformio.ini file needs to be able to define specific versions of each library. However, sometimes happens that either platformio or Arduino change something, and we have not fixed each possible version.

In general, a good practice would be to use the same as the travis.yml defines in the firmware repo, in this case:

$ git clone --depth=50 --branch=master https://github.com/fablabbcn/smartcitizen-kit-21.git fablabbcn/smartcitizen-kit-21
$ git submodule update --init --recursive
$ python --version
Python 3.6.7
$ pip --version
pip 20.1.1
$ pip install -U platformio
$ pio --version
PlatformIO Core, version 5.1.0

With this, compiles on the Ubuntu 16.04.6 LTS machine in travis, on my machine (macbook pro) and on other around here (arch linux, etc)

1 Like

Hi,
I reclone the repo, now I am able to make the sam without any error. Thanks.

1 Like