I’ve just started trying to flash my project work locally over usb as it’s too time consuming to flash the core with the IDE over the cloud and I’m missing versioning and some advanced editing capabilities.
I have a project with a number of files that include support for nrf24l01’s over SPI amongst other things, and it all works nicely when flashing via the cloud IDE so I decided to see if I could save some time and program the core over usb instead to enable me to iterate faster.
To start I followed the guide on the github core-firmware project, cloned the repos, installed the deps and ultimately built the tinker app. This deployed nicely to my core and worked a charm.
Next I looked at a number of approaches to include my project locally but ended up taking the simple route (or so I thought) of updating application.cpp and including my other files in /src and /inc. The first thing I noticed is that I had to declare prototypes for the functions in my main application “.ino” file
- Is this processed by the cloud IDE compiler in a similar fashion to the Arduino IDE? or am I missing something
After adding the prototypes, I managed to get my project to compile and was able to flash the core successfully, however the core attempts to start up, led flashes green and then flashes a series of red flashes (3fast,3slow,3fast, then about 8 slow) and then resets itself and the process repeats…
I then commented out the body of my loop code and replaced it with “delay(2000);Serial.print(“hello”);” retried… same problem, then I selectively identified (by commenting out various blocks of code in my setup method) that simply having “pinMode(D7, OUTPUT);” would cause this problem - remove the line and it worked fine.
Note: If I uncomment the rest of my project it flashes red again, but the above I hope will indicate to someone what I might have wrong!
Has anyone any ideas or tips of what I’m doing wrong? not doing?
Thanks in advance!