Step 3 : Compile FreeRTOS for QEMU

  • In this program, you are going to learn

  • How to ?

Topics in this section,

  • Make sure current directory is $HOME

$ cd $HOME
  • Navigate to below path

$ cd FreeRTOS/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/
  • Open FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/main.c file and set “mainCREATE_SIMPLE_BLINKY_DEMO_ONLY” to generate the simply blinky demo.

  • Open the file and confirm if it is set

$ vim main.c
  • Navigate to below path

$ cd build/gcc/
  • Check the current directory,

$ pwd
/home/test/FreeRTOS/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc/
  • Then, give the below command,

make -j4
  • A successful build creates the elf file in the below path,

$ cd output
$ pwd
/home/test/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc/output
$ ls -l
-rw-rw-r-- 1 test test 338381 Jan 16 14:56 RTOSDemo.map
-rwxrwxr-x 1 test test 476912 Jan 16 14:56 RTOSDemo.out
  • RTOSDemo.out is the output file(elf file)