January 18, 2022

Orange Pi 4 (Rockchip 3399) ctags and U-boot sources

I am finding useful things in two version of U-boot and have both source trees cloned on my machine.

The first is the official U-Boot sources (mainline) from Denx. I selected the orangepi-rk3399_defconfig file and built this entirely without problems.

The second is another tree entirely in the hardware collection provided by hceng (huangcheng). This is not nearly so convoluted as the mainline sources and I am finding it very useful

The excellent starting point in huangcheng's files is drivers/serial/serial_rk.c

Using Ctags

It doesn't take long using grep and cd to run around in the u-boot sources to start itching for some help from ctags. The thing to do first is "ctags -R ." in the u-boot root directory. This is fast and generates a tags file. Now within vim use:
Control-] -- goes to the definition of whatever the cursor is on.
Control-t -- unwinds the above one level (a "back" button).
There is more to know, but this does over 90 perent of what I want.

To go directly to a function definition -- vi -t func


Have any comments? Questions? Drop me a line!

Tom's electronics pages / tom@mmto.org