Sysprogs forums › Forums › VisualGDB › NRF51X22 DFU support in examples
Tagged: nrf nordic bluetooth dfu
- This topic has 3 replies, 2 voices, and was last updated 8 years, 11 months ago by support.
-
AuthorPosts
-
December 18, 2015 at 00:39 #7380twiddleParticipant
Hi,
Just looking to start testing DFU capability on a NRF-DK board running a nRF51422-AC.
However, it seems like there’s a few issues when enabling the bootloader-dfu module:nRF51/components/libraries/bootloader_dfu/bootloader_util.c: In function 'bootloader_util_reset': nRF51\components\libraries\bootloader_dfu\bootloader_util.c(106,1): error : r7 cannot be used in asm here
Any suggestions on what needs to be changed?
A tutorial on adding bootloader capability, and showing how to build firmware that can then be sent via the DFU bootloader, to one of the existing tutorials would be really helpful.
Thanks.December 18, 2015 at 00:42 #7381supportKeymasterHi,
Yes, please change the function declaration as follows:
static inline void __attribute__((__optimize__(0, "omit-frame-pointer"))) bootloader_util_reset(uint32_t start_addr)
December 18, 2015 at 00:59 #7382twiddleParticipantThanks for that.
Unfortunately, I still run into a few errors.
I have the bootloader_dfu library checked in the frameworks options, and I also have the ble_dfu service selected.
Presuming this is correct, I now get an error about multiple definitions of a number of DFU-related functions, here’s a sample of them:\nRF51\components\libraries\bootloader_dfu\dfu_single_bank.c(756): error VGDB1001: multiple definition of 'dfu_bl_image_validate' 1> Debug/dfu_dual_bank.o:/nRF51/components/libraries/bootloader_dfu/dfu_dual_bank.c:807: first defined here 1> Debug/dfu_single_bank.o: In function 'dfu_sd_image_validate': 1>\nRF51\components\libraries\bootloader_dfu\dfu_single_bank.c(781): error VGDB1001: multiple definition of 'dfu_sd_image_validate' 1> Debug/dfu_dual_bank.o:/nRF51/components/libraries/bootloader_dfu/dfu_dual_bank.c:832: first defined here 1> Debug/dfu_transport_serial.o: In function 'dfu_transport_update_start': 1>\nRF51\components\libraries\bootloader_dfu\dfu_transport_serial.c(279): error VGDB1001: multiple definition of 'dfu_transport_update_start' 1> Debug/dfu_transport_ble.o:/nRF51/components/libraries/bootloader_dfu/dfu_transport_ble.c:1036: first defined here 1> Debug/dfu_transport_serial.o: In function 'dfu_transport_close': 1>\nRF51\components\libraries\bootloader_dfu\dfu_transport_serial.c(300): error VGDB1001: multiple definition of 'dfu_transport_close' 1> Debug/dfu_transport_ble.o:/nRF51/components/libraries/bootloader_dfu/dfu_transport_ble.c:1088: first defined here 1> Debug/dfu_init_template_signing.o: In function 'dfu_init_prevalidate': 1> dfu_init_template_signing.c:(.text.dfu_init_prevalidate+0x0): multiple definition of 'dfu_init_prevalidate' 1> Debug/dfu_init_template.o:/nRF51/components/libraries/bootloader_dfu/dfu_init_template.c:58: first defined here 1> Debug/dfu_init_template_signing.o: In function 'dfu_init_prevalidate': 1>\nRF51\components\libraries\bootloader_dfu\experimental\dfu_init_template_signing.c(184): error VGDB1001: multiple definition of 'dfu_init_postvalidate' 1> Debug/dfu_init_template.o:/nRF51/components/libraries/bootloader_dfu/dfu_init_template.c:133: first defined here
Looks like there are issues with specifying which bootloader to use, and whether it is in a single or dual bank configuration. I’m not sure how to proceed with resolving it, though; Nordic’s own documentation regarding using DFU with GCC is rather lacking, which is why I’m hoping to use a VisualGDB template.
December 25, 2015 at 03:51 #7403supportKeymasterHi,
We have fixed this in the updated nRF5x BSP. Please download the new version via Tools->Embedded Tools Manager.
-
AuthorPosts
- You must be logged in to reply to this topic.