QEMU is a generic and open source machine emulator and virtualizer.
Targets Supported:
- lm3s6963-ek
NOTE: TizenRT supports three memory options for lm3s6963-ek board.
-
64KB RAM requirement configuration which matches with real memory of lm3s6963-ek board
-
1MB RAM requirement which can be run on QEMU only with the qemu-2.12.0-rc1_1m_ram_size.patch
-
16MB RAM requirement which can be run on QEMU only with the qemu-2.12.0-rc1_16m_ram_size.patch
This section covers board-specific environment set-up.
Please set TizenRT common environment, quick start, first before doing below.
wget https://download.qemu.org/qemu-2.12.0-rc1.tar.xz
tar xvJf qemu-2.12.0-rc1.tar.xz
cd qemu-2.12.0-rc1
To Run QEMU with 1MB RAM, copy qemu-2.12.0-rc1_1m_ram_size.patch from TizenRT/build/configs/qemu to PWD
patch -p1 < qemu-2.12.0-rc1_1m_ram_size.patch
To Run QEMU with 16MB RAM, copy qemu-2.12.0-rc1_16m_ram_size.patch from TizenRT/build/configs/qemu to PWD
patch -p1 < qemu-2.12.0-rc1_16m_ram_size.patch
./configure --target-list=arm-softmmu
make -j 4
cd arm-softmmu/
sudo ln qemu-system-arm /usr/local/bin/qemu-system-arm
There are two methods,
-
Using qemu command
-
Using make command.
After building TizenRT, follow below steps at $TIZENRT_BASEDIR/os folder.
See [Getting the sources] for how to set TIZENRT_BASEDIR.
qemu-system-arm -M lm3s6965evb -kernel ../build/output/bin/tinyara -nographic -gdb tcp::3333
./dbuild.sh download
To debug TizenRT on QEMU, GDB should be connected through below commands.
arm-none-eabi-gdb
(gdb) file ../build/output/bin/tinyara
(gdb) target remote:3333
for running tc under 256KB flash and 64KB sram
for running tc under 32MB flash and 1MB sram
for running tc under 128MB flash and 16MB sram
If you want to set your sram to 64KB or 16MB, follow these steps.
make menuconfig
Enter Board Selection
-> Build for qemu hardware
Select NONE
(64KB) or Build for SRAM increased QEMU Hardware
(16MB)
Enter Chip Selection
-> Boot Memory Configuration
Set Primary RAM size
to 65536
(64KB) or 16777216
(16MB)
To run the network stack on QEMU please refer How to run network stack on Qemu.
If you encouter below log after ./configure --target-list=arm-softmmu
,
ERROR: pixman >= 0.21.8 not present.
Please install the pixman devel package.
install pixman to reslove issue.
sudo apt-get install libpixman-1-dev