I’ve just got a Spark Photon and I’m trying to set it up but I’m a bit lost with all the outdated documentation.
So I’m wondering which version and branches I should run:
spark firmware : vanilla from spark/firmware with branch hal or latest?
brewpi firmware : from BrewPi/firmware/ with develop branch?
brewpi tools : from BrewPI/brewpi-tools with master branch ?
I just pushed a few changes for the photon and new board version.
In brewpi firmware: feature/sparkv2
In spark/firmware: latest
In BrewPi/brewpi-tools: have not looked at it yet.
In BrewPi/brewpi-script: develop
You will have to make sure your photon is running the latest modules from spark/firmware. The BrewPi firmware is easiest to flash by adding program-dfu to make.
I will update flashDfu.py to do all of that for you once the BrewPi Photon release is out.
When building the firmware yourself, also look at:
Ok, now it’s clear but still, can’t compile the brewpi firmware.
The spark firmware is compiling (from main/, using make PLATFORM=photon all) and uploading to the photon very well.
Then, I cd into firmware/platform/spark/ and make now complains about a missing “ymodem.h” if I run it without argument or complains about undefined MODULE_VERSION[1] when running with make PLATFORM=photon. I’ve cleaned everything many times.
Any hints?
Thanks!
[1] In file included from src/module_info.c:2:0:
…/…/…/dynalib/inc/module_info.inc:89:6: error: #error MODULE_VERSION not defined #error MODULE_VERSION not defined
My spark firmware branch is latest
My BrewPi firmware branch is feature/sparkv2
I do not have any untracked changes and build with make clean all PLATFORM=photon.
Also try running make clean all PLATFORM=photon program-dfu in spark-firmware/modules
That sounds a good track but I’m afraid it’s not that easy to downgrade make (4.0 here) using the package manager of a distribution. Maybe the build system was slightly changed and it needs to be reflected in BrewPi firmware?
@mdma do you have any record of something changed in spark’s build system to allow it to be compiled using make 4.0+? I’ve searched the web to see if there were breaking changes between 3.8 and 4.0 or a porting guide but found nothing.
I got some deprecated warnings on 4.0, maybe that’s a clue?
Matthew did all the makefile magic, so I don’t really know the specifics, but he’s on vacation now for a week.
Additionally, there is a bug in the latest branch and in the latest release in the Particle repository.
It has been fixed in develop, so I would recommend building develop instead of latest. The bug is related to I2C and causes a deadlock when reading temp sensors.
I have built the images and put them in my personal repo for pre-release testing:
You can automatically flash them with flashDfu.py from:
So far, I’ve only used builds available on github but when I was trying to compile, I think the problem was because of make being too recent. It seems to behave differently with make ~3.9. Maybe @mdma has a clue about that? Does the photon build require a make < 4.x?
Yes, building from source requires make 3.81. Make 4.x is an entirely different animal and being a major version rev isn’t 100% compatible with the 3.x