Presentation is loading. Please wait.

Presentation is loading. Please wait.

Implementation of Embedded OS Lab4 Cortex-M3 Programming.

Similar presentations


Presentation on theme: "Implementation of Embedded OS Lab4 Cortex-M3 Programming."— Presentation transcript:

1 Implementation of Embedded OS Lab4 Cortex-M3 Programming

2 Lab4 Goal  Learn how to write programs for the ARM Cortex-M3 (ARMv7-M) architecture. 2015/6/2 /112 Source: http://www.arm.com/images/Cortex_M3_large.png

3 Lab4 Environment  Host System  Windows XP  Build System  VirtualBox + Ubuntu 8.04  Target System  PTK development board (STM32F207)  Software  Documentation & examples  PTK_Examples.zip  μ C/OS-III source codes  KRN-K3XX-000000.zip  IAR Embedded Workbench (ver. 6.6)  Installed already  You can download them from RSWiki IEOS Course Software.RSWiki IEOS Course Software 2015/6/2 /113

4 Lab4 Introduction 2015/6/2 /114  Cortex-M3 processors are a family of 32-bit ARM-based processors for highly deterministic real-time applications.  It implements the ARMv7-M architecture.  Nested Vectored Interrupt Controller (NVIC), Memory Protection Unit (MPU), …  It has 3-stage pipeline supporting Thumb/Thumb-2 ISA.  STM32F207 is a SoC consisting of a Cortex-M3 Core, built-in flash storage, and many other peripherals.  The core can run up to 120MHz.  The on-chip memory includes a flash of 256KB and a SRAM of 128KB.

5 Lab4 Memory Mapping 2015/6/2 /115  The address space of STM32F207 is split into eight 512MB blocks.  Block 0 maps the flash memory.  Block 1 maps the main memory.  Block 2 maps MMIO for peripherals.  Block 3/4 maps external devices using static memory interface.  Block 5 maps control registers of the flexible static memory controller (FSMC).  Block 7 maps internal registers of the processor core. Block 0 Code Block 0 Code Block 1 SRAM Block 1 SRAM Block 2 Peripherals Block 2 Peripherals Block 3 FSMC Bank 1/2 Block 3 FSMC Bank 1/2 Block 4 FSMC Bank 3/4 Block 4 FSMC Bank 3/4 Block 5 FSMC Registers Block 5 FSMC Registers Block 6 Not Used Block 6 Not Used Block 7 Internals Block 7 Internals 0x0000_0000 0x2000_0000 0x4000_0000 0x6000_0000 0x8000_0000 0xA000_0000 0xC000_0000 0xE000_0000

6 Lab4 Connecting PTK Development Board 2015/6/2 /116 JTAG Debugger RS-232 (COM Port) Temperature Sensor

7 Lab4 IAR Embedded Workbench 2015/6/2 /117  It is a commercial IDE for ARM-based SoCs.

8 Lab4 Setting up Examples 2015/6/2 /118  Step 1: decompress the examples PTK_Examples.zip.  Step 2: decompress KRN-K3XX-000000.zip.  Step 3: copy the folder Software in Micrium to PTK_Examples/ePBB/Libraries/OS_uCOS- III/Micrium-V30x.  Please do not replace any existing files.

9 Lab4 Building and Running the UART Example (1/2) 2015/6/2 /119  Step 1: open the following workspace in IAR Embedded Workbench IDE.  PTK_Examples/ePBB/Applications/Projects/PTK- STM32F207/EWARM-V6/OS_uCOS- III/base_uart/demo.eww  Step 2: compile the project by clicking the button “Make”.  Step 3: download the program to the target by clicking the button “Download and Debug”.

10 Lab4 Building and Running the UART Example (2/2) 2015/6/2 /1110  Step 4: open the serial console (putty or pietty).  Please set baud rate to 115200bps.  Step 5: press the key “F5” to continue the execution.  You will see the message “Hello World!!!” on the console.

11 Lab4 Lab Requirements 2015/6/2 /1111  Please create a task in μ C/OS-III to read the value of current temperature from the temperature sensor and display it on both the serial console and the LCD screen.  Hints  The documentation of these examples can be found at PTK_Examples/ePBB/Documentations.  You need to initialize the LCD device by invoking “ili9325_gui_config” in the function “platform_board_init_hook”.


Download ppt "Implementation of Embedded OS Lab4 Cortex-M3 Programming."

Similar presentations


Ads by Google