Hi, I am working on a project where I need to add ble dfu as well as serial dfu issue I am getting on adding serial dfu to ble example I am getting error variables undeclared whereas on navigating it reads the variable file nrf_error.h
Hi, I am working on a project where I need to add ble dfu as well as serial dfu issue I am getting on adding serial dfu to ble example I am getting error variables undeclared whereas on navigating it reads the variable file nrf_error.h
Hi Ahtasham,
The compiler complained about undefined macro NRF_SUCCESS and so on. They are defined in nrf_error.h You may want to check if you have included the path to nrf_error.h. It's located in \components\softdevice\[your softdevice ]\headers
I am actually trying to merge ble dfu with Serial DFU issue with after adding all files it gives an error for memory so I increase memory to 0x7000 and start address same as 0xF8000 I am not sure how to manage data memory address as according to this
the project bootloader already allotted 24kb memory
Start address 0xF8000
Size: 0x6000 - 24 Kb
If you increase the bootloader memory you would need to move the bootloader down in flash. So if you change the flash size to 0x7000 you would need to set the start address to 0xF7000 and so on (if size is 0x8000, then the start address should be 0xF6000). Othewise you will exceed the actual flash size of the chip.
I tried that but on change size to 0x7000 And start address to 0xF7000 it give me for some functions not defined like slip_encode
.\_build\nrf52840_xxaa_s140.axf: Error: L6218E: Undefined symbol slip_decode_add_byte (referred from nrf_dfu_serial_uart.o).
.\_build\nrf52840_xxaa_s140.axf: Error: L6218E: Undefined symbol slip_encode (referred from nrf_dfu_serial_uart.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 2 error messages.
".\_build\nrf52840_xxaa_s140.axf" - 2 Error(s), 0 Warning(s).
.\_build\nrf52840_xxaa_s140.axf: Error: L6218E: Undefined symbol slip_decode_add_byte (referred from nrf_dfu_serial_uart.o).
.\_build\nrf52840_xxaa_s140.axf: Error: L6218E: Undefined symbol slip_encode (referred from nrf_dfu_serial_uart.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 2 error messages.
".\_build\nrf52840_xxaa_s140.axf" - 2 Error(s), 0 Warning(s).
When you see an error, please try to understand it.
When it says "Undefined symbol" it means the symbol is not defined, and most likely the .h header file was not included.
Please check in the original example where it's defined.
Sorry, my bad I missed configuration in SDK for SLIP ENABLED, after resolving this I happed to compile my code properly but the issue is when I try to perform dfu for uart it gives an error with nrfutil as below, however for ble dfu working properly kindly help me with uart:
Traceback (most recent call last):
File "C:\Users\MST-WS-016\AppData\Local\Programs\Python\Python37\Scripts\nrfutil-script.py", line 11, in <module>
load_entry_point('nrfutil==6.1.0', 'console_scripts', 'nrfutil')()
File "c:\users\mst-ws-016\appdata\roaming\python\python37\site-packages\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "c:\users\mst-ws-016\appdata\roaming\python\python37\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\users\mst-ws-016\appdata\roaming\python\python37\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\mst-ws-016\appdata\roaming\python\python37\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\mst-ws-016\appdata\roaming\python\python37\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\mst-ws-016\appdata\roaming\python\python37\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\users\mst-ws-016\appdata\local\programs\python\python37\lib\site-packages\nrfutil-6.1.0-py3.7.egg\nordicsemi\__main__.py", line 1056, in serial
timeout)
File "c:\users\mst-ws-016\appdata\local\programs\python\python37\lib\site-packages\nrfutil-6.1.0-py3.7.egg\nordicsemi\__main__.py", line 970, in do_serial
dfu.dfu_send_images()
File "c:\users\mst-ws-016\appdata\local\programs\python\python37\lib\site-packages\nrfutil-6.1.0-py3.7.egg\nordicsemi\dfu\dfu.py", line 127, in dfu_send_images
self._dfu_send_image(self.manifest.application)
File "c:\users\mst-ws-016\appdata\local\programs\python\python37\lib\site-packages\nrfutil-6.1.0-py3.7.egg\nordicsemi\dfu\dfu.py", line 88, in _dfu_send_image
self.dfu_transport.open()
File "c:\users\mst-ws-016\appdata\local\programs\python\python37\lib\site-packages\nrfutil-6.1.0-py3.7.egg\nordicsemi\dfu\dfu_transport_serial.py", line 217, in open
self.__get_mtu()
File "c:\users\mst-ws-016\appdata\local\programs\python\python37\lib\site-packages\nrfutil-6.1.0-py3.7.egg\nordicsemi\dfu\dfu_transport_serial.py", line 364, in __get_mtu
response = self.__get_response(DfuTransportSerial.OP_CODE['GetSerialMTU'])
File "c:\users\mst-ws-016\appdata\local\programs\python\python37\lib\site-packages\nrfutil-6.1.0-py3.7.egg\nordicsemi\dfu\dfu_transport_serial.py", line 505, in __get_response
get_dict_key(DfuTransport.RES_CODE, resp[2])))
pc_ble_driver_py.exceptions.NordicSemiException: Response Code NotSupported
Hi Ahtasham,
I'm not sure what could be the problem. But we have an example here for SDK v15.2 that combine BLE+UART DFU. Maybe it's a good source for you to check what's the issue with your code: