Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Flash download related issues when using GDB SEGGER J-Link Debugging plugin + Cortex-M0 device
Flash download related issues when using GDB SEGGER J-Link Debugging plugin + Cortex-M0 device [message #1785655] Wed, 18 April 2018 05:42
Wilson Wang is currently offline Wilson WangFriend
Messages: 4
Registered: April 2018
Junior Member
Hi,

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(see http: // wiki.segger.com/Adding_Support_for_New_Devices, please remove space in link). This two flash loader(see attachment FlashLoader.7z) can work well in Keil uVision 5 + J-Link.

And here is my JLinkDevices.xml(see attachment 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(see attachment EclipseProject.7z), 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(see attachment JLinkLog.txt).

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

Best Regards
Previous Topic:Function in included header file won't work
Next Topic:Can't create build target
Goto Forum:
  


Current Time: Wed Sep 19 13:27:47 GMT 2018

Powered by FUDForum. Page generated in 0.01603 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top