1 / 22

Training

Training. SM350 Modules and Code Swapping. By: Robert Abutan. Agenda. 8051 HW restriction Modules Swapping limitation Code swapping. ROM. RAM. 0x8000. 0x0000. RTOS (4 KBytes). UI (16 KBytes). 0x1000. Library and Common Code (28 KBytes). 0xC000. Modules (16 KBytes).

burke
Download Presentation

Training

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Training SM350 Modules and Code Swapping By: Robert Abutan

  2. Agenda • 8051 HW restriction • Modules • Swapping limitation • Code swapping

  3. ROM RAM 0x8000 0x0000 RTOS (4 KBytes) UI (16 KBytes) 0x1000 Library and Common Code (28 KBytes) 0xC000 Modules (16 KBytes) Cello 8051 HW Restriction • Only 64 Kbytes Program Memory: • 32 Kbytes ROM • 32 Kbytes RAM • SM350 needs to support: • Codec Initialization • Display & Drawing • User Interface • Audio • Recording • USB • Etc…

  4. Modules • Can be categorized into 4 basic main modules: • External ROM module (optional) • Initial module • User Interface module • Functional modules (Audio, Record, etc…)

  5. External ROM • System Diagnostic Firmware: • Test programs (SDRAM, Display, DSP, etc…) • Debugger • For more information you can check on the SM350 System External ROM specification.

  6. Initial Module • Function: • Initialize HW (Codec, display, etc…). • Initialize SW (Global variable, etc…). • Recache Fat. • Load Resource files to SDRAM. • Load Binary files to SDRAM. • Logo (animation). • Available space: up to 32 Kbytes (Currently only use 24 Kbytes).

  7. User Interface Module • Function: • Manage User Interface State Machine. • Manage Menu. • Responsible for drawing. • Manage Key. • Manage calling corresponding module • Available space: 16 Kbytes. • Our code > 16 Kbytes  Common + Banks.

  8. Functional modules • Function: • Manage each individual supported feature. • Limited space: 16 Kbytes. • Our code > 16 Kbytes  Common + Banks. • Available functional modules: • Audio Module (Audio, JPEG, Slide Show, Ebook, and Movie); • Record Module (FM Radio and Recording); • USB Module; • USBDRM Module; • Recache Module; • Manager Module.

  9. Audio Module • Function: • Play Audio (MP3 / WMA). • Show JPEG (or Slide Show). • Manage EBook. • Manage MJPEG (Movie). • Manage Audio Playlist. • Manage browsing

  10. Record Module • Function: • Setup FM Radio. • Setup Recording (MIC or Line in). • File Write for Record.

  11. USB Module • Function: • Manage SCSI Command from PC

  12. USBDRM Module • Function: • Manage MTP. • Manage DRM download.

  13. Manager Module • Function: • Format media. • Detect media. • Manage File related functions, such as copy file, delete file, create directory, etc…

  14. Recache Module • Function: • Recache FAT • Reload any necessary files (WMA Table, Bitmap, Font, etc…)

  15. RAM 0x8000 RAM1 0xC000 RAM2 Swapping Limitation • Our swapping code is located at the RAM. • Disadvantage: • Cannot swap a portion of software in the same RAM location without using swapping function from different RAM.

  16. Code Swapping • 2 Important functions: • Code loading from SDRAM to 8051 Program SRAM (8051Swap.c). • Interbank swapping (L51_MODBANK.A51 and L51_UIBANK.A51).

  17. DMA Restriction (Code loading) • 4 bytes alignment both on the SRAM and/or SDRAM due to hardware restriction. • Only the first 10 Kbytes (0x0000 ~ 0x27FF) of the Data SRAM can be used. • For some media (excluding HDD), DMA transfer xdata is restricted to starting address that its last 10 bits are zero.

  18. 0xC000 0x8000 3 bytes } 3 bytes } UI Main Entry Module Main Entry Jump Table Jump Table Module Bank Swap 3 bytes UI Bank Swap 3 bytes Module Common Code UI Common Code Module Bank UI Bank Code Swapping Diagram

  19. Swapping code • UI extrn code (MainEntry) extrn code (ModBankSwapEntry) CSEG AT 08000H LJMP MainEntry LJMP ModBankSwapEntry END • Module extrn code (MainEntry) extrn code (_UIBankSwapEntry) CSEG AT 0C000H LJMP MainEntry LJMP _UIBankSwapEntry END

  20. 0x0000 DMA Temp Buffer 0x1608 UI xdata 1 } 0x1800 DMA Temp Buffer UI xdata 0x1F80 UI xdata 2 0x2700 } Module xdata 1 0x2F80 ROM xdata 1 0x365B Module xdata Module xdata 2 0x368B ROM xdata 2 0x36AC Module xdata 3 0x3B80 Shared Global Variables 0x3EC0 Sys Cmd Param Area 0x3F00 RTOS used 0x4000 Data RAM For more information: SysBoot. inc

  21. Summary • SM350 Software Modules • Code Swapping • External Data RAM

  22. Questions ???

More Related