title: How to understand embedded kernel running for ARM versatile PCB which is nothing but a simple program
body: <p>I was reading this tutorial about running writing and debugging bare metal ARM software. So I like to know what the &quot;software&quot; term means in &quot;writing and debugging bare metal ARM software&quot;. I'd like to know: can a simple program that does nothing but prints message to serial console in Arduino at register UART0 can it be called as kernel?</p>
  <p>What I know kernel is tons of device drivers, etc. and lots of code. But I'd like to know if I have simple embedded device like Arduino then can a simple program that writes to memory mapped registers of device be qualified to be called kernel? Is the <code>-kernel</code> flag a must to supply to Qemu so author typed <code>-kernel</code> too and provided only the piece of code that is a simple program as kernel?</p>
  <p>In the tutorial there are just 4 commands to make the build these are</p>
  <pre><code>$ arm-none-eabi-as -mcpu=arm926ej-s -g startup.s -o startup.o
  $ arm-none-eabi-gcc -c -mcpu=arm926ej-s -g test.c -o test.o
  $ arm-none-eabi-ld -T test.ld test.o startup.o -o test.elf
  $ arm-none-eabi-objcopy -O binary test.elf test.bin
  </code></pre>
  <p>and ran in Qemu like</p>
  <pre><code>qemu-system-arm -M versatilepb -m 128M -nographic -s -S -kernel test.bin
  </code></pre>
  <p>So test.bin is a simple program but its specified as kernel in qemu command. So I'd like to know does the test.c/test.bin only itself be qualified to be called kernel? Or is it just typed in the command to satisfy the qemu requirements since its for emulating linux image kernel?</p>
  <p><a href="https://balau82.wordpress.com/2010/02/28/hello-world-for-bare-metal-arm-using-qemu/amp/" rel="nofollow noreferrer">https://balau82.wordpress.com/2010/02/28/hello-world-for-bare-metal-arm-using-qemu/amp/</a></p>
  <p>Also can this type of development be found in any other embedded device? I thought there suppose of be a boot loader and kernel separately for embedded devices that needed to be flashed to flash memory. But in the tutorial its just simple program, so why bootloader is not required because what I know bootloaders tells where to find the kernel image in flash memory.</p>