Dear All,
First I would like to congratulate and thank the people behind this fantastic project. I think it is needed and timely. I have a nordic nrf52480 preview pdk on which I have successfully run the blinky app and variations of it. But could not get the bare ble app (https://mynewt.apache.org/os/tutorials/ble_bare_bones/) to run without crashing. The program  "crashes" only if both the call to os_eventq_run(os_eventq_dflt_get()) is made and the following lines:

  - "@apache-mynewt-core/net/nimble/controller"
  - "@apache-mynewt-core/net/nimble/host"

are present in the pkg.yml file. If  these 2  lines AND/OR the os_eventq_run call are commented out the program does not crash.
Similar problem with the beacon example.
The main function, pkg.yml content, gdb output and gdb server output are pasted below.
Your help is most appreciated.
Abderrezak Mekkaoui


int
main(int argc, char **argv)
{
    /* Perform some extra setup if we're running in the simulator. */
#ifdef ARCH_sim
    mcu_sim_parse_args(argc, argv);
#endif

    /* Initialize all packages. */
    sysinit();

    /* As the last thing, process events from default event queue. */
    while (1) {
        os_eventq_run(os_eventq_dflt_get());
    }

    return 0;
}


pkg.name: "apps/ble_app"
pkg.type: app
pkg.description: "Description of your app"
pkg.author: "You <[email protected]>"
pkg.homepage: "http://your-url.org/";
pkg.keywords:

pkg.deps:
    - "@apache-mynewt-core/kernel/os"
    - "@apache-mynewt-core/sys/console/full"
    - "@apache-mynewt-core/sys/log/full"
    - "@apache-mynewt-core/sys/stats/full"
    - "@apache-mynewt-core/net/nimble/controller"
    - "@apache-mynewt-core/net/nimble/host"
    - "@apache-mynewt-core/net/nimble/transport/ram"


gdb output:
----------------

GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160923-cvs
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from C:\Users\Abderrezak\Dropbox\cygwin\home\Abderrezak\dev\ble_bare\bin\targets\ble_tgt\app\apps\ble_app\ble_app.elf...done. hal_system_clock_start () at repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_system.c:86
86                  if (NRF_CLOCK->EVENTS_LFCLKSTARTED) {
Resetting target
0x000000fc in ?? ()
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
__assert_func (file=file@entry=0x0, line=line@entry=0, func=func@entry=0x0, e=e@entry=0x0) at repos/apache-mynewt-core/kernel/os/src/arch/cortex_m4/os_fault.c:137
137            asm("bkpt");
(gdb)


===========================================
gdb server output:
------------------------

SEGGER J-Link GDB Server V6.22d Command Line Version

JLinkARM.dll V6.22d (DLL compiled Dec 14 2017 18:32:44)

Command line: -device NRF52840_XXAA -speed 4000 -if SWD -port 3333 -singlerun
-----GDB Server start settings-----
GDBInit file:                  none
GDB Server Listening port:     3333
SWO raw output listening port: 2332
Terminal I/O port:             2333
Accept remote connection:      localhost only
Generate logfile:              off
Verify download:               off
Init regs on start:            off
Silent mode:                   off
Single run mode:               on
Target connection timeout:     0 ms
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 NRF52840_XXAA
Target interface:              SWD
Target interface speed:        4000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 24 2017 17:30:12
Hardware: V1.00
S/N: 683721413
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 3333
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x0000C234 (Data = 0x2104F8D3)
Received monitor command: reset
Resetting target
Performing single step...
...Target halted (Vector catch, PC = 0x000000FC)
Reading all registers
Read 4 bytes @ address 0x000000FC (Data = 0x4B0D4A0C)
Read 2 bytes @ address 0x000000FC (Data = 0x4A0C)
Read 4 bytes @ address 0xFFFFFFFF (Data = 0x4B0D4A0C)
Read 2 bytes @ address 0xFFFFFFFF (Data = 0x4A0C)
Starting target CPU...
Reading all registers
Read 4 bytes @ address 0x0000D0AE (Data = 0x4B04BE00)
Read 4 bytes @ address 0x2000120C (Data = 0x00016AE1)
Read 4 bytes @ address 0x2000120C (Data = 0x00016AE1)
Read 4 bytes @ address 0x00016AE0 (Data = 0x4D0FB538)

========================================================================================

Reply via email to