⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmon.txt

📁 MIPS架构UCOS-ii移植例程
💻 TXT
字号:
TRANSPARENT MONITOR (TMON 1.10) for Atlas

Notes



1	Why TMON?	1
2	Installing TMON x.xx on PC (running Linux or Windows)	1
3	Burning TMON x.xx image into System Flash	2
4	Setting up TMON x.xx CONSOL & working with it's Prompt	2
5	TMON commands	2
6	Download procedure for application Images	2
7	Executing application Images	3
8	Developing Applications over TMON	3
8.1	TMON x.xx Memory Organization	3
8.2	Registering ESRs & ISRs	3
9	Conclusion	4


Note:
1. Currently version of TMON x.xx supports only Core LV -4Kc on Atlas board 
2. Some packages are released with just the binaries for TMON.


1 Why TMON?

q It is very simple to work with, with very simple menu commands.
q But yet it is powerful & clean, in the sense that... all it does on exceptions is it simply routs the call to application's ESR without altering any of the registers. This feature is very useful for running RTOSs over it. TMON does not hinder with the application running on top of it after control is passed onto it. Because of this transparent nature it gets its name, "Transparent Monitor".


2 Installing TMON x.xx on PC (running Linux or Windows)

1. Unzip (Extract) the contents of TMONx.xx.zip into the c:\ or any other directory, which is the TMON's <root>. It creates the following folders:
a. <root>\atlas\tmon\src - TMON source files.
b. <root>\atlas\tmon\inc - TMON include files.
c. <root>\atlas\tmon\doc - TMON documents.
d. <root>\atlas\tmon\bin - TMON work folder.
e. <root>\atlas\mipsutil - DOS utilities for atlas development.
2. Add path to c:\mipsutil (DOS only).
a. Add the following line in autoexec.bat file: SET Path=<root>\MIPSUTIL. Or add it in the Environment variables.

3. Reboot the Host computer (PC).




3 Burning TMON x.xx image into System Flash 

The parallel port image, <root>\atlas\tmon\bin\tmon.fl can be burnt into the Flash by following the instructions below.

For burning it on the System flash:
1. Switch OFF both the Atlas, and the PC or workstation that will be used to download.
2. Connect the parallel cable between the PCs parallel port, and J14 on the Atlas.
3. Switch OFF the switch, S1-1 on the Atlas (select System Flash).
4. Switch ON the switch, S5-1 on the Atlas (select FLASH programming mode).
5. Switch both PC and Atlas ON.
6. Run the download script to dump the file, <root>\atlas\tmon\bin\tmon.fl to the parallel port on the PC or w/s. Or simply run the batch file, <root>\atlas\tmon\bin\load-tmon.bat.
7. If you see "FINISHED" on the ASCII LEDs <it means that the burning is complete> disconnect the parallel cable.
8. Switch OFF the switch, S5-1 and reset Atlas.

Note:
1. TMON is burnt in the System Flash. So the onboard monitor (YAMON) is still available in the Monitor Flash. Atlas can now be booted with either the onboard monitor or TMON x.xx.
2. TMON can also be burnt in the Monitor Flash.




4 Setting up TMON x.xx CONSOL & working with it's Prompt

1. Connect null modem RS232 cables between the Atlas's serial port (tty 0) & a PC COM port.
2. Run a terminal utility - Hyperterminal (COM1 or some free COM port)
Settings: Baud - 115200 Stop, bits - 1, Parity - None & Flow - None
3. Turn ON the Atlas. The TMON logo & prompt should appear on the console window (Hyperterminal).
4. You can type in TMON commands at the prompt.




5 TMON commands

TMON commands constitute a keyboard ASCII character followed by the <Ret> or Enter key. Current command can be canceled using the escape key or modified with the help of backspace key. H command or Help can be issued for getting help on available commands (<H key> - <Ret key>).



6 Download procedure for application Images

Application code can be downloaded to either RAM or ROM space for execution.
1. RAM SPACE
a. Reset the Atlas
b. Issue L command or Load (<L key> - <Ret key>) on the TMON prompt.
c. Download the application image srec by sending the srec file (executable image) as text file through the terminal utility. For Hyperterminal: Transfer (on the menu bar) >> Send Text File >> pull the srec file to be sent.
(Eg.) sound.rec
2. ROM SPACE
a. Not supported in this release.





7 Executing application Images

Issue the G command or Go (<G key> - <Ret key>) to start execution. Go command starts the application image from it start location by default. This can also be altered by keying in a different address.




8 Developing Applications over TMON

Applications can be developed over TMON targeting the RAM or the FLASH (not supported presently) by studying the TMONx.xx memory Organization and appropriately locating the application code in the available unused memory space.


8.1 TMON x.xx Memory Organization

0000.0000 ~ 0000.04FF	TMON RAM vector redirection code	SDRAM
32 MB to 256 MB 
0000.0500 ~ 0000.07FF	TMON Soft-vector address table	
0000.0800 ~ 0004.FFFF	TMON .text (RAM copy), .bss, stack	
0005.0000 ~ 0FFF.FFFF	Unused (SDRAM size - 320 KB)	
1000.0000 ~ 17FF.FFFF	PCI Memory space (128 MB)	PCI address Space

1800.0000 ~ 181F.FFFF	PCI I/O space (2 MB)	
1BE0.0000 ~ 1BFF.FFFF	System controller Registers (2 MB)	System Controller
GT64120A
1C00.0000 ~ 1C01.FFFF	TMON .text, .data (ROM copy)	System flash (32 MB)
1C20.0000 ~ 1DFF.FFFF	Unused (31.875 MB)	
1E00.0000 ~ 1E3F.FFFF	Used by YAMON	Monitor flash (4 MB)
1F00.0000 ~ 1FBF.FFFF	Interrupt controller, timer, LED display etc. (12 MB)	FPGB address space
1FC0.0000 ~ 1FFF.FFFF or
1FC0.0000 ~ 21CF.FFFF	Rest & Exception HW Vector table
	Maps onto Monitor or System Flash

Where:
     Memory space used by the TMON 
     Memory space that can be overlaid by the application, if application does not return the call
     Memory space unused


8.2 Registering ESRs & ISRs

ESRs & ISRs can be registered by simply updating the appropriate FAJT (Fixed Address Jump Table) location with the address of the ESR/ISR. Note that TMON just routs the call to the registered ESR/ISR but does not modify or save any of the registers. So the ESR should take care of all these aspects & should return to the normal flow straight with an eret instruction. The FAJT offset locations are defined for all  MIPS exceptions, CPU Interrupts (HW0-HW5, SW0-SW1) & all Interrupt Controller interrupts in the atlas.h header file.

FAJT location definitions:
pESR_xx - ESR FAJT locations, where xx - specific exception code.
pCPUISR_xx - CPU ISR FAJT locations, where xx - specific CPU interrupt code.
pICISR_xx - IC ISR FAJT locations, where xx - specific IC interrupt line code.


Eg 1. Registering MOD Exception handler:

pESR_INT = (U32)__vHaltMOD;

Eg 2. Registering INT Exception handler:

pICISR_TIM0 = (U32)TIMER0_vISR;





9 Conclusion

Bugs, Improvements & comments can be freely reported to me through email: michaelanburaj@hotmail.com.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -