This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Customizing a bootloader

If all you need is changing  PHY, Tx power and Device Name in a standard nRF52840, do you need building a new bootloader from the scratch or the is a way to edit the standard firmware,  build a new edited file and finally re-program this file in a standard nRF52840? Thanks

  • Hi,

    It's a "diff" to show the change I made. Just add the "adv_start();" line after advertising_init(); in ble_m.c at line number ~1872 and it should work.

  • Hi Vidar.

    Hope you had a pleasant Christmass.

    After programming in my nRF52840 DK board the ble_app_uart modified example you suggested, let me make a couple of comments.

    1/ Using the Segger Embedded Studio IDE I couldn't find the file "ble_m.c" in order to type the "adv_start();" sentence you told me. Instead, I've noticed that there is an "advertising_init();" sentence in the "main.c" file, and even an "advertising_start();" sentence few lines later on the script. If I try to edit this file instead of the"ble_m.c" one, the SES IDE says it doesn't recognize the "adv_start();" sentence but suggest typing "advertising_start() instead;". Then, if I write "advertising_start()" right after "advertising_init()", LED1 goes permanently on, but device_name is not being advertised. If instead I write nothing, and since in the referred modified example you told me, there is already an "advertising_start();" sentence a bit further on in the original script, what I get is LED1 intermittently blinking but again, no device_name being advertised.

    2/ To make things harder, with this example I can't open a PuTTY session with the nRF52840 DK board to see what's going on by using CLI commands.

    3/ If instead of the modified example I use the standard SDK_v15.2.0  ble_app_interactive you find in the ble_central and peripheral>experimental folder, then I can find the ble_m.c file you mention, LED3 goes permanently on, and everything goes fine as you said but then obviously, PHY is not coded and Tx_Power is not +8dBm (as it would have happened if I would have used the modified example) 

    As a conclusion, It seems to me that the modified example shall be further edited in order to accept the "adv_start();" sentence. I'm I right? Could you help on that?

    In the hope you will be still willing to provide some guidance to me,  then I fill we are near to achieve the initially intended goal. 

    Waiting on your comments,

    Thanks in advance.

  • Hi Vidar.

    Using the modified SDK you sent to me (see above link) and changing the original S140 with the S140 v6.1.1 you suggested, I get this error while compiling:

    Since it seems that the "nrf_error.h" file path is missing, where in the modified SDK folder could I find this header file?

    Thanks

    Juan

  • Hi Juan,

    The modified SDK uses s140 v.6.1.1 already. If you have started with a new SDK copy you can replace the entire "s140" folder with the one from nRF5_SDK_15.2.0_mod (\nRF5_SDK_15.2.0_mod\components\softdevice\s140). nrf_error.h is located in s140/headers.

Related