Step 4 : Compile and Run ======================== .. tab-set:: .. tab-item:: Compile and Run * In this program, you are going to learn .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * How to ? .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Steps for Compilation and Run ` .. _Rt-Thread_qemu_ARM-vexpress-A9_step3_0: .. tab-set:: .. tab-item:: Steps for Compilation and Run * Perform compilation using below command: .. code-block:: c $ scons * Note: For clean compilation, you can use following command: .. code-block:: c $ scons --clean * If the compilation is correct, the "rtthread.elf" file will be generated in the BSP directory, which is a target file required for QEMU to run. .. code-block:: c qemu-vexpress-a9$ ls -lrt rtthread.elf -rwxrwxr-x 1 test test 1866252 Apr 12 16:40 rtthread.elf * Use the ./qemu.sh command to run the Project. .. code-block:: c $ ./qemu.sh * The above command will start the virtual machine and BSP project. * The initialization information is displayed and version number information is printed during the start-up of RT-Thread system. * The QEMU virtual machine also starts running as shown below: .. code-block:: c test:qemu-vexpress-a9$ ./qemu.sh QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.18) Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers | - RT - Thread Operating System | 5.1.0 build Apr 12 2024 16:40:27 2006 - 2024 Copyright by RT-Thread team [I/SDIO] SD card capacity 65536 KB. [I/FileSystem] file system initialization done! Hello RT-Thread! msh /> * Enter below command to check the list of commands which can be used: .. code-block:: c msh />help * Run "ls" command to list the contents as shown below: .. code-block:: c msh />ls Directory /: dev * Now run below commands to print "hello RT-Thread": .. code-block:: c msh />echo "hello RT-Thread" hello.txt msh />ls Directory /: dev hello.txt 15 msh />cat hello.txt hello RT-thread .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow