ARM_Gdbserver does not flash FRMD-KL46Z

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ARM_Gdbserver does not flash FRMD-KL46Z

1,010 Views
sándorbognár
Contributor I

Hi!

The  ARM_FlashProgrammer works fine and flashes the KL46Z, but ARM_Gdbserver gives this errror!

For KL25Z works fine.

Thanks,

Sándor

(gdb) load
Loading section .interrupts, size 0xc0 lma 0x0
Loading section .cfmprotect, size 0x10 lma 0x400
Loading section .text, size 0xd01c lma 0x410
Loading section .data, size 0x534 lma 0xd42c
Loading section .romp, size 0x18 lma 0xd960
Start address 0xbf71, load size 54840
qTStatus: Target returns error code 'FF:Closing connection'.
qTStatus: Remote connection closed
Transfer rate: 548 bytes/sec, 1713 bytes/write.
(gdb)

Welcome to USBDM GDB server
Using required USBDM interface S/N = 'USBDM-OPENSDA-13822'
Server created @localhost:1234

=====================================
New client connection from localhost:53321 accepted
Loading register description from device database
BDM Open OK
Sending target description
Sending register description
Reading Registers
Reading Memory[BF70..BF73]
Reading Memory[A58..A59]
Reading Memory[A58..A59]
Erasing flash[0..DBFF] - ignored
Creating flash image
Writing to flash image[0..BF]
Writing to flash image[400..40F]
Writing to flash image[410..BAF]
Writing to flash image[BB0..134F]
Writing to flash image[1350..1ADF]
Writing to flash image[1AE0..226F]
Writing to flash image[2270..29FF]
Writing to flash image[2A00..317F]
Writing to flash image[3180..390F]
Writing to flash image[3910..40AF]
Writing to flash image[40B0..484F]
Writing to flash image[4850..4FEF]
Writing to flash image[4FF0..576F]
Writing to flash image[5770..5F0F]
Writing to flash image[5F10..669F]
Writing to flash image[66A0..6E2F]
Writing to flash image[6E30..75CF]
Writing to flash image[75D0..7D4F]
Writing to flash image[7D50..84EF]
Writing to flash image[84F0..8C7F]
Writing to flash image[8C80..93FF]
Writing to flash image[9400..9B8F]
Writing to flash image[9B90..A31F]
Writing to flash image[A320..AABF]
Writing to flash image[AAC0..B24F]
Writing to flash image[B250..B9CF]
Writing to flash image[B9D0..C15F]
Writing to flash image[C160..C8FF]
Writing to flash image[C900..D0AF]
Writing to flash image[D0B0..D42B]
Writing to flash image[D42C..D95F]
Writing to flash image[D960..D977]
Programming Flash Image failed: Target device does not agree with selected

=====================
Dropped connection

0 Kudos
5 Replies

459 Views
pgo
Senior Contributor V

Hi Sandor,

the line

Target device does not agree with selected

indicates the incorrect device is selected.

How are you selecting the device?  If you are starting the debugger from Eclipse you need to set the device there.  If you are running it stand-alone then you need to select it in the Debugger dialogue.

bye

0 Kudos

459 Views
sándorbognár
Contributor I

Hi PGO,

thank you for your answer.

I auto select  the device by pressing detect chip button.p7.png

p8.png

Unfortunately I found an other issue with gdbserver.

I flashes the KL46Z by ARM_FlashProgrammer.

Start the gdbserver.

Debug the program.

BUT the debugger able to read only 16k of rams.

In case of KL46Z, ram starts at 0x1fffe000 ends 0x20006000, but the debugger only see up to 0x20002000.

For this small test program I must set the end of stack to 0x20002000  to see the local variables and to be able to step the program correctly.

p9.png

Yesterday I compiled your latest OPEN_SDA firmware from your git because I've seen your new commits, but the situation is the same.

Anyway, I like very much these tools, because I work on SuSe linux and now I do not need to go to VirtualBox XP's CodeWarrior  to develop and debug.

I appreciate your hard work very much!

Thank You,

Sándor

0 Kudos

459 Views
sándorbognár
Contributor I

The ram error is found

in arm_devices.xml

      <memory id="kinetisL32K_Ram" type="ram">
         <memoryRange start="0x1FFFE000" size="16K" />
      </memory>

changed to 32k and it work well.

0 Kudos

459 Views
pgo
Senior Contributor V

Hi Sandor,

Well spotted about the RAM size - I'll update my files accordingly.

With the first problem I take it you have not installed the Eclipse plugins and you are running the GDB_Server as a stand-alone application?

Can you tell me what Operating System you are using so I can test this situation?

bye

0 Kudos

459 Views
sándorbognár
Contributor I

Hi PGO,

I work on SuSe linux 12.3,

bss@bs-s:~> uname -a
Linux bs-s.site 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba) x86_64 x86_64 x86_64 GNU/Linux

Using stand-alone GDB_Server compiled from you git.

Regards,

Sándor

0 Kudos