adi 程序烧写
3.2 U-Boot Console Output
Here we need set up minicom to open target board serial console.
-
sudo minicom -s
-
choose “Serial port setup”
-
set “Serial Device” to /dev/ttyUSB0
-
set “Bps/Par/Bits” to 57600 8N1
-
set “Hardware Flow Control” to No.
-
-
choose "Save setup as dfl"
-
choose "Exit"
After setting up like above, it can open one terminal on Ubuntu. Next time you can run directly:
sudo minicom
This command would open the console for your U-Boot.
Note: if you are working from virtual machine and want to use the serial console from it, you will also need to pass-through related serial device to your VM.
3.3 Loading U-Boot With GDB
Open another terminal on Ubuntu and run the following commands:
cd /opt/analog/cces-linux-add-in/1.1.0/uboot-sc58x-1.1.0/bin
$ arm-none-eabi-gdb u-boot-sc58x-ezkit-hpc
(gdb) target remote :3333
Remote debugging using :3333 0x200bfff0 in ?? ()
(gdb)
load init stub to do early cpu and ddr init
(gdb) load init-sc58x-ezkit-hpc.elf
(gdb) c
load u-boot and run
Ctrl + C
(gdb) load u-boot-sc58x-ezkit-hpc
(gdb) c
U-Boot should now be running in RAM on your target board, from the minicom opened earlier you should be able to get the U-Boot console output.
3.4 Flash U-Boot to SPI Flash
On your host computer :
1) cp u-boot-sc58x-ezkit-hpc.ldr /tftpboot/u-boot.ldr
Ensure your board is connected to the same LAN network as your host machine, run the following command to set up the U-Boot environment in the minicom console
2) dhcp
3) set serverip $your_host_ip
4) run update
5) save