Eclipse + GDB SEGGER J-Link Debugging plugin + Cortex-M0 device

0

I am trying to use the J-Link Flash loader in the following setup:
- Eclipse IDE for C/C++ Developers Oxygen Release (4.7.0)
- GNU Tools ARM Embedded(Compiler, Linker)
- GDB SEGGER J-Link Debugging plugin
- J-Link software V6.30h
- J-Link Hardware version: V9.20
- Our Cortex-M0 Device

But I got error message from J-Link log:
"Error: PC of target system has unexpected value after Verifying sector. (PC = 0x0000029C)! " when download into External Flash.

The memory map of device is:
- 0x00000000-0x0000FFFF: PRAM(Contains the main application)
- 0x20002000-0x20005FFF: SRAM(Working RAM)
- 0x60000000-0x607FFFFF: External Flash

I use the flash loader and add support for new devices to the J-Link DLL[Link]. This two flash loader[flash loader 1][flash loader 2] can work well in Keil uVision 5 + J-Link.

And here is my JLinkDevices.xml:

<DataBase>
  ...
  <Device>
    <ChipInfo Vendor="SONiX" Name="SNC7312" WorkRAMAddr="0x20002000" WorkRAMSize="0x4000" Core="JLINK_CORE_CORTEX_M0"/>
    <FlashBankInfo Name="Code Flash" BaseAddr="0x00000000" MaxSize="0x10000" Loader="Devices/SONiX/SNC7312_PRAM2Flash_160422.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
    <FlashBankInfo Name="Data Flash" BaseAddr="0x60000000" MaxSize="0x800000" Loader="Devices/SONiX/SNC7312_SPIFLASH_160421.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
  </Device>
  ...
</DataBase>  

My eclipse based project is in attachment, which memory map is:
Memory Configuration:

Name      Origin     Length     Attributes
FLASH     0x00000000 0x00010000 xr
RAM       0x20000000 0x00010000 xrw
CCMRAM    0x10000000 0x00000000 xrw
FLASHB1   0x00000000 0x00000000 xr
EXTMEMB0  0x00000000 0x00000000 xr
EXTMEMB1  0x00000000 0x00000000 xr
EXTMEMB2  0x00000000 0x00000000 xr
EXTMEMB3  0x00000000 0x00000000 xr
MYVARS    0x60020000 0x00800000 xrw
*default* 0x00000000 0xffffffff  

Q1:
So far, I can download into PRAM(0x00000000-0x0000FFFF), but can't download into External Flash(0x60000000-0x607FFFFF).
I checked memory 0x60020000-0x6002000F in Eclipse memory window or J-Mem V6.30h, it always 0.
But it should like this:

Address    Data
0x60020000 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00  

Q2:
I find error message "PC of target system has unexpected value after Verifying sector. (PC = 0x0000029C)!" in J-Link Log.

Any advice on how to download into the External Flash? I would be grateful for any suggestions.

Best Regards

eclipse
eclipse-plugin
cortex-m
jlink
asked on Stack Overflow Apr 16, 2018 by Wilson

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0