How dose KDS read MCU regisers as bytes ?

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

How dose KDS read MCU regisers as bytes ?

Jump to solution
1,985 Views
haidong_zheng
NXP Employee
NXP Employee

How dose KDS read MCU regisers as bytes ?

For example I need read K22 UART0 register from 0x4006a000 which should be read as bytes . I found I almost can't do it in KDS!   While this feature is easily done in IAR and this is a must feature.

Dose I miss something for this ?

Please see below picture:

16644_16644.pngsnapshot27.png

Labels (1)
0 Kudos
Reply
1 Solution
1,632 Views
BlackNight
NXP Employee
NXP Employee

You cannot control this in the Memory view, as this is independent of the underlying hardware. The memory view sends a request to the underlying GDB/debugger to read a chunk of memory, and it is then up to the GDB how it reads that memory. For performance reasons, of course GDB will use the most efficient way to read it (words).

So if you want to have byte access, you need to use a plugin like the EmbSysReg viewer which can read it close to the hardware.

Erich

View solution in original post

0 Kudos
Reply
9 Replies
1,632 Views
jack
Contributor III

hi Hai dong,

You can right click memory view, and then select "Format" in the context menu. In the popup dialog, Select Column size as 1 and click OK. Then you can read memory with byte size.

Jack

0 Kudos
Reply
1,632 Views
haidong_zheng
NXP Employee
NXP Employee

Hi Ruiyuan:

I have tried this."colume size as 1 "   but I can't read the registers !

0 Kudos
Reply
1,632 Views
jack
Contributor III

hi Haidong,

I am not sure if KDS support reading memory-mapped registers in memory view. If you need to read peripheral register in KDS, you can install the EmbSysRegView by following the steps showed in Mr styger's blog. With that you can have a way to inspect peripheral registers under debug in KDS.

How to Add Register Details View in Eclipse | MCU on Eclipse

Jack

0 Kudos
Reply
1,632 Views
haidong_zheng
NXP Employee
NXP Employee

Hi Ruiyuan:

I have installed the EmbSysRegView, this plugin still could not change KDS how to read register, and it could not read UART registers also.

I just need know how KDS read registers byte by byte and how could I read UART register.

0 Kudos
Reply
1,632 Views
BlackNight
NXP Employee
NXP Employee

In the EmbSysRegView, you need first to double click on the item (so it gets green) in order to read the register values. See http://mcuoneclipse.com/2014/05/29/how-to-add-register-details-view-in-eclipse/

Erich

1,632 Views
YixingKong
Senior Contributor IV

Erich, please keep working on the customer's further question.

Thanks,

Yixing

0 Kudos
Reply
1,633 Views
BlackNight
NXP Employee
NXP Employee

You cannot control this in the Memory view, as this is independent of the underlying hardware. The memory view sends a request to the underlying GDB/debugger to read a chunk of memory, and it is then up to the GDB how it reads that memory. For performance reasons, of course GDB will use the most efficient way to read it (words).

So if you want to have byte access, you need to use a plugin like the EmbSysReg viewer which can read it close to the hardware.

Erich

0 Kudos
Reply
1,632 Views
haidong_zheng
NXP Employee
NXP Employee

Hi Styger:

I have retried EmbSysRegView plugin again. This plugin could correctly read UART registers byte by byte.

But for KDS itself, could it do this way ?

Thanks!

0 Kudos
Reply
1,632 Views
YixingKong
Senior Contributor IV

guojia, are you able to help this issue please?

Thanks,

Yixing

0 Kudos
Reply