Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tileli Amimeur Sami Gharahi Fall 2009 *Drinking from a fire hose.

Similar presentations


Presentation on theme: "Tileli Amimeur Sami Gharahi Fall 2009 *Drinking from a fire hose."— Presentation transcript:

1 Tileli Amimeur Sami Gharahi Fall 2009 *Drinking from a fire hose

2  Problem Statement  Project Overview  Work Breakdown  Architecture  Implementation Details  Design Tradeoff  What would we do differently/future work

3  Porting MicroMonitor onto the ARM7TDMI processor on the Keil MCB2387 Evaluation Board.

4  LPC2387  ARM7TDMI  Serial ports (USBs)  Putty/HyperTerminal  uMon codebase (available from web)  Code sourcery  GPS_bringup

5  Tileli – Research, Makefiles, Startup assembly, C code, Debugging  Sami – Research, Makefiles, Startup assembly, C code, Debugging  Pretty tough to split up

6

7  GPS_bringup code  Makefile  Startup Assembly  Monitor Subsystem Configuration  Bootup C Code  I/O  Debugging

8  Code given to us that establishes use of ◦ UART: ability to print to console ◦ LEDs  Helped with debug  gps_bringup start up assembly  uMon assembly

9  PLATFORM, FILETYPE, CPUTYPE, etc  Includes all the relevant files ◦ LOCSSRC = rom_reset.S ◦ LOCCSRC = cpuio.c, led.c, … ◦ COMCSRC = C Code at umon_main/target/common  Memory map configuration

10  rom_reset.S  Standard definitions of mode base, interrupts, and stacks  SCB Module Definitions  Memory Accelerator module  Boot sequence: start, reset, coldstart, lukewarmstart, warmstart, etc.  Make a call to the C code at the end

11  config.h  Memory block and heap size  Ability to choose monitor subsytems ◦ MEMCMDS ◦ MALLOC ◦ SHELLVARS ◦ XMODEM (As we found, requires Flash)

12  “start.c” – this is the first c code executed by the processor after startup assembly code  Keeps track of the state of the monitor ◦ Initialize, App_exit, Exception  Declares and initializes the monitor’s stack/heap within its own.bss space  Initializes the CPU I/O and baud rate  Initializes various features of umon as specified in the config.h file

13  “cpuio.c” – this code takes care of I/O initialization and functionality  Uses “LPC2387.h” for register and port definitions  Contains LED and UART routines  Contains target_putchar(…) routine required by uMon’s printf

14  No debugging functionality at the start of the project  Getting the LEDs to work was a huge breakthrough  Were able to step through code using the LEDs to figure out where a routine was crashing – very slow process

15  After the LEDs were in working order  Stepped through rom_reset.s till right before entering the C code  Problems with entering the C code with uMon’s assembly startup  Started with gps_bringup assembly startup and morphed it into uMon’s  Entry to C code was successful

16  Using our LEDs to debug we were finally able to get the UART to work  Eventually were able to use printf to print “Hello World!” to the screen  The uMon prompt came up shortly after, but the uMon reset command caused the board to crash ◦ Issues with the board’s bring up state

17  Reset was causing the board to crash  We found that the “initialize” state was not being passed correctly from the assembly startup to the starting c code (the board was starting in an unknown state)  Eventually realized that “warmstart” in the assembly startup was not functioning correctly ◦ Fixed it to point the stack pointer to our state variable before calling the c code

18  reset  help  pm (put memory) -> ex: pm –s 0x4000d000 “hello”  dm (dump memory) -> ex: dm 0x4000d000  cm (copy memory) –> ex: cm -2 0x4000d000 0x4000d070 0x20  mt (memory test) -> ex: mt 0x4000d000 0x20  sm (search memory) -> ex: sm –s 0x4000d000 0x4000d090 “hello”

19  Which subsystems to bring up first  Even though we enabled Xmodem in config.h Flash has to get configured first for it to be functional  Heap space decreased to 40x1024 (from 64x1024) ◦ Affects future applications meant to run on top of uMon

20  Documentation, Documentation, Documentation ◦ It was hard to find sufficient documentation for uMon’s large code base ◦ Not knowing what to look for - Even when there was some documentation, we often didn’t find it until we had already figured things out ourselves

21  Include_Flash – write a device driver to interface with the flash on our board to allow for Xmodem serial file transfer  Build up uMon on this board to include more features

22

23


Download ppt "Tileli Amimeur Sami Gharahi Fall 2009 *Drinking from a fire hose."

Similar presentations


Ads by Google