Re: combinehex error using orrmany's method

57 views
Skip to first unread message

Curtis Malainey

unread,
May 2, 2020, 1:38:14 PM5/2/20
to drew...@gmail.com, ant-api
if I remember correctly, combinehex is a tool that comes from the nrf52 utils, not the bootloader itself, are you missing the nrf command line tools?

On Sat, May 2, 2020 at 10:19 AM <drew...@gmail.com> wrote:
drewv@DESKTOP-BOKA480 MINGW64 ~/Desktop/Adafruit_nRF52_Bootloader (master)
$ make BOARD=itsybitsy_nrf52840_express clean all combinehex
CC boards.c
CC dfu_ble_svc.c
CC dfu_init.c
CC flash_nrf5x.c
CC main.c
CC nrfx_power.c
CC nrfx_nvmc.c
CC system_nrf52840.c
CC bootloader.c
CC bootloader_settings.c
CC bootloader_util.c
CC dfu_transport_serial.c
CC dfu_transport_ble.c
CC dfu_single_bank.c
CC ble_dfu.c
CC ble_dis.c
CC pstorage_raw.c
CC app_timer.c
CC app_scheduler.c
CC app_error.c
CC app_util_platform.c
CC crc16.c
CC hci_mem_pool.c
CC hci_slip.c
CC hci_transport.c
CC nrf_assert.c
CC msc_uf2.c
CC usb.c
CC usb_desc.c
CC ghostfat.c
CC dcd_nrf5x.c
CC tusb_fifo.c
CC usbd.c
CC usbd_control.c
CC cdc_device.c
CC msc_device.c
CC tusb.c
AS gcc_startup_nrf52840.S
LD itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c-nosd.out
   text    data     bss     dec     hex filename
  30972    1192   22438   54602    d54a _build/build-itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c-nosd.out
CR itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c-nosd.hex
CR itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c_s140_6.1.1.hex
make: *** No rule to make target 'combinehex'.  Stop.


Note the last line of this transcript. As I go to build my bootloader I get this error and cannot proceed with the flash. Does anyone know what might be happening?

--
You received this message because you are subscribed to the Google Groups "ant-api" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-api+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/92ccf903-e02c-4271-b216-21ce1dbb275e%40googlegroups.com.

Curtis Malainey

unread,
May 2, 2020, 1:40:53 PM5/2/20
to drew...@gmail.com, Gábor Ziegler, ant-api
Actually ignore that comment, that is mergehex. It looks like Adafruit removed the combinehex command and Gabor just rebased his branch so that documentation is slightly old. +Gábor Ziegler did you document the new method? Is it just dropping the combinehex command?

drew...@gmail.com

unread,
May 2, 2020, 3:02:40 PM5/2/20
to ant-api
drewv@DESKTOP-BOKA480 MINGW64 ~/Desktop/ada-boot (master)
$ make BOARD=itsybitsy_nrf52840_express all
CC boards.c
.
.
.
AS gcc_startup_nrf52840.S
LD itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c-nosd.out
   text    data     bss     dec     hex filename
  30972    1192   22438   54602    d54a _build/build-itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c-nosd.out
CR itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c-nosd.hex
CR itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c_s140_6.1.1.hex

drewv@DESKTOP-BOKA480 MINGW64 ~/Desktop/ada-boot (master)
$ make BOARD=itsybitsy_nrf52840_express SERIAL=COM5 dfu-flash
LD itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c-nosd.out
   text    data     bss     dec     hex filename
  30972    1192   22438   54602    d54a _build/build-itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c-nosd.out
CR itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c-nosd.hex
Zip created at _build/build-itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c_s140_6.1.1.zip
adafruit-nrfutil --verbose dfu serial --package _build/build-itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c_s140_6.1.1.zip -p COM5 -b 115200 --singlebank --touch 1200
Upgrading target on COM5 with DFU package C:\Users\drewv\Desktop\ada-boot\_build\build-itsybitsy_nrf52840_express\itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c_s140_6.1.1.zip. Flow control is disabled, Single bank, Touch 1200
Touched serial port COM5
Opened serial port COM5
Starting DFU upgrade of type 3, SoftDevice size: 151016, bootloader size: 32156, application size: 0
Sending DFU start packet
Sending DFU init packet
Sending firmware file
########################################
########################################
########################################
########################################
########################################
########################################
########################################
########################################
######################################
Activating new firmware

DFU upgrade took 19.705050230026245s
Device programmed.

Can confirm that the combinehex command is no longer needed. I successfully flashed the device using the procedure above. This may be obvious to some of us but make sure adafruit-nrfutil is added to PATH. 
To unsubscribe from this group and stop receiving emails from it, send an email to ant...@googlegroups.com.

Curtis Malainey

unread,
May 2, 2020, 5:11:59 PM5/2/20
to drew...@gmail.com, ant-api
Glad to hear you got it working :)

To unsubscribe from this group and stop receiving emails from it, send an email to ant-api+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/dfcaa5c1-94b4-4f42-b9f4-a740bd9a3d52%40googlegroups.com.

Gábor Ziegler

unread,
May 5, 2020, 3:53:26 PM5/5/20
to ant-api
Oh, I have missed that. Yes the tutorial is quickly becoming obsolete :(
I have very limited BW for updating that :/
My Wiki is not an open one (I have had nasty experiences with spammers), so currently I am lost how to make it up-to-date...
To unsubscribe from this group and stop receiving emails from it, send an email to ant...@googlegroups.com.

Gábor Ziegler

unread,
May 5, 2020, 4:06:45 PM5/5/20
to ant-api
Hi,

Note the "nosd" substring (emphasis by me): " _build/build-itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c-nosd.out"
That seems to be the bootloader with no SD whatsoever.

Also note the "s140" substring (emphasis by me):"Zip created at _build/build-itsybitsy_nrf52840_express/itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c_s140_6.1.1.zip"

The "combinehex"  target is supposed to do exactly what its name suggests: combine the freshly compiled bootloader and  the softdevice firmware into a single hex (i.e., single firmware file) for upload...

The S140 softdevice is the "stock" softdevice delivered by Adafruit, that is a BLE only Softdevice. If you use that one then there is no surprise that the ANT calls do not work.

I have built my bootloader around Christmas and I haven't used that repo ever since. I have tried to make a Pull Request (PR) toward Adafruit, see https://github.com/adafruit/Adafruit_nRF52_Bootloader/pull/124,  and for that I have rebased the PR onto the latest upstream master, indeed, to increase readability

Sigh. I cannot promise that I will have time to redo/retest the bootloader compilation in the very near future, to much other things on my ToDo list currently. I will try my best.

Gábor Ziegler

unread,
May 5, 2020, 4:14:14 PM5/5/20
to ant-api
We will have a long-weekend around Ascension Day i Sweden, then I might have time for retesting the bootloader build, I cannot promise it earlier. I wish that you will find the fault before that...

Until that try to do what my tutorial say: repeat the Adafruit instructions to rebuild the original BLE-only bootloader with the S140 SD from source and test that works as expected. Then and only then proceed with adding S340 header and .hex to the bootloader source, or try replacie the S140 headers and hex entirely with S340 and then try to adapt my (obviously obsolete) tutorial to the new source tree version...

drew...@gmail.com

unread,
May 5, 2020, 4:18:41 PM5/5/20
to ant-api
I was testing this out with the s140 bootloader and it appears to have worked without the combinehex command if I am not mistaken. Later I successfully followed the same procedure with the s340 softdevice. Should have cleared that up for anyone who is following. 

drew...@gmail.com

unread,
May 5, 2020, 4:22:12 PM5/5/20
to ant-api
Ah yes I see what you are saying. Perhaps the sd hex was never included in the file. But is that not that is happening here?
CR itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c-nosd.hex
CR itsybitsy_nrf52840_express_bootloader-0.3.2-28-g79a6a0c_s140_6.1.1.hex

Gábor Ziegler

unread,
May 5, 2020, 4:39:34 PM5/5/20
to drew...@gmail.com, ant-api
It is easy to check:: Try to build any of the stock BLE example. Note, that for that you have to incorporate the freshly compiled bootloader into your build environment. I have made some blog entries about that:
If your BLE example compiles and work as-is, then you use the S140 softdevice....
If it does not compile as-is but compiles and works after altering to following method call
  • from  sd_softdevice_enable(&clock_cfg, nrf_error_cb)
  • to sd_softdevice_enable(&clock_cfg, nrf_error_cb, ANT_LICENSE_KEY) (assuming that you have defined and set the ANT_LICENSE_KEY macro, of course)
then you probably do use S340 (which requires a 3 args call to the enable() method, compared to that of the 2 args variant of S140)...

To unsubscribe from this group and stop receiving emails from it, send an email to ant-api+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/62af1652-48cf-4efa-95f7-fd21e9195ffe%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages