-
• #2
try
make clean;DFU_UPDATE_BUILD=1 PUCKJS=1 RELEASE=1 make
- that's what you need I think (but you'll need topip install nrfutils
)The normal build will try and merge with the bootloader, which needs building with
make clean;BOOTLOADER=1 PUCKJS=1 RELEASE=1 make
However that merged hex file is only really any good if you've got a debugger connected to the Puck - for wireless firmware updates you want the
DFU_UPDATE_BUILD
bitHope that helps!
-
• #3
Thanks, that worked! I will have to tested it later today, but at least I could build.
Just for reference, installing nrfutil on Mac needs the following:
sudo pip install --ignore-installed six nrfutil
-
• #4
Great - thanks for letting me know!
-
• #5
Okay, I have uploaded the new firmware to the Puck and can confirm that it works fine. Thanks a lot!
-
• #6
@stevie4711 thanks for sharing the pip command.
However, I had to install gcc-arm to do the build (OS X Sierra here, using homebrew):
brew install Caskroom/cask/gcc-arm-embedded
Will still have to test the compiled ZIP though to verify that it works...
-
• #7
You are welcome!
For gcc what I did was actually to just download the arm gcc binary distribution, unpack to some location and put it in the path. That way I can have multiple different versions and can just set the path from some project related build script.
-
• #8
OK - given I have managed to create a working ZIP for OTA flashing.
A test cycle is quite complex and time consuming:
- create the ZIP
- send it to iPhone
- set Puck to Bootmode and flash (this takes several minutes)
Any hints or howtos to do it via serial connection from the commandline?
- first there is the Serial Console https://www.espruino.com/Puck.js#serial-console
- will
make serialflash
work over this connection? https://github.com/espruino/Espruino/blob/master/README_Building.md#to-flash-espruino-from-the-vm
- create the ZIP
-
• #9
Afraid not - ideally you'd connect the GND, SWD, and SWCK pads to something like an nRF52832DK board, then you can use
make flash
to flash it over SWD (which takes ~15 seconds). It's even possible to debug.Having said that, I actually do a lot of development on a nRF52832DK board as it's easier, and then flash the Pucks only when needed (I made a jig with pogo pins to make it faster/easier)
-
• #10
OK thanks. Ordered the board.
Seems to be needed for serious development...
I'm just chewing myself through the nordic docs to understand what happens on the lower levels...
This is the right link http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s310.api.v3.0.0/modules.html - could you just confirm? -
• #11
It's the S132 softdevice you need: http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.softdevices52/dita/softdevices/s130/s130.html?cp=2_3_0
(and the S130 for nRF51 - they're pretty much identical API-wise)
Hi @Gordon,
I tried building the Espruino firmware for the Puck myself. I am doing it from a Mac, checked out the top of the master from github.
I started the build with
Building works mostly, lots of warnings, but no apparent errors. I get to the stage where it links the firmware. That seems to work. Then it fails with the following log:
Any advise? What am I doing wrong?
Thanks!