multiple profile for simple sample

This commit is contained in:
Wang Xin
2020-02-22 14:19:07 +08:00
parent fc96ff2943
commit 90c7580283
9 changed files with 181 additions and 29 deletions

View File

@ -80,8 +80,37 @@ To run the UART based test, you have to set up a UART hardware connection betwee
Build the sample
==============
Execute the build.sh script then all binaries including wasm application files would be generated in 'out' directory.
`./build.sh`
Execute the build.sh script then all binaries including wasm application files would be generated in 'out' directory.
```
$ ./build.sh
Enter build target profile (default=host-interp) -->
arm-interp
host-aot
host-interp
\>:
```
Enter the profile name for starting your build. "host-***" profiles build the sample for executing on your development machine, and "arm-interp" profile will do cross building for ARM target platform. If "arm-interp" is entered, please ensure the ARM cross compiler toolchain is already installed in your development machine. Your should set *ARM_A7_COMPILER_DIR* and *ARM_A7_SDKTARGETSYSROOT* environment variable in your ~/.bashrc correctly. refer to the file [profiles/arm-interp/toolchain.cmake](./profiles/arm-interp/toolchain.cmake).
```
export ARM_A7_COMPILER_DIR="/home/beihai/cross-toolchains/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin"
export ARM_A7_SDKTARGETSYSROOT="/home/beihai/cross-toolchains/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/libc"
```
If you need to create additional profile for customizing your runtime, application framework or the target platforms, a new subfolder can be created under the *profiles* folder, and place your own version of "toolchain.cmake" and "wamr_config_simple.cmake" in it.
```
~/wamr/samples/simple/profiles$ ls
arm-interp host-aot host-interp
~/wamr/samples/simple/profiles$ ls arm-interp/
toolchain.cmake wamr_config_simple.cmake
```