Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

ble_app_uart won't advertise as coded from example set

Hello, I am currently trying to program the uart example code from the nRF5_SDK_12.3.0_d7731ad zip file. After dealing with various reference address and device package issues, I am now able to flash the softdevice and progam sets to the chip. However, the chip is not advertising and it does work with the premade hex file. At this point I have no idea what could be wrong, the only noticible difference between the hex file layout in nRF Connect and the flashed softdevice and code from Kiel 5 is shown in the attached image, with hex file on the left covers the register address from 0 to 0x0001E3F7 while the flashed program from Keil goes from 0 to 0x0001E3FF. Other than that the recovery error is shown in the command window, but this occured even for the hex file which would advertise so I am unsure how to proceed.

  • Hi

    Have you made any changes to the ble_app_uart example project? Does the build and flash procedures in Keil complete without any errors? Can you show me the build logs from Keil as well?

    Best regards,

    Simon

  • Hello Simonr,

    The only change made to the example project was changing the name. So nothing that should have any affect on the program itself. The build and flash procedures showed no errors or warnings during the build and flash procedures. Through Keil I am able to get the simple blinking program working to verfiy connection with the board. Attached is the bulid log.

    Sincerely,

    Alexandre Tessier

    µVision Build Log
    
    Tool Versions:
    
    IDE-Version: µVision V5.37.0.0
    Copyright (C) 2022 ARM Ltd and ARM Germany GmbH. All rights reserved.
    License Information: Alexandre Tessier, Queen's University, LIC=----
     
    Tool Versions:
    Toolchain:       MDK-Lite  Version: 5.37.0.0
    Toolchain Path:  C:\ncs\ARM\ARM_Compiler_5.06u7\Bin
    C Compiler:      Armcc.exe V5.06 update 7 (build 960)
    Assembler:       Armasm.exe V5.06 update 7 (build 960)
    Linker/Locator:  ArmLink.exe V5.06 update 7 (build 960)
    Library Manager: ArmAr.exe V5.06 update 7 (build 960)
    Hex Converter:   FromElf.exe V5.06 update 7 (build 960)
    CPU DLL:         SARMCM3.DLL V5.37.0.0
    Dialog DLL:      DARMCM1.DLL V1.19.6.0
    Target DLL:      UL2CM3.DLL V1.164.7.0
    Dialog DLL:      TARMCM1.DLL V1.14.6.0
     
    Project:
    
    C:\ncs\nRF5_SDK_12.3.0_d7731ad\examples\ble_peripheral\ble_app_uart\pca10028\s130\arm5_no_packs\ble_app_uart_pca10028_s130.uvprojx
    Project File Date:  08/24/2022
    
    Output:
    
    *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\ncs\ARM\ARM_Compiler_5.06u7\Bin'
    Rebuild target 'nrf51422_xxac'
    Note: source file 'RTE/Device/nRF51422_xxAA/arm_startup_nrf51.s' - object file renamed from '.\_build\arm_startup_nrf51.o' to '.\_build\arm_startup_nrf51_1.o'.
    Note: source file 'RTE/Device/nRF51422_xxAA/system_nrf51.c' - object file renamed from '.\_build\system_nrf51.o' to '.\_build\system_nrf51_1.o'.
    compiling bsp_nfc.c...
    compiling boards.c...
    compiling bsp_btn_ble.c...
    compiling ble_nus.c...
    compiling bsp.c...
    compiling ble_conn_params.c...
    compiling ble_srv_common.c...
    compiling ble_advdata.c...
    compiling ble_advertising.c...
    compiling nrf_drv_clock.c...
    compiling main.c...
    compiling nrf_drv_common.c...
    compiling app_error_weak.c...
    compiling app_error.c...
    compiling app_fifo.c...
    compiling app_button.c...
    compiling app_util_platform.c...
    compiling sdk_errors.c...
    compiling nrf_drv_uart.c...
    compiling app_uart_fifo.c...
    compiling nrf_drv_gpiote.c...
    compiling RTT_Syscalls_KEIL.c...
    compiling app_timer.c...
    compiling fstorage.c...
    compiling SEGGER_RTT_printf.c...
    compiling hardfault_implementation.c...
    assembling arm_startup_nrf51.s...
    compiling nrf_assert.c...
    compiling nrf_log_backend_serial.c...
    compiling retarget.c...
    compiling nrf_log_frontend.c...
    compiling system_nrf51.c...
    compiling SEGGER_RTT.c...
    compiling softdevice_handler.c...
    linking...
    Program Size: Code=13532 RO-data=368 RW-data=212 ZI-data=5828  
    FromELF: creating hex file...
    ".\_build\nrf51422_xxac.axf" - 0 Error(s), 0 Warning(s).
    
    Software Packages used:
    
    
    Package Vendor: ARM
                    http://www.keil.com/pack/ARM.CMSIS.4.5.0.pack
                    ARM.CMSIS.4.5.0
                    CMSIS (Cortex Microcontroller Software Interface Standard)
       * Component: CORE Version: 4.3.0
    
    Package Vendor: NordicSemiconductor
                    http://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/NordicSemiconductor.nRF_DeviceFamilyPack.8.11.1.pack
                    NordicSemiconductor.nRF_DeviceFamilyPack.8.11.1
                    Nordic Semiconductor nRF ARM devices Device Family Pack.
       * Component: Startup Version: 8.11.1
    
    Collection of Component include folders:
    
      ./RTE/_nrf51422_xxac
      C:/Users/Alexa/AppData/Local/Arm/Packs/ARM/CMSIS/4.5.0/CMSIS/Include
      C:/Users/Alexa/AppData/Local/Arm/Packs/NordicSemiconductor/nRF_DeviceFamilyPack/8.11.1/Device/Include
    
    Collection of Component Files used:
    
    
       * Component: ARM::CMSIS:CORE:4.3.0
    
       * Component: NordicSemiconductor::Device:Startup:8.11.1
          Source file:   Device/Source/arm/arm_startup_nrf51.s
          Source file:   Device/Source/system_nrf51.c
          Include file:  Device/Include/system_nrf51.h
    Build Time Elapsed:  00:00:02

  • I went to verify something and now the Jlink-Cortex M error has returned. I thought this was finally resovled but it would appear not to be the case. I was able to flash the softdevice, so it seems to only be related the actual code itself. Was able to flash the blinky program onto the board.

  • Intersting development, when I shift the IROM1 start from 0 to 1B00, the blinky program no longer works. Why is this? I had changed the start address for the uart because it would overlap with the softdevice code. If changing the register so this does not happen causes it not to work, what am I suppose to do?

  • I was able to fix the Cortex M error by changing the Port from JLink to SW.

Related