分享到plurk 分享到twitter 分享到facebook

版本 c0a288a199f636860eef89a958b9dbdb5c992178

embedded/Lab1

============= QEMU Modeling =============

STM32 Overview

  • Powerful but Cheap
    • Wireless Connectivity
    • Computing/Prototyping
    • One for most use cases
    • open source: http://code.google.com/hosting/search?q=label:STM32
    • http://0xlab.org/~jserv/tmp/CM-STM32.pdf

.. image:: /STM32-P103-01.jpg

STM32 + QEMU

.. code-block:: prettyprint

git://github.com/beckus/stm32_p103_demos.git
git clone git://github.com/beckus/SandboxQemu2.git qemu_stm32

cd qemu_stm32
./configure --disable-werror --enable-debug \
    --enable-debug-tcg \
    --target-list="arm-softmmu" \
    --extra-cflags=-DDEBUG_CLKTREE \
    --extra-cflags=-DDEBUG_STM32_UART \
    --extra-cflags=-DSTM32_UART_NO_BAUD_DELAY \
    --extra-cflags=-DSTM32_UART_ENABLE_OVERRUN
make
cd ../stm32_p103_demos
git checkout -b final origin/final
make all
make blink_flash_QEMURUN
make uart_echo_QEMURUN_TEL

作業要求

  • 設計 STM32 的程式,使得在按下 Button 時,於 UART 輸出 “Hello!”
  • STM32 的程式須能與使用者互動,允許透過 UART 下指令控制週邊的狀態,至少要控制 LED 與查詢 Button 的狀態 (如按下的次數)