Reading the NOR flash data by MFG tool.

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

Reading the NOR flash data by MFG tool.

Jump to solution
2,405 Views
keitanagashima
Senior Contributor I

Dear Sir or Madam,

I'd like to read the data which is written in NOR FLASH and transfer the data to own PC.

Refer to following xml file.

ucl2.xml file;

------------------------

...

<CMD state="Updater" type="push" body="$ dd if=/dev/mtdblock0 of=NorImage">read NorFlash</CMD>

<CMD state="Updater" type="push" body="read NorImage" file="OutPutNor">receiving NorImage</CMD>

<CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>

------------------------

Line 1 looks successful that it write the contents of NOR Flash to "NorImage" file on Linux file system.

But, Line 2 looks fail (Transfer the "NorImage" file to PC).

Does anyone find this issue?

Keita

Labels (4)
0 Kudos
1 Solution
1,490 Views
YixingKong
Senior Contributor IV

Keita

Response from R&D:

-------------------------------------

Read function just support below 64k file size

-------------------------------------


View solution in original post

0 Kudos
12 Replies
1,490 Views
jimmychan
NXP TechSupport
NXP TechSupport

Please see this for reference:

Re: MFG tool. Is it possible to read from flash

0 Kudos
1,490 Views
keitanagashima
Senior Contributor I

Dear Jimmy,

I referred to your link.

But, there was only MFG tool for i.MX53.

The structure of MFG tool for i.MX6 and one for i.MX53 was different.

I found description of "pull" - Does UtpRead(body, file) transaction in ucl2.xml.

And, refer to the following code.

=====

<LIST name="test" desc="for KM500">

    <CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot-mfg.bin" >Loading U-boot for KM500</CMD>

    <CMD state="BootStrap" type="load" file="uImage-mfg" address="0x10800000"

        loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Kernel.</CMD>

    <CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot" address="0x10C00000"

        loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Initramfs.</CMD>

    <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

    <CMD state="Updater" type="push" body="$ dd if=/dev/mtdblock0 of=NorFile.bin">read nor</CMD>

    <CMD state="Updater" type="push" body="read NorFile.bin" savedfile="NorFile.bin">Getting uboot bin</CMD>

    <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>

</LIST>

=====

[Result]

The contents of NOR FLASH could save.

But, it couldn't read the data which is written in NOR FLASH and transfer the data to own PC.


[Question]

Could you tell me the way of adding a pull feature to ucl2.xml?

Or, give me some information.

Keita

0 Kudos
1,490 Views
israelpz
Senior Contributor I

Hi Keita,

Maybe is going to sound silly but did you try to use a absolute path instead of a relative?

I going to test it today in order to check if the read command had a issue.

Regards,

-Israel.

0 Kudos
1,490 Views
keitanagashima
Senior Contributor I

Dear Israel,

Hello.

Do you have any update?

Keita

0 Kudos
1,490 Views
israelpz
Senior Contributor I

Keita San,

Sorry for the delay. I already test it 5 times and seem this feature is not working as you mention.

I going to report this to R&D in order to fix this issue.

Regards,

-Israel.

0 Kudos
1,490 Views
keitanagashima
Senior Contributor I

Dear Israel,

I appreciate for your support.

OK. I wait the R&D's answer.


Keita

0 Kudos
1,490 Views
karina_valencia
NXP Apps Support
NXP Apps Support

From R&D:

Read function just support below 64k file size

0 Kudos
1,490 Views
keitanagashima
Senior Contributor I

Dear Karina,

Thank you for your reply.

> From R&D:

> Read function just support below 64k file size

I understood this limitation.

But, I have additional questions.

[Q1]

When transferring within 64 KB, following CMD format right?

=====

<LIST name="test" desc="for KM500">

    <CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot-mfg.bin" >Loading U-boot for KM500</CMD>

    <CMD state="BootStrap" type="load" file="uImage-mfg" address="0x10800000"

        loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Kernel.</CMD>

    <CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot" address="0x10C00000"

        loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Initramfs.</CMD>

    <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

    <CMD state="Updater" type="push" body="$ dd if=/dev/mtdblock0 of=NorFile.bin">read nor</CMD>

    <CMD state="Updater" type="push" body="read NorFile.bin" savedfile="NorFile.bin">Getting uboot bin</CMD>

    <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>

</LIST>

=====

[Q2]

Could you show me the general specified example of CMD?

[Q3]

The source code of MFG Tool is published.

If modifying the source code, is it possible to exceed 64 KB limitation?

Keita

0 Kudos
1,490 Views
karina_valencia
NXP Apps Support
NXP Apps Support

AlejandroSierra can you continue with the  follow up?

0 Kudos
1,490 Views
keitanagashima
Senior Contributor I

Could someone follow up the question?

Keita

0 Kudos
1,491 Views
YixingKong
Senior Contributor IV

Keita

Response from R&D:

-------------------------------------

Read function just support below 64k file size

-------------------------------------


0 Kudos
1,490 Views
karina_valencia
NXP Apps Support
NXP Apps Support

AlejandroSierra do you have an update?

0 Kudos