同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
This section describes how to modify, compile, burn, and run the first program on the board, and finally print Hello OHOS!.
You need to acquire Hi3518 source code and download it on a Linux server. For details, see Source Code Acquisition.
The following example shows the helloworld.c code in the applications/sample/camera/app/src directory. You can customize the content to be printed. For example, you can change OHOS to World. You can use either ISO C or C++ to develop a program.
#include <stdio.h>
#include "los_sample.h"
int main(int argc, char **argv)
{
printf("\n************************************************\n");
printf("\n\t\tHello OHOS!\n");
printf("\n************************************************\n\n");
LOS_Sample(g_num);
return 0;
}
On the Linux server, access the root directory of the source code package and run the following script to compile the source code package. The result files are generated in the out/ipcamera_hi3518ev300 directory.
Hi3518EV300
python build.py ipcamera_hi3518ev300 -b debug
Burn images to the Hi3518EV300 board over the serial port.
Connect a serial cable (USB port) of the board to the Windows host and start Device Manager to check whether the serial port number is COM7.
NOTICE: To update the USB-to-Serial driver, you need to start Device Manager, right-click the device, and choose Update Driver Software > Search automatically for updated driver software.
Start the HiTool, select the Hi3518EV300 chip, select COM7 for Local PC Config, and select Serial for Transfer Mode.
Burn the newly compiled OHOS_Image.bin file, rootfs.img, and userfs.img files to the board. Ensure the file path, flash type, burning start address, and burning length are correct. Modify relevant parameters based on the file size. The value is rounded up, in MB.
Click Burn and power on the board as required. (If the board is powered on, power it off and then power it on.)
Click OK.
Connect to the serial port. After the images are burnt successfully, start the terminal, click Settings, set View Title to Terminal 11 and Port to COM7, and click OK to open the serial port. You have logged in to the U-boot if hisilicon # is displayed.
(Mandatory for the first burning) Modify the bootcmd and bootargs parameters of U-boot. This step is a fixed operation and the result can be saved. However, you need to perform the following steps again if U-boot needs to be reburnt.
Table 1 Parameters of the U-boot
NOTICE: go 0x40000000 (optional) indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press Enter in the countdown phase of the U-boot startup to interrupt the automatic startup.
If hisilicon # is displayed during the startup, run the reset command. After the system automatically starts and OHOS is displayed, run the ./bin/camera_app command and then press Enter. The system is started successfully if information shown in the following figure is displayed.
Congratulations! You have finished all steps! You are advised to go on learning how to develop Cameras with a Screen.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。