Running Freertos on qemu

Hello , i have created a environment in qemu that emulated ARMv7 architecture. Can i port freertos inside it ,are there any available demos for it ?

Here are some projects:

GCC Command line to build and start QEMU in the readme.md (note I find this tricky to build on Windows due to the file path lengths - suggest keeping near the route of the file system if on Windows).

IAR - command line for starting QEMU is in the comments at the top of main.c.

Should have said we also have some that include networking, although they are more tricky to set up.

I would like to know how to set up networking ,its important for my application .

Are you running on Linux or Windows? Easier on Linux, you will find the required command line in the readme for this project: FreeRTOS/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2 at master · FreeRTOS/FreeRTOS · GitHub

If you are running on Windows you first have to install a tap driver, and then bridge the tap network interface to a real network interface. I use the tap driver that comes with OpenVPN - which Google will find easily enough for you.

Hi am i using Linux ,my goal is to create a qemu image with freertos with one of the tasks will enable am ssh connection .Can i implement this using the example you mentioned ?

Hi Mr. Barry,

I downloaded OpenVPN and bridged it with my hard adapter. When I start simulation my tap interface going into active mode but I cannot receive any packet. Im using zynq7020 on Vitis on Windows. What should I write for to QEMU arguments file?

Have a good day.

This is the command line I use for an older Zynq part if it helps:

qemu-system-arm -M xilinx-zynq-a9 -smp 1 -nographic -net nic,model=cadence_gem -net user -kernel RTOSDemo.elf -s -S

Hi Mr. Barry,

The following arguments solved my problem. I can see ethernet packets in wireshark at tap interface.

Thank you.

net nic -net nic -net tap,ifname=tap0,script=no,downscript=no

Thank you for reporting back.

1 Like