Segemtation Fault while trying to acess WeimNor memory in QT

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Segemtation Fault while trying to acess WeimNor memory in QT

ソリューションへジャンプ
1,527件の閲覧回数
nishad_kamdar
Contributor IV

Hi all,

 

I have a custom board having iMX6q processor and i am using Ltib L3.0.35_4.1.0

 

i have a Weimnor connected to it, at the base address 0x08000000.

 

I am able to read and write to it using memtools. However when i write try reading the same memory location using QT application,  it gives me a Segmentation fault.

 

I guess it does not allow me to access the location. Can anyone suggest how i can read the Weim Nor flash using the Qt?

 

I have attached the Qt code.

 

Help would be appreciated.

 

regards,

nishad

Original Attachment has been moved to: mainwindow.cpp.zip

ラベル(2)
0 件の賞賛
返信
1 解決策
1,351件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

The NOR flash should be probed under /dev/mtdx block. In order to read/write in userspace you should open a file descriptor that points to the correct node and then perform read/write operations into the NOR flash: For example:

cat  file.bin > /dev/mtd0


Regards,


Fabio Estevam

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,352件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

The NOR flash should be probed under /dev/mtdx block. In order to read/write in userspace you should open a file descriptor that points to the correct node and then perform read/write operations into the NOR flash: For example:

cat  file.bin > /dev/mtd0


Regards,


Fabio Estevam

0 件の賞賛
返信