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

JLink action error -make: [flash] Error 1 (ignored)

Dear all: when i use nrf51-pure-gcc , and make to build bin/hex and elf files.

but when i to use JLink to flash (make flash , flash-softdevice and erase-all),it not action which return erro make: [flash] Error 1 (ignored).

steventekiMacBook-Pro:pure-gcc stevenlin$ make flash JLinkExe -device nrf51822_xxab -if swd -speed 100 -SelectEmuBySn 518001xxx flash.jlink SEGGER J-Link Commander V4.84a ('?' for help) Compiled Apr 4 2014 17:56:34

Script file read successfully. Emulator with USB serial number 518001441 selected. Info: Device "NRF51822_XXAB" selected (129 KB flash, 16 KB RAM). DLL version V4.84a, compiled Apr 4 2014 17:56:29 Firmware: J-Link Lite-Cortex-M V8 compiled Aug 29 2012 15:24:23 Hardware: V8.00 S/N: 518001xxx Feature(s): GDB VTarget = 2.937V Info: Found SWD-DP with ID 0x0BB11xxx Info: Found Cortex-M0 r0p0, Little endian. Info: FPUnit: 4 code (BP) slots and 0 literal slots Found 1 JTAG device, Total IRLen = 4: Cortex-M0 identified. Target interface speed: 100 kHz Processing script file...

Reset delay: 0 ms Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.

Downloading file... [_build/ble_app_hrs_s110.bin] Info: J-Link: Flash download: Flash download into internal flash skipped. Flash contents already match

Reset delay: 0 ms Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.

Script processing completed.

make: [flash] Error 1 (ignored)

platform: Soc : nrf51822 QFABA0(128K ROM,16K RAM) develop tools: gcc-arm-none-eabi-4_8-2014q1 and nrf51_sdk_v5_2 Related files:(s110.ld, startup.s and makefile)

make files:

List all source files the application uses.

APPLICATION_SRCS = $(notdir $(wildcard ../*.c)) APPLICATION_SRCS += app_gpiote.c APPLICATION_SRCS += app_button.c APPLICATION_SRCS += app_timer.c APPLICATION_SRCS += ble_advdata.c APPLICATION_SRCS += ble_conn_params.c APPLICATION_SRCS += pstorage.c APPLICATION_SRCS += ble_bondmngr.c APPLICATION_SRCS += ble_bas.c APPLICATION_SRCS += ble_dis.c APPLICATION_SRCS += ble_hrs.c APPLICATION_SRCS += ble_srv_common.c APPLICATION_SRCS += crc16.c APPLICATION_SRCS += softdevice_handler.c

PROJECT_NAME = $(shell basename "$(realpath ../)")

DEVICE = NRF51 BOARD = BOARD_NRF6310 SEGGER_SERIAL = 518001xxx

USE_SOFTDEVICE = s110 SOFTDEVICE = $(HOME)/nrf51/tools/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0_softdevice.hex SDK_PATH = $(HOME)/nrf51/tools/nrf51_sdk_v5_2/nrf51822/ TEMPLATE_PATH = $(HOME)/nrf51/tools/nrf51_sdk_v5_2/nrf51822/template/

CFLAGS = -Os

GDB_PORT_NUMBER = 2331

include $(TEMPLATE_PATH)Makefile

gcc_nrf51_s110.ld

/* Linker script to configure memory regions. / MEMORY { FLASH (rx) : ORIGIN = 0x14000, LENGTH = 0xC000 / 80 kB is taken by S110, 176 kB for app. / RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000 / 8 kB is taken by S110,8 kB for app. */ } INCLUDE "gcc_nrf51_common.ld"

gcc_nrf51_common.ld

/* Library configurations */ GROUP(libgcc.a libc.a libm.a libnosys.a)

/* Linker script to place sections and symbol values. Should be used together

  • with other linker script that defines memory regions FLASH and RAM.
  • It references following symbols, which must be defined in code:
  • Reset_Handler : Entry of reset handler
  • It defines following symbols, which code can use without definition:
  • __exidx_start
  • __exidx_end
  • __etext
  • data_start
  • __preinit_array_start
  • __preinit_array_end
  • __init_array_start
  • __init_array_end
  • __fini_array_start
  • __fini_array_end
  • data_end
  • bss_start
  • bss_end
  • end
  • end
  • __HeapLimit
  • __StackLimit
  • __StackTop
  • __stack */ ENTRY(Reset_Handler)

SECTIONS { .text : { KEEP(*(.isr_vector)) (.text)

KEEP((.init)) KEEP((.fini))

/* .ctors */ *crtbegin.o(.ctors) *crtbegin?.o(.ctors) *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) (SORT(.ctors.)) *(.ctors)

/* .dtors */ *crtbegin.o(.dtors) *crtbegin?.o(.dtors) *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) (SORT(.dtors.)) *(.dtors)

(.rodata)

KEEP((.eh_frame)) } > FLASH

.ARM.extab : { (.ARM.extab .gnu.linkonce.armextab.*) } > FLASH

__exidx_start = .; .ARM.exidx : { (.ARM.exidx .gnu.linkonce.armexidx.*) } > FLASH __exidx_end = .;

__etext = .;

.data : AT (__etext) { data_start = .; *(vtable) (.data)

. = ALIGN(4); /* preinit data */ PROVIDE (__preinit_array_start = .); *(.preinit_array) PROVIDE (__preinit_array_end = .);

. = ALIGN(4); /* init data */ PROVIDE (__init_array_start = .); (SORT(.init_array.)) *(.init_array) PROVIDE (__init_array_end = .);

. = ALIGN(4); /* finit data */ PROVIDE (__fini_array_start = .); (SORT(.fini_array.)) *(.fini_array) PROVIDE (__fini_array_end = .);

. = ALIGN(4); /* All data end */ data_end = .;

} > RAM

.bss : { bss_start = .; (.bss) *(COMMON) bss_end = .; } > RAM

.heap : { end = .; end = end; (.heap) __HeapLimit = .; } > RAM

/* .stack_dummy section doesn't contains any symbols. It is only

  • used for linker to calculate size of stack sections, and assign
  • values to stack symbols later */ .stack_dummy : { *(.stack) } > RAM

/* Set stack top to end of RAM, and stack limit move down by

  • size of stack_dummy section */ __StackTop = ORIGIN(RAM) + LENGTH(RAM); __StackLimit = __StackTop - SIZEOF(.stack_dummy); PROVIDE(__stack = __StackTop);

/* Check if data + heap + stack exceeds RAM limit */ ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") }

flash.jlink

r loadbin _build/ble_app_hrs_s110.bin 00014000 r g exit

startup_nrf51.s

Parents Reply Children
No Data
Related