[Open source] the whole network to share the easiest-to-use programming tool designed imx6ull & Works Design & Thinking Before

Before the open source programming tools, one thing must be warm reminder:

1. thanks to the support of many students, before production 100ASK_IMX6ULL development board sold out. March 15 is expected to have a spot.

100ASK_IMX6ULL development board Leverage quality, a hardware BUG at all.

Affected by the epidemic, the delay in production.

To thank customers willing to wait, during the pre-sale, quality, not price : the CPU clock speed of 528MHZ upgrade to 792 MHz .

After the pre-sale price 20 yuan.

Buy now you can still enjoy [20] hair cut circle of friends discount: 349 yuan can buy imx6ull board 792MHZ clock speed. Inexpensive.

If it is not affected by the outbreak, we do not want to push version 792MHZ, after all, 20 yuan more expensive, because we have to do is affordable boutique.

528MHZ there is no difference in learning,

Certainly preferred 528MHZ of work: adequate supply, low prices, the goods at any time.

For customers:

CPU clock speed of 528MHZ upgrade to 792MHZ, the effect is not very different,

This time you can have done to learn a lot of.

For new customers:

Around March 15 issued by the development board CPU clocked at 528MHZ upgrade to 792MHZ, will not increase during the pre-sale;

After the pre-sale price 20 yuan.

2.IMX6ULL chip from the 2017 release, has been 3 years.

With the manufacturers or the original feature of mfgtools, 500M image file programming at least 5 minutes, slow

Kernel upgrade, upgrade device tree, then the need to develop board cable, the Ubuntu open, too complicated step.

Who can improve? To this GUI, Uboot, file systems have produced in-depth study.

We launched the "100ask_imx6ull_flashing_tool",

Whether it is practical or download speeds are spike mfgtools, programming 500M image file only takes 1 minute, 5 times faster!

There fool of operation of the basic version, easy to use, one-button programming, updating,

A professional version supports all peers IMX6ULL board, supporting more: Run the bare metal, upload any files.

Focus: completely open source

Does someone have this strength?

3. Do you think that only these? Far more than ...

Nearly 30 more than the bare metal upcoming experiment , EMMC bare metal programming, SD card bare metal programming. . . .

After reading these bare metal source / document, you certainly can master complex EMMC, SD card agreement.

100ask_imx6ull sale Buy Link & Products:

http://100ask.taobao.com (opening the shop home page of the first poster you can enter the purchase page)

Here Insert Picture Description

Good news announcement, then focus on the open-source programming tool 100ask_imx6ull_Flashing tool.

100ask_imx6ull_Flashing tool (hereinafter: ask a hundred net) from Shenzhen Hundred Questions Network Technology Co., Indie, belongs to all network Hundred Questions and retains all rights to this manual. The following comes from [100ask_imx6ull programming tool designed for use with .docx]. This document and 100ask_imx6ull_Flashing tool full source code can be obtained from the following website (1 or 2 can be, the same content):

  1. https://github.com/100askTeam/gui_for_nxp_uuu
  2. https://weidongshan.coding.net/p/gui_for_nxp_uuu/git
    (if github download slower, can be downloaded from the domestic coding website)

Here is the article directory, about 5,000 words, you can look at the collection.

table of Contents

1. Why re-development programming tools

2. The principle

3.uuu use examples

3.1 download and run bare metal program (uboot also bare metal)

3.2 programming led.imx to EMMC

4. special Uboot

5.EXT4 file systems to create Notes

5.1 Use Buildroot make image file

5.2 Use mkfs.ext4 make image file

6.100ASK_IMX6ULL_Flashing_tool instructions

6.1 Basic Edition: dedicated to 100ASK_IMX6ULL

6.2 Professional Edition: more powerful, more flexible and suitable for all boards

Thinking Before 7.100ASK_IMX6ULL_Flashing_tool design

Basic Edition 7.1

7.1.1 determining whether the device is connected: the entire process should be monitored

Firmware 7.1.2 to determine whether the device is already running

7.1.3 programming of the entire system

7.1.4 update the kernel

7.1.5 update the device tree

7.1.6 update Uboot

7.1.7 bare metal programming

7.1.8 users to upload files to the root directory

7.2 Professional Edition

7.2.1 determining whether the device is connected: the entire process should be monitored

Firmware 7.2.2 to determine whether the device is already running

Running firmware 7.2.3 / bare metal

7.2.4 programming boot / bare metal

7.2.5 programming of the entire system

7.2.6 upload any file

Other versions of 8.GUI

1. Why re-development programming tools

NXP company to IMX6ULL development board provides programming tools: mfgtools. Its user interface is as follows:

Here Insert Picture Description

Operation is very simple, one-button programming the entire image file.

However, there are many shortcomings:

a. not burning bootloader, kernel, alone device tree

Or, you can achieve these functions, but you need to modify the xml configuration file for beginners unfriendly, also appears on the veteran trouble.

b. Writing is slow

500M programming system, takes five minutes (our tool can burn down in one minute).

Based on the above shortcomings, we decided to develop their own programming tools 100ask_imx6ull_flashing_tool, and completely open source. It has the following characteristics:

a. the whole system can be programmed, may be programmed bootloader, kernel, alone device tree

b. Users can upload files to the development board system in any directory

c. fast programming speed is 5 times the original tool mfgtools

. D supports all manufacturers of boards programming, note: not only support 100ask_imx6ull

Its interface is as follows, there are Basic, Professional Edition two pages:
Here Insert Picture Description

2. The principle

IMX6ULL itself supports USB 1.1 PC to the development board that is downloaded via the USB cable, run the program. Then we can download a special program that supports:

a. receiving files via USB cable to PC

b. PC commands received through the USB cable

c. Writing board according to the commands

So we need two software: PC software, a special program. As shown below (imx6ull boot ROM program that it runs automatically when cured inside the chip is provided to USB mode):
Here Insert Picture Description

Outset, PC software by SDP protocol to IMX6ULL chip download, run a specially crafted program, SDP protocol is IMX6ULL manufacturers own accord.

A special program to support Fastboot protocol, which is commonly used in Android Brush agreement. After this program up and running, PC software via FB protocol to communicate with it, you can download files, send commands.

After a special program receives the command, you can go to the programming system.

Fortunately, NXP has supplied PC software, called uuu: UniversalUpdate Utility (aka mfgtools 3.0).

Fastboot protocol support have u-boot source code, but unfortunately not quite fit with uuu, need to do a lot of changes.

We also achieved a download to the u-boot file by uuu, u-boot by programming FAT, EXT4 partitions. Unfortunately, u-boot does not support some of the new features EXT4, so when EXT4 file system also needs to make some changes.

So we have to do is:

a. To the u-boot, with uuu with it more smoothly.

b. Modify the production method EXT4 file system, remove the characteristic u-boot unsupported

c. to write GUI interface, easier to use.

3.uuu use examples

Give uuu modify supporting u-boot, give it to write GUI, the first thing of course, is familiar with uuu: the first with the command line.

uuu The GITHUB address:

https://github.com/NXPmicro/mfgtools

There is also a compiled executable: uuu.exe (Windows use), uuu (Linux use), there is a uuu.pdf.

3.1 download and run bare metal program (uboot also bare metal)

We already have an existing program and uboot LED bare metal in GITHUB, you can run directly.

First, the development board to USB boot mode, not inserted SD / TF card, and power-on:
Here Insert Picture Description

Then, operation of FIG press:
Here Insert Picture Description

The figure above command ".. \ Bin \ uuu.exe \ files \ led.imx" will execute the inline script similar to the following command:

.\bin\uuu.exe SDP: boot -f ".\files\led.imx"

SDP is a protocol, uuu by SDP protocol bootROM communication with the board;

boot is a command, pledged to start, followed by the "-f" indicate which file you want to start.

You can also write it to a script file, such as led.clst (suffix meaning clst: commandlist):

uuu_version 1.2.39

SDP: boot -f “.\files\led.imx”

SDP: done

clst file, the first line must be written uuu_version, indicating that it applies the minimum version number.

Then execute the following command line can also achieve the same effect:

.\bin\uuu.exe led.clst

3.2 programming led.imx to EMMC

uuu does not have the programming function, it relies on a special program: Fastboot protocol support uboot.

In GITHUB we also provide the uboot.

Development board is a USB mode is started, and open the command line, the following operations can be programmed into the led.imx EMMC:

.\bin\uuu.exe -b emmc .\firmware\u-boot-dtb_fastboot_100ask.imx .\files\led.imx

Command parsing:

. A "-b emmc": burnemmc, programming EMMC

. B need the help of special procedures:. \ Firmware \ u-boot-dtb_fastboot_100ask.imx

c. Writing Who? . \ Files \ led.imx

This command will actually use embedded script programming, you can perform "\ bin \ uuu.exe -bshow emmc." View script with the following results:

uuu_version 1.2.39

#@_flash.bin | bootloader

#@_image [_flash.bin] | image burn to emmc, default is the same as bootloader

#This command will be run when i.MX6/7i.MX8MM, i.MX8MQ

SDP: boot -f _flash.bin

#This command will be run when ROM support streammode

#i.MX8QXP, i.MX8QM

SDPS: boot -f _flash.bin

#These commands will be run when use SPL andwill be skipped if no spl

#SDPU will be deprecated. please use SDPVinstead of SDPU

#{

SDPU: delay 1000

SDPU: write -f _flash.bin -offset 0x57c00

SDPU: jump

#}

#These commands will be run when use SPL andwill be skipped if no spl

#if (SPL support SDPV)

#{

SDPV: delay 1000

SDPV: write -f _flash.bin -skipspl

SDPV: jump

#}

FB: ucmd setenv fastboot_dev mmc

FB: ucmd setenv mmcdev ${emmc_dev}

FB: ucmd mmc dev ${emmc_dev}

FB: flash bootloader _image

FB: ucmd if env exists emmc_ack; then ; elsesetenv emmc_ack 0; fi;

FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 10

FB: Done

This script supports IMX6, IMX7, IMX8MM, IMX8Q, we only care about IMX6ULL, the script could be trimmed to burn_led.clst, reads as follows:

uuu_version 1.2.39

SDP: boot -f .\firmware\u-boot-dtb_fastboot_100ask.imx

FB: ucmd setenv fastboot_dev mmc

FB: ucmd setenv mmcdev ${emmc_dev}

FB: ucmd mmc dev ${emmc_dev}

FB: flash bootloader .\files\led.imx

FB: ucmd if env exists emmc_ack; then ; else setenvemmc_ack 0; fi;

FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 10

FB: Done

We can see that in addition to start a special Uboot using protocols other than SDP, with this agreement is to use FB Uboot the communication. These FB commands give an example to explain:
Here Insert Picture Description

From these scripts shows that more uuu when downloading files via the FB Uboot protocol to send commands; the core is Uboot, dirty work so hard is Uboot do.

4. special Uboot

Modify the description have the time to fix the main reference uuu.pdf, as well as add environment variables based on the script uuu embedded.

In GITHU already it has changed a good source code, compiled as follows (in your PATH tool chain might differ with us, please modify their own):

export ARCH=arm

export CROSS_COMPILE=arm-linux-gnueabihf-

exportPATH=$PATH:/home/book/100ask_imx6ull-sdk/ToolChain/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin

cd uboot-imx_fastboot

cp config_ok .config

make

cp u-boot-dtb.imx u-boot-dtb_fastboot_100ask.imx

The resulting u-boot-dtb_fastboot_100ask.imx file is a special Uboot, our programming tools already placed the file in the firmware directory.

5.EXT4 file systems to create Notes

Our powerful GUI, you can put any file on the PC issued Uboot, and then with its ext4write commands programmed into any directory on the board.

But Uboot support for EXT4 did not keep pace with Linux, it does not support new features such as: metadata_csum. So when making EXT4 image files on your PC, you want to remove this feature.

5.1 Use Buildroot make image file

Execute make menuconfig in Buildroot source directory, you can add options as shown below:
Here Insert Picture Description

5.2 Use mkfs.ext4 make image file

We sometimes use to make EXT4 mkfs.ext4 image, mkfs.ext4 versions of the Linux system is relatively low, it should not support metadata_csum characteristics, so do not add special options. Tested: 1.43 and below the mkfs.ext4 do not need special settings.

For higher than 1.43 mkfs.ext4, the production of the image file to add the parameter "-O ^ metadata_csum", which is prohibited metadata_csum meaning, such as:

dd if=/dev/zero of=rootfs.ext4 bs=1024 count=409600

mkfs.ext4 -O ^metadata_csum rootfs.ext4

sudo mount-t ext4 rootfs.ext4 /mnt

sudo tarxjf rootfs.tar.bz2 -C /mnt

sudo umount tmp

6.100ASK_IMX6ULL_Flashing_tool instructions

100ASK_IMX6ULL_Flashing_tool uuu is GUI front-end tool, the operation more convenient. After you download the tool from GITHUB, under "100ask_imx6ull burning tools" directory, double-click to run "100ask_imx6ull_flashing_tool.exe".

It has a "Basic", "Professional Edition" two pages.

"Basic Edition" is designed specifically for 100ASK_IMX6ULL, click to complete a programming.

"Professional Edition" more powerful, in particular, it can upload files to a partition, a directory. Some manufacturers of boards, and equipment zImage tree is the first one partition, while the zImage and equipment 100ASK_IMX6ULL tree is in the second partition, so these manufacturers development board can not be used to program the basic version, need use Pro, specify the partition, specify the partition format, specify the path, and then upload the file.
Here Insert Picture Description

Note: Board must be set to USB mode, if you use SD / TF card, the card must be powered on again;

Not be the first card and then power, then power is not the first card, not the card first and then power!

6.1 Basic Edition: dedicated to 100ASK_IMX6ULL

Wiring, set USB boot as follows:

Here Insert Picture Description

Note: USB serial line connection may not be connected, connected only to observe the programming process.
Note: When set to USB boot, before you pick TF card

After reset or power board, the APP can be in operation, a graph can clear out all of the steps of:
Here Insert Picture Description

Each button action as follows:

. A programming the system: the emmc.img burn on EMMC, or burn the sdcard.img on SD / TF card;

. B update the kernel: the zImage uploaded to the root of the file system / boot directory

c update the device tree: the 100ask_imx6ull-14x14.dtb uploaded to the root of the file system / boot directory

. D Update Uboot: the u-boot-dtb.imx EMMC or programmed into the SD / TF card;

. E programming bare metal: the bare metal selected files, or programmed to EMMC SD / TF card;

. F upload files: the selected user files uploaded to the root file system / directory

6.2 Professional Edition: more powerful, more flexible and suitable for all imx6ull development board

You can select any file Pro is a powerful programming files, you can specify the partition, format partition, the destination path when uploading files. Usage is very simple, a picture is enough to explain:
Here Insert Picture Description

Some developers board manufacturers zImage kernel, a device tree on the first partition, which is typically a FAT partition. You can use the professional version to update the kernel, update the device tree.

such as:
Here Insert Picture Description

The second partition is EXT4 format almost all of the development board, we can upload files to any directory under it, such as:
Here Insert Picture Description

Thinking Before 7.100ASK_IMX6ULL_Flashing_tool design

7.1 Basic Edition
7.1.1 to determine whether the device is connected: It should be monitored throughout

Excuting an order:

./bin/uuu -lsusb

The results have "SDP" or "FB"

Firmware 7.1.2 to determine whether the device is already running

Excuting an order:

./bin/uuu -lsusb

The results have "FB"

7.1.3 programming of the entire system

If the firmware of the device is not running: to help users running firmware, and then programming.

If the device's firmware is already running: you can direct programming.

Programming methods:

Execute scripts

./bin/uuu scripts/basic/<emmc|sd|...>/write_all.clst

7.1.4 update the kernel

If the firmware of the device is not running: to help users running firmware, and then programming.

If the device's firmware is already running: you can direct programming.

Programming methods:

Execute scripts

./bin/uuu scripts/basic/<emmc|sd|...>/write_kernel.clst

7.1.5 update the device tree

If the firmware of the device is not running: to help users running firmware, and then programming.

If the device's firmware is already running: you can direct programming.

Programming methods:

Execute scripts

./bin/uuu scripts/basic/<emmc|sd|...>/write_dtb.clst

7.1.6 update Uboot

If the firmware of the device is not running: to help users running firmware, and then programming.

If the device's firmware is already running: you can direct programming.

Programming methods:

Execute scripts

./bin/uuu scripts/basic/<emmc|sd|...>/write_boot.clst

7.1.7 bare metal programming

If the firmware of the device is not running: to help users running firmware, and then programming.

If the device's firmware is already running: you can direct programming.

Programming methods:

. A user to select, modify the script to replace the name of the file to be programmed into the script:

scripts/basic/<emmc|sd|...>/write_noos.clst

b. Perform Script

./bin/uuu scripts/basic/<emmc|sd|...>/write_noos.clst

7.1.8 users to upload files to the root directory

If the firmware of the device is not running: to help users running firmware, and then programming.

If the device's firmware is already running: you can direct programming.

Upload method:

. A first download the file:

./bin/uuu FB: download -f <file>

. B Then set the environment variable:

./bin/uuu FB: ucmd setenv TARGET_FILE <path> // user selection setting target path

c. Finally, execute scripts

./bin/uuu scripts/pro/<emmc|sd|...>/write_user_file.clst

7.2 Professional Edition
7.2.1 to determine whether the device is connected: It should be monitored throughout

Excuting an order:

./bin/uuu -lsusb

The results have "SDP" or "FB"

Firmware 7.2.2 to determine whether the device is already running

Excuting an order:

./bin/uuu -lsusb

The results have "FB"

Running firmware 7.2.3 / bare metal

Excuting an order:

./bin/uuu -t 1 <file>

file: default firmware / u-boot-dtb_fastboot_100ask.imx; user selectable.

7.2.4 programming boot / bare metal

If the firmware of the device is not running: to help users running firmware, and then programming.

If the device's firmware is already running: you can direct programming.

Programming methods:

a. The user selects to modify the script

scripts/pro/<emmc|sd|...>/write_boot.clst

. B execute the script:

./bin/uuu scripts/pro/<emmc|sd|...>/write_boot.clst

7.2.5 programming of the entire system

If the firmware of the device is not running: to help users running firmware, and then programming.

If the device's firmware is already running: you can direct programming.

Programming methods:

a. The user selects to modify the script

scripts/pro/<emmc|sd|...>/write_all.clst

. B execute the script:

./bin/uuu scripts/pro/<emmc|sd|...>/write_all.clst

7.2.6 upload any file

If the firmware of the device is not running: to help users running firmware, and then programming.

If the device's firmware is already running: you can direct programming.

Upload method:

. A first download:

./bin/uuu FB: download -f <file>

. B Then set the environment variable:

./bin/uuu FB: ucmd setenv SEL_DEV <EMMC | SD | NAND>

./bin/uuu FB: ucmd setenv PART <1|2|...> // 根据用户选择设置分区

./bin/uuu FB: ucmd setenv FSTYPE <FAT/EXT4> // 根据用户选择设置分区格式

c. Finally, execute scripts

./bin/uuu scripts/pro/<emmc|sd|...>/write_user_file.clst

Other versions of 8. GUI

Our students are very powerful, when we just released the first edition, the function is very simple, you can not select the file. QT is a student made a version of the GUI, you can select a file.
Here Insert Picture Description

Inspired by this, we made a professional version.

The student said he is Ubuntu debug GUI, the public will also get the source code.

Stay tuned.

-END-

Published 135 original articles · won praise 401 · views 260 000 +

Guess you like

Origin blog.csdn.net/thisway_diy/article/details/104650283