first we need to have FTDI D2XX library installed:
- go to https://www.ftdichip.com/Drivers/D2XX.htm
- click "setup executable" and download the zip file
- unzip the file and install the library
then we can download and build bcu:
$ git clone https://github.com/NXPmicro/bcu.git
open Board_Control_Utilities.sln with windows visual studio
ctr-shift+B to build the solution
ctr-f5 to run
first we need to obtain libftdi1-dev library:
$ sudo apt-get update
$ sudo apt-get install libftdi1-dev
then we can obtain and build bcu:
$ git clone https://github.com/NXPmicro/bcu.git
$ cd bcu
$ cmake .
$ make
$ sudo ./bcu command
linux user: please remember to run bcu with sudo to avoid permission issue
commands | descriptions |
---|---|
reset | reset the board |
monitor | switch into a tui windows that monitors voltage, current and power consumption inside the board |
lsgpio | show a list of available gpio pin |
set_gpio [GPIO_NAME] [1/0] | set a GPIO_NAME pin to be high(1) or low(0). all GPIO_NAMEs are shown in lsgpio command |
lsftdi | show the list of connected boards and the their location IDs |
lsboard | list all supported board models |
set_boot_mode [BOOTMODE] | set the boot mode as BOOTMODE |
help | show list of available commands and their functions, as well as options |
version | show version number |
$ bcu command [-options]
1.set sd_wp gpio pin as high:
$ bcu set_gpio sd_wp 1
2.reset the i.MX8QMEVK board after 1 second:
$ bcu reset -board=iMX8QMEVK -delay=1000
3.hold sd_pwr pin low for 3 second:
$ bcu set_gpio sd_pwr 0 -hold=3000
4.set emmc as the booting device:
$ bcu set_boot_mode emmc
options | descriptions |
---|---|
[-board=MODEL] | set the board model, list of avaliable models is shown in lsboards command |
[-id=ID] | select the target board with location id(when there are multiple boards), the location id can be viewed by using command lsftdi |
options | descriptions |
---|---|
[-delay=DURATION] | reset after DURATION ms |
[BOOTMODE] | setting BOOTMODE as the booting method |
options | descriptions |
---|---|
[-dump] | dump data into a file, which can be imported to excel |
options | descriptions |
---|---|
[-delay=DURATION] | set after DURATION ms |
[-hold=DURATION] | hold the output state for DURATION ms |
[GPIO_NAME] | specify which gpio pin should be set, list of available gpio can be found using list gpio command |
[0] | set the pin output low |
[1] | set the pin output high |
[-path=PATH] | for testing purpose only: set the gpio pin specified by path |
options | descriptions |
---|---|
[BOOTMODE] | booting from emmc device |
sudo ./bcu init [boot mode] -board=imx8mpevk
sudo ./bcu reset [boot mode] -board=imx8mpevk
RESET function does NOT dependent on initialization. Can be use alone.
SW4[1/2/3/4] | cmd string | bootmode |
---|---|---|
0000 | fuse | Internal Fuses |
0001 | usb | USB Serial Download |
0010 | emmc | EMMC/USDHC3 |
0011 | sd | USDHC2 |
0100 | nand_256 | NAND 8-bit single device 256 page |
0101 | nand_512 | NAND 8-bit single device 512 page |
0110 | qspi_3b_read | QSPI 3B Read |
0111 | qspi_hyperflash | QSPI Hyperflash 3.3V |
1000 | ecspi | ecSPI Boot |
1110 | infinite_loop | Infinite Loop Mode |