среда, 19 декабря 2018 г.

Ingenic Halley2, Uboot, loadb command

Be default Uboot version has not loadX commands. I wanted to test loading programs by serial line. So I did changes in board configuration to add set of commands loadX.
I added to configuration file (include/configs/halley2.h) follow lines:
#define CONFIG_CMDLINE_EDITING
#define CONFIG_CMD_LOAD
#define CONFIG_USE_XYZMODEM
#define CONFIG_CMD_LOADB
#define CONFIG_CMD_LOADS

After that new command appeared in Uboot command line interface.

When Uboot is compiled simple standalone program is compiled too. It is simple Hello World program. I used it for experiments with loading programs by serial line. There is loading and executing protocol for loadb command. I used ckermit program.

halley2-sfcnor# loadb 0x80200000
## Ready for binary (kermit) download to 0x80200000 at 115200 bps...

## Total Size      = 0x0000044c = 1100 Bytes
## Start Addr      = 0x80200000
halley2-sfcnor# go 0x80200000
## Starting application at 0x80200000 ...
Example expects ABI version 6
Actual U-Boot ABI version 6
Hello World
argc = 1
argv[0] = "0x80200000"
argv[1] = "<NULL>"
Hit any key to exit ... 

## Application terminated, rc = 0x0
halley2-sfcnor#

Комментариев нет:

Отправить комментарий