training sm350 modules and code swapping by: robert abutan
TRANSCRIPT
![Page 1: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/1.jpg)
TrainingTrainingSM350 Modules and Code Swapping
By: Robert Abutan
![Page 2: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/2.jpg)
AgendaAgenda
8051 HW restriction ModulesSwapping limitationCode swapping
![Page 3: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/3.jpg)
Cello 8051 HW RestrictionCello 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…
![Page 4: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/4.jpg)
ModulesModules
Can be categorized into 4 basic main modules:– External ROM module (optional)– Initial module– User Interface module– Functional modules (Audio, Record, etc…)
![Page 5: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/5.jpg)
External ROMExternal ROM
System Diagnostic Firmware:– Test programs (SDRAM, Display, DSP,
etc…)– Debugger
For more information you can check on the SM350 System External ROM specification.
![Page 6: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/6.jpg)
Initial ModuleInitial 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).
![Page 7: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/7.jpg)
User Interface ModuleUser 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.
![Page 8: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/8.jpg)
Functional modulesFunctional 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.
![Page 9: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/9.jpg)
Audio ModuleAudio Module
Function:– Play Audio (MP3 / WMA).– Show JPEG (or Slide Show).– Manage EBook.– Manage MJPEG (Movie).– Manage Audio Playlist.– Manage browsing
![Page 10: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/10.jpg)
Record ModuleRecord Module
Function:– Setup FM Radio.– Setup Recording (MIC or Line in).– File Write for Record.
![Page 11: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/11.jpg)
USB ModuleUSB Module
Function:– Manage SCSI Command from PC
![Page 12: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/12.jpg)
USBDRM ModuleUSBDRM Module
Function:– Manage MTP. – Manage DRM download.
![Page 13: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/13.jpg)
Manager ModuleManager Module
Function:– Format media.– Detect media.– Manage File related functions, such as copy
file, delete file, create directory, etc…
![Page 14: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/14.jpg)
Recache ModuleRecache Module
Function:– Recache FAT– Reload any necessary files (WMA Table,
Bitmap, Font, etc…)
![Page 15: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/15.jpg)
Swapping LimitationSwapping 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.
![Page 16: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/16.jpg)
Code SwappingCode Swapping
2 Important functions:– Code loading from SDRAM to 8051 Program
SRAM (8051Swap.c).– Interbank swapping (L51_MODBANK.A51
and L51_UIBANK.A51).
![Page 17: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/17.jpg)
DMA Restriction (Code loading)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.
![Page 18: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/18.jpg)
Code Swapping DiagramCode Swapping Diagram
![Page 19: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/19.jpg)
Swapping codeSwapping code UI
extrn code (MainEntry)extrn code (ModBankSwapEntry)CSEG AT 08000HLJMP MainEntryLJMP ModBankSwapEntryEND
Module extrn code (MainEntry)extrn code (_UIBankSwapEntry)CSEG AT 0C000HLJMP MainEntryLJMP _UIBankSwapEntryEND
![Page 20: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/20.jpg)
Data RAMData RAM
For more information: SysBoot. inc
![Page 21: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/21.jpg)
SummarySummary
SM350 Software ModulesCode SwappingExternal Data RAM
![Page 22: Training SM350 Modules and Code Swapping By: Robert Abutan](https://reader033.vdocuments.us/reader033/viewer/2022051820/56649e105503460f94afaf56/html5/thumbnails/22.jpg)
Questions ???Questions ???