From dd57f2eb88b8730e3e9815e2bfeaa372f4adc1b9 Mon Sep 17 00:00:00 2001 From: Austin Date: Wed, 30 Mar 2022 06:24:27 +0000 Subject: [PATCH] update en/device-dev/kernel/kernel-small-debug-user-guide-use-api.md. Signed-off-by: Austin --- en/device-dev/kernel/kernel-small-debug-user-guide-use-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/device-dev/kernel/kernel-small-debug-user-guide-use-api.md b/en/device-dev/kernel/kernel-small-debug-user-guide-use-api.md index 5ed8806902..2841f08b6e 100644 --- a/en/device-dev/kernel/kernel-small-debug-user-guide-use-api.md +++ b/en/device-dev/kernel/kernel-small-debug-user-guide-use-api.md @@ -40,7 +40,7 @@ int main() ## Compilation ``` -$ clang -o mem_check mem_check.c -funwind-tables -rdynamic -g -mfloat-abi=softfp -mcpu=cortex-a7 -mfpu=neon-vfpv4 -target arm-liteos --sysroot=/home//harmony/out/hispark_taurus/ipcamera_hispark_taurus/sysroot $(clang -mfloat-abi=softfp -mcpu=cortex-a7 -mfpu=neon-vfpv4 -target arm-liteos -print-file-name=libunwind.a) +$ clang -o mem_check mem_check.c -funwind-tables -rdynamic -g -mfloat-abi=softfp -mcpu=cortex-a7 -mfpu=neon-vfpv4 -target arm-liteos --sysroot=/home//directory/out/hispark_taurus/ipcamera_hispark_taurus/sysroot $(clang -mfloat-abi=softfp -mcpu=cortex-a7 -mfpu=neon-vfpv4 -target arm-liteos -print-file-name=libunwind.a) ``` >![](../public_sys-resources/icon-note.gif) **NOTE:** @@ -48,7 +48,7 @@ $ clang -o mem_check mem_check.c -funwind-tables -rdynamic -g -mfloat-abi=softfp >- When compiling user programs and required libraries, add the option **-funwind-tables -rdynamic -g** for stack backtracking. >- The **-mfloat-abi=softfp**, **-mcpu=cortex-a7**, and **-mfpu=neon-vfpv4** options specify the floating-point calculation optimization, chip architecture, and FPU, which must be the same as the compilation options used by the libc library. Otherwise, the libc library file cannot be found during the link time. >- **-target arm-liteos** specifies the path of the library files related to the compiler. ->- **--sysroot=/home//harmony/out/hispark\_taurus/ipcamera\_hispark\_taurus/sysroot** specifies the root directory of the compiler library files. In this example, the OpenHarmony project code is stored in **/home//harmony**. The **out/hispark\_taurus/ipcamera\_hispark\_taurus** directory indicates the product specified by the **hb set** command during compilation. In this example, **ipcamera\_hispark\_taurus** is the product specified. +>- **--sysroot=/home//directory/out/hispark\_taurus/ipcamera\_hispark\_taurus/sysroot** specifies the root directory of the compiler library files. In this example, the OpenHarmony project code is stored in **/home//directory**. The **out/hispark\_taurus/ipcamera\_hispark\_taurus** directory indicates the product specified by the **hb set** command during compilation. In this example, **ipcamera\_hispark\_taurus** is the product specified. >- **$\(clang -mfloat-abi=softfp -mcpu=cortex-a7 -mfpu=neon-vfpv4 -target arm-liteos -print-file-name=libunwind.a\)** specifies the path of the unwind library. ## Debugging Information -- GitLab