So after a day of tinkering, I have some findings about building locally for the P1. Another nut for the firmware folks to crack
When building locally, the compiler spits out a binary just fine. I’m able to flash the P1, but after it is loaded the P1 becomes unresponsive. No LED on these boards, so not much debugging info I can provide, but I can still get it into listening mode if I hold down the mode pin.
Here is what does not work :
- with the example app below in user/applications/myapp/ build via
make PLATFORM=P1 APP=myapp all
- flash (the locally compiled binary) via dfu using
program-dfu
or using dfu-util and flashing the .bin to 0x80A0000 address space - flash (OTA using the locally compiled binary) via cli using
particle flash myP1 myapp.bin
However, here is what does work (all using the example app below):
- using the web IDE, and doing an OTA flash to the P1
- using the web IDE, downloading the binary and flashing via DFU to the P1
- building locally and flashing to a Photon via
make PLATFORM=photon APP=myapp all program-dfu
Environment:
-
P1 with base firmware updated to 0.4.3
-
source pulled from release/0.4.3 branch on spark/firmware github repo
-
arm-none-eabi-gcc 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288]
-
14.04.1-Ubuntu
/* example application */
void setup() {
Serial.begin(9600) ;
}void loop() {
static char i = ‘A’ ;
Serial.print(i++);
if( i == ‘[’ ){
i = ‘a’;
}
else if( i == ‘{’ ){
i = ‘A’ ;
}
delay(500);
}
Anyone else having this issue with P1s? Seems like stuff I compile locally for P1 is just not coming out right. Does the web IDE target the P1 when you compile, or does it use the target agnostic compile option ?
Thanks in advance to the awesome people here, and HALP!