Hi,
yes, I did rebuild the firmware. And sorry, I was a bit unprecise. I did see a difference: I could no longer auto flash with pressing the button :-). But it was not really any faster. I will try again, when I am at home, just to be sure.
Hi,
yes, I did rebuild the firmware. And sorry, I was a bit unprecise. I did see a difference: I could no longer auto flash with pressing the button :-). But it was not really any faster. I will try again, when I am at home, just to be sure.
Hi mdma,
are you sure that the core-common and core-communications libs are needed. I removed them and it still builds fine. That was also my understanding, I read somewhere that they are no longer needed.
@Stevie, they are NOT needed. Did you clone the ādevelopā branch?
Oops, I overlooked the ānotā in mdmaās comment. I just wanted to confirm that they are not needed. And yes, I am using the develop branch. Sorry for the confusion.
So I checked again with a stopwatch (although itās pretty inaccurate by hand). It is actually a bit faster without the auto-flash code. It goes down from about 3 seconds to about 2.5 seconds for me. The part where the LED is switched off (with the above code) is shorter. Thanks!
NB: The startup of the core (joining the Wifi) seems to be more stable with the latest pull from github.
Woohoo! Thanks for reporting. That's the culmination of a weekend's work with little sleep! ![]()
Sounds great. I know that feeling! So thanks, I am glad that I reported it. ![]()
I have no idea how this is working for you. I have removed the extraneous commands from my batch file so to remove the distracting questions about core-comm-lib and core-communication-lib. I knew they probably had no impact here but they were in my batch so I displayed it here. Probably not a good idea as it clouds the issue.
I see today that the make for the develop branch bombs so I have modified my batch to use the photon_043 branch
Here is a cleaned up batch file I run to reclone the code:
c:
cd\spark
rmdir c:\spark\firmware /s
git clone -b photon_043 https://github.com/spark/firmware.git
cd firmware\modules
pause "Set the device to dfu mode"
make clean all PLATFORM=photon program-dfu
pause "Set the device to dfu mode again"
mkdir \spark\firmware\user\applications\photon
copy c:\mycode\myapp.cpp c:\spark\firmware\user\applications\photon\myapp.cpp
cd\spark\firmware\main
make clean all PLATFORM=photon APP=photon program-dfu
This definitely programs both the system firmware and user firmware but does not return from sleep as it should in 2 seconds.
Just to restate for clarity this is the user code I am running:
/* myapp.cpp */
#include "application.h"
SYSTEM_MODE(MANUAL);
void setup()
{
}
void loop()
{
int i = 0;
while (i < 10)
{
pinMode(D5, OUTPUT);
digitalWrite(D5, HIGH);
delay(500);
pinMode(D5, INPUT);
delay(500);
i++;
}
System.sleep(SLEEP_MODE_DEEP, 2);
}
This user code fails with a local compile against the photon_043 branch
It works fine with a local compile against the photon_042 branch
and It works fine with a compile in the cloud.
Any ideas what it could be?
@HardWater, the new make file in develop requires that you add āPARTICLE_DEVELOP=1ā to the make command line to not get the develop branch warning. Though the code compiles fine against develop, I cannot test it since Iām not at home. 
Okay Thanks @peekay123
I believe the reason why I was not able to compile against the develop branch this morning is because the make file now requires a new version of arm-none-eabi-gcc that being 4.9.3 20150529 I had the previous version
I tested the above with the develop branch just now and it works fine
@mdma Iām rather curious.
Is it that:
Wow, I never thought it would be a compiler issue. Thanks for reporting that!
I have to say that my only guess is some optimization bug is fixed in the compiler with the latest version. Iāve not done anything proactively to fix it other than the fix for the photon needing a reset, which seemed to also fix the wakeup from sleep issue.
Hi,
I actually did not use the version of the gcc which is now required. I would not even know where to find it for Mac. Can you point me to that one?
I was using arm-none-eabi-gcc 4.9.3 20141119. That worked fine for me. There is a newer version there, but not the one required.
@Stevie All I can say is this just gets curiouser and curiouser.
The rev you have now is what I was running first thing this morning when I could not compile
Just search on āarm-none-eabi-gcc 4.9.3 20150529ā and you will find the new rev
Just did that, cannot find it.The version which is currently on launchpad is 20150609. Maybe the 0529 was replaced with that one?!? I think it is in any case better to search for a version āand newerā.
Definitely. Iām going to add that in just a second.
@Stevie
Wow that that makes another odd thing. Here is what I downloaded this morning
gcc-arm-none-eabi-4_9-2015q2-20150609-win32.exe from launchpad
Once I had it installed and ran
arm-none-eabi-gcc --version
I get the following
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288]
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I had not noticed the filename and the output from --version once installed did not quite match
Okay, thatās really interesting, indeed⦠Okay, so I can actually use that version. Thanks for the info. But of course mdmaās work to use a newer version as well is also appreciated!