Open dokterbob opened 8 years ago
Hi @dokterbob - I've been building this locally using the 'develop' firmware rather than using the cloud build system.
I'll try and have a look at getting this to build online but for the moment, you'll want to follow the following set of instructions:
https://github.com/spark/firmware/blob/develop/docs/gettingstarted.md - you'll want to 'git checkout develop' in the firmware directory before attempting to build.
After that, check out the tracker repo into ./user/applications/tracker and run
PARTICLE_SERIAL_DEV=<your serial device> make clean all PARTICLE_DEVELOP=1 PLATFORM_ID=10 APP=tracker COMPILE_LTO=n DEBUG_BUILD=n -s program-dfu
Which should build and flash the electron with the new firmware (both parts) and the app itself.
Great, thanks. Will try. If it works I'm likely to send a pull req. with this stuff neatly documented.
Lastly, it seems that your editor is not setup to remove trailing whitespace. Could I tempt you to configure this, so that you won't ever have whitespace diffs in commits? :)
Ok, I've tried the instructions with commit c974657 of the develop branch, this results in the unit booting to safe mode. :(
What commit are you running from? Any other hints?
Ok, so I managed to get stuff to run. The (reconstructed, as-is untested) steps I performed were, roughly:
git clone -b develop https://github.com/spark/firmware.git particle-firmware
git clone https://github.com/benagricola/tracker.git particle-firmware/user/applications/tracker
cd particle-firmware/modules
make clean all PARTICLE_DEVELOP=1 PLATFORM_ID=10 APP=tracker COMPILE_LTO=n DEBUG_BUILD=n -s program-dfu
Now for some more testing, also of aforementioned instructions and a pull req. with build instructions can be expected.
cd particle-firmware/modules
Sorry, forgot this bit in my instructions and it's sorta important :sweat_smile:
@dokterbob can you please try the particle.include file added in 6ad1602?
Output from cloud build with that include file:
...@b-mbp ~/d/p/f/u/a/tracker> particle compile electron
Compiling code for electron
Including:
/Users/.../dev/particle/firmware/user/applications/tracker/inc/Adafruit_GPS.cpp
/Users/.../dev/particle/firmware/user/applications/tracker/inc/Adafruit_GPS.h
/Users/.../dev/particle/firmware/user/applications/tracker/inc/Adafruit_LIS3DH.cpp
/Users/.../dev/particle/firmware/user/applications/tracker/inc/Adafruit_LIS3DH.h
/Users/.../dev/particle/firmware/user/applications/tracker/inc/Adafruit_Sensor.h
/Users/.../dev/particle/firmware/user/applications/tracker/inc/GPS_Math.h
/Users/.../dev/particle/firmware/user/applications/tracker/inc/cell_locate.cpp
/Users/.../dev/particle/firmware/user/applications/tracker/inc/cell_locate.h
attempting to compile firmware
pushing file: /Users/.../dev/particle/firmware/user/applications/tracker/inc/Adafruit_GPS.cpp
pushing file: /Users/.../dev/particle/firmware/user/applications/tracker/inc/Adafruit_GPS.h
pushing file: /Users/.../dev/particle/firmware/user/applications/tracker/inc/Adafruit_LIS3DH.cpp
pushing file: /Users/.../dev/particle/firmware/user/applications/tracker/inc/Adafruit_LIS3DH.h
pushing file: /Users/.../dev/particle/firmware/user/applications/tracker/inc/Adafruit_Sensor.h
pushing file: /Users/.../dev/particle/firmware/user/applications/tracker/inc/GPS_Math.h
pushing file: /Users/.../dev/particle/firmware/user/applications/tracker/inc/cell_locate.cpp
pushing file: /Users/.../dev/particle/firmware/user/applications/tracker/inc/cell_locate.h
downloading binary from: /v1/binaries/56ef0e09477963a40b0fde88
saving to: electron_firmware_1458507269866.bin
Memory use:
text data bss dec hex filename
2796 8 436 3240 ca8 /spark/compile_service/shared/workspace/10_electron_15_1/firmware/cbc30c33372afa3be5979eda7d1bea726f2e268edad651d4783245fb0bb7/cbc30c33372afa3be5979eda7d1bea726f2e268edad651d4783245fb0bb7.elf
Compile succeeded.
Saved firmware to: /Users/.../dev/particle/firmware/user/applications/tracker/electron_firmware_1458507269866.bin
Also: I use Vim - I've added a remove-trailing-whitespace-on-save function so we'll see how it goes, if it causes issues with editing other code (I write in lots of languages) I may have to disable but we'll see!
Hey Ben,
Thanks for the feedback. It’ll be about a week before I get time to dive into this again- so beware it’s gonna take a while.
M
I'm on holiday from Tuesday until mid april so also won't be able to reply from now !
I'm willing to write up build instructions as I put together this code for myself and to contribute that back. Hopefully get a chance fairly soon.
Hi,
I'm a python programmer with little experience of the hardware side, and the particle firmware is completely new to me so please forgive the inexperience:
I've attempted to compile and flash by both methods described above.
1) - manually compilation and flash via "make clean all" works great: i also see the bad checksum described in bug report https://github.com/benagricola/tracker/issues/2, but am also getting accurate gps events.
2) "particle compile electron" gives me the .bin - fine. Flash via "particle flash --usb electron_firmware_xxxx.bin" - fine.
Breathing cyan light - but doesn't get motion/gps events, nor any red light on the gps unit itself.
I'm also struggling to get this to install on my Particle Electron. Could totally be my error, but I've tried the above options (cloud, make clean all, particle compile electron...) and have not been successful.
Any tips are appreciated, this looks to be a great starting point for a project I'm working on.
Building manually works for me. I finally got the cloud build to work by altering the source files to remove the "inc/" from all #include lines in main.cpp (e.g. #include "inc/Adafruit_GPS.h" becomes #include "Adafruit_GPS.h", etc.) - since the particle.include file already takes care of this.
Hope this helps.
I tried removing the "inc/" references as well, perhaps there is something else I am doing incorrectly?
My process was basically to:
Is there a way to "upload" the entire project directory or some other approach?
I'd download "particle dev" (https://www.particle.io/products/development-tools/particle-local-ide) and try importing the project in there. You can then "cloud compile" and either download the firmware file to flash locally, or have it flash through the cloud.
Please share any error messages and ill do my best to help.
KuDeTa,
I did not know there was a desktop app - thanks for pointing me in that direction. Here are the steps I have taken:
Error: inc/LIS3DH.h: No such file or directory (LIS3DH.ino:3:24)
LIS3DH.cpp
that includes the LIS3DH.h
file is prefaced with inc/
. I tried removing it, which took this error away.I'll keep chugging away at it, but if you've got any pointers I'm all ears!
So compiling to the cloud ended up succeeding once I moved all the files out of the inc/
directory and into the main directory. I was able to Compile in the IDE (but not flash over the cloud). I popped over to the CLI and ran particle compile electron
, which then gave me a .bin
file that I could run particle flash --usb {.bin directory location}
.
I believe I have the app installed, but its breathing white (no cellular connection). Working on why that might be now...
Edit - I put it into "listening" mode and got it to do a flash over cellular using the IDE. Seems to have successfully installed! Now trying to sort out what exactly constitutes enough movement for this to wake up and report a new location.
Hey there,
Thank for this awesome package, you potentially saved me days of work IF I can get this stuff to build.
I have spent the last several hours trying to get this to run on my Electron but, using
particle compile
it fails to build. These are things I've tried:inc/
folder and hence results in the include files not being found.particle.include
file listingmain.cpp
and includes which, somehow, results in the includes not being found as well: `main.cpp:12:30: fatal error: inc/Adafruit_GPS.h: No such file or directoryinclude "inc/Adafruit_GPS.h"`
inc/
to the main directory. This time, includes seem to be taken along but I'm getting the following output:It seems
particle compile
builds against a different version of the firmware, somehow.My main question is: how do you build this thing? And then my next question, how might I? ;)
Thanks for any help! Mathijs