Hi Peter,

On Fri, Jun 16, 2017 at 04:10:52PM -0700, Peter Jones wrote:
> It's very likely that I'm doing something wrong so I'm reaching out for
> help.  All I want to do right now is to get Blinky working on an nRF52.
> 
> I followed the tutorial and built the boot loader and blinky.  I then
> created an image so the boot loader would be happy about the magic
> number.
> 
> I used GDB and the Black Magic Probe to flash the boot loader ELF file
> to address offset 0x0000.  Then I used the `restore' command to flash the
> blinky IMG file to offset 0x8000.  (I debugged the jlink shell scripts
> to figure this out.)
> 
> At this point I would expect that resetting the board would cause the
> LED to blink once a second.  Of course, that's not happening.
> 
> So I started GDB, used the `file' command to load symbols from the boot
> loader ELF file, and restarted the boot loader with `run'.  That's when
> I get:
> 
> 
>   Program received signal SIGSEGV, Segmentation fault.
>   os_pkg_init () at repos/apache-mynewt-core/kernel/os/src/os.c:223
>   
> 
> I stepped through the code and I end up inside `os_start' which appears
> to only have `assert(0)' as its body (because `#if
> MYNEWT_VAL(OS_SCHEDULING)').

Your procedure sounds correct to me, so I'm afraid I don't have an
explanation.  I am not familiar with the black magic probe, though.

The behavior you described is definitely unexpected.  The boot loader
should not call os_start() at all; it should jump to the image's start
up code instead.

Could you paste a stack trace at the point of failure?

Thanks,
Chris

Reply via email to