Thursday, April 19th 2018, 1:57pm UTC+2

You are not logged in.

  • Login
  • Register

mingfeng_wu

Beginner

Date of registration: Mar 22nd 2018

Posts: 5

1

Friday, March 23rd 2018, 5:11am

"Error: PC of target system has unexpected value after Verifying sector. (PC = 0x0000029C)! " when download into External Flash.

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


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. This two flash loader(see attachment) can work well in Keil uVision 5 + J-Link.
And here is my JLinkDevices.xml: (see attachment)
<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


Question 1.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:AddressData0x6002000001 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00


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


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




Best Regards
Wilson

mingfeng_wu

Beginner

Date of registration: Mar 22nd 2018

Posts: 5

2

Monday, March 26th 2018, 3:49am

Hi,

I encountered some problems when I was uploading files. I can't upload any attachments.
Is there another way I can send attachments to you?

Sorry, it is unclear about "Question 1" in previous post.
Revised as follows,
Question 1.
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: 0x60020000-0x6002000F, Data: 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00

Best Regards
Wilson

This post has been edited 1 times, last edit by "mingfeng_wu" (Mar 26th 2018, 4:17am)


SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 931

3

Monday, March 26th 2018, 2:55pm

Hello,

Thank you for your inquiry.
Regarding Q1:
Do you get any error messages when programming?
Are you using the same JLinkDevices.xml and flash loader when using J-Mem?
If not, J-Mem can't access the external memory and will show 00000 as data instead.

Q2:
Such an issue is not known to us.
Attachments in this forum are limited to maximum 1.05 MB in size. Make sure the file you try to upload is smaller than that or split it in multiple files.

Best regards,
Nino
Please read the forum rules before posting: Forum Rules

Keep in mind, this is not a support forum. Its main purposes is user to user interaction.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support contact us per e-mail.
The following contact form can be used for this: https://www.segger.com/about-us/contact-us/


mingfeng_wu

Beginner

Date of registration: Mar 22nd 2018

Posts: 5

4

Tuesday, March 27th 2018, 6:01am

Hi Nino,

I can upload files now, please see attachments.

Quoted

Q1:
Do you get any error messages when programming?
I get error message " ***** Error: 02-00000000-00-00014641-0053: PC of target system has unexpected value after Verifying sector. (PC = 0x0000029C)!" when programming.

In
JLinkLog.txt,
Line 411 - Line 442. It seems download into PRAM is OK.
Line 444 - Line 449. It seems download into external flash is OK.
Line 451 - Line 512. I don't understand why J-Link compares, erases and programs several times, and prints error messages.


Quoted

Are you using the same JLinkDevices.xml and flash loader when using J-Mem?
If not, J-Mem can't access the external memory and will show 00000 as data instead.
Yes, I am using the same JLinkDevices.xml and flash loader when using J-Mem.

Best regards,
Wilson
mingfeng_wu has attached the following files:
  • FlashLoader.7z (8.09 kB - 33 times downloaded - Last download: Apr 17th 2018, 6:50am)
  • JLinkDevices.7z (3.95 kB - 31 times downloaded - Last download: Apr 17th 2018, 6:50am)
  • EclipseProject.7z (89.9 kB - 31 times downloaded - Last download: Today, 8:48am)

This post has been edited 2 times, last edit by "mingfeng_wu" (Mar 27th 2018, 6:08am)


mingfeng_wu

Beginner

Date of registration: Mar 22nd 2018

Posts: 5

5

Tuesday, March 27th 2018, 6:06am

Hi Nino,

Here is my JLinkLog.txt.

Best regards,
Wilson

mingfeng_wu

Beginner

Date of registration: Mar 22nd 2018

Posts: 5

6

Tuesday, April 3rd 2018, 12:23pm

Hi Nino,
Any clue on my issue? I would be very grateful for your suggestions.
Best regards,
Wilson

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 931

7

Wednesday, April 11th 2018, 9:36am

Hello Wilson,

if it is working with keil but not with Eclipse it is most likely a project setup issue.
From J-Link perspective everything is working correctly and J-Link does what the IDEs tell it to do.
Please understand that we can't put more time into this as this is not J-Link related issue.
We recommend using another IDE (e.g. Embedded Studio) or to get in contact with Eclipse support.

Regarding J-Mem. Check if you can read any of the external memory in the memory window of the IDE. If not J-Mem will also not be able to access it
which could point to a incorrect flash loader or the loaded application disabling access to the memory after download.

Best regards,
Nino
Please read the forum rules before posting: Forum Rules

Keep in mind, this is not a support forum. Its main purposes is user to user interaction.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support contact us per e-mail.
The following contact form can be used for this: https://www.segger.com/about-us/contact-us/