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

📄 readme

📁 RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
💻
字号:
##  $Id: README,v 1.3 2002/03/01 16:21:52 joel Exp $#BSP supporting the on-CPU capabilities of the Synova Mongoose-V.This BSP assumes that basic HW initialization is performed byPMON.Address Map===========This is the generic address map of the Mongoose-V prototyping boardthis BSP was tested on.0x8000_0000 - 0x8FFF_FFFF   - RAM (KSEG0 cached)0xA000_0000 - 0xAFFF_FFFF   - RAM (KSEG1, same memory uncached)0xBFC0_0000 - 0xBFFF_FFFF   - EEPROM0xFFFE_xxxx                 - on-CPU peripheralsThis is the hardware address map of the board used as it wasactually populated.0x8000_0000 - 0x83FF_FFFF   - 32 MB RAM (KSEG0 cached)0xA000_0000 - 0xA3FF_FFFF   - 32 MB RAM (KSEG1, same memory uncached)0xBFC0_0000 - 0xBFDF_FFFF   - 2 MB EEPROM0xFFFE_xxxx                 - on-CPU peripheralsThis is the organization of the EEPROM when fully populated.  Sincethe board used to develop this BSP only had the first bank of EEPROMpopulated, only the first program image area was used.0xBFC0_0000 - 0xBFC3_FFFF   - PMON0xBFC4_0000 - 0xBFC4_FFFF   - reserved for boot loader0xBFC5_0000 - 0xBFDF_FFFF   - reserved for program 1 image0xBFE0_0000 - 0xBFFF_FFFF   - reserved for program 2 imageThe Mongoose-V on this board is at 12 Mhz.Downloading===========On the breadboard, a locally hacked PMON waits for a space to be pressedwhile the board is reset/powered up.  If found, the PMON console isentered, else PMON jumps to the EEPROM address above, presuming a userprogram is located there.The default output of an RTEMS link is an image linked to run from0x80020000.  It is suitable for copying to S3 records or can be burnedto ROMs in whatever manner the user desires.  If you want to locate theimage into ROM at some other address, use mips-rtems-objcopy to shiftthe LMA.Operation=========A small relocator is supplied in the bsp startup code which copies theimage down to RAM for execution before doing any other initialization.This locator code is location independent, and will do nothing if theimage is already located at its run location.  The LMA and VMA are bothcontrolled via the bsp's link script.  The above behavior is produced byusing the default script.  If this is not desirable, something like thefollowing may be added to the user's RTEMS link statement to overridethe default linkcmds with a user-supplied version;-qnolinkcmds -Wl,-T -Wl,mips-rtems-linkcmds-epromthis causes the file ./mips-rtems-linkcmds-eprom to override the defaultlinkcmds.Before relocating the RTEMS image, the bsp startup routine attempts toconfigure the processor into a rational state.  During this process,status characters are emitted at 19200N81 on UART port 0.The default link script simply places the image at 0x8002000 withLMA=VMA, which is conviently located in RAM on our board.  You shouldprobably consider creating your own linkcmds, putting things where youwant and supply it as above.  The Mongoose V has a somewhat restricted cache configuration model; youcan only flush it if the code which does so executes within noncachedmemory, in our case, code in kseg1.  If you do so from elsewhere thecode will appear to lock up, this is caused by the cache clearingroutine making the instruction fetch always return 0, or nop- leavingthe processor in an endless loop.  The default start.S code detects ifits booting from outside kseg1, it which case it disables the cacheflush code.  This means you cannot flush the cache with the bsp'sfunctions if you boot your program from outside kseg1.  A more subtleissue is the bsp keeps a pointer to the location in kseg1 where thebsp's cache flush code resides.  This is advantageous because you canrelocate the system anywhere and still control the cache, but mightcause trouble if the boot image becomes inaccessible.  If this ispossible, you should probably consider rolling your own cache control &disabling the bsp's.As stated above, if you boot from outside kseg1, the bsp disables thecache flush routines.  This is not desirable in the long run because theMongoose V remote debugger stub assumes it can flush caches when exitingan exception so it might not be able to update code/data properly,though it should still nominally function.  However, if you're not usingthe remote debugger & don't care about flushing caches, then everythingshould run just fine.Our approach has to been locate ROM in kseg1, link the code for VMA inRAM and relocate the LMA up into kseg1 ROM.  Since the start.S code isposition-independent, it will relocate the entire app down to the VMAregion before starting things up with everything in its proper place.The cache clear code runs before relocation, so executes from ROM &things work.You can prevent including the default start.S by adding;-qnostartfileto the link command line in addition to the "nolinkcmds" options above.Be sure to supply your replacement start.o.Questions=========Why can I send characters slowly to a Mongoose V, but get framing errorswhen sending them fast?- The MongooseV chip seems to <require> that all incoming data have 2  stop bits.  When typing on a serial terminal, this is not an issue  because the idle state of an RS232 line looks just like a stop bit-  but when streaming in data, such pacing is required.  The manual does  not indicate anything along these lines, instead, we suspect a  somewhat faulty UART design.Debugging=========After getting Joel's initial port of the gdb stub to the Mongoose bsp, Iworked up & tested this stub on our R3000 board.  It seems to work OK.Our MIPS has 2 serial ports, the first being dedicated to the console, Ichose to arrange the 2nd one for the remote gdb protocol.  While thissolution is somewhat specific to our board & bsp, I think the techniqueis quite generalizable.The following is a code snippet to be included in the user program;/***********************************************/extern int mg5rdbgOpenGDBuart(int);extern void mg5rdbgCloseGDBuart(void);void setupgdb(void){   printf("Configuring remote GDB stub...\n");   /* initialize remote gdb support */   if( mg5rdbgOpenGDBuart(-1) != RTEMS_SUCCESSFUL )   {      printf("Remote GDB stub is disabled.\n\n");   }}/***********************************************/It allows the program to decide if it wants gdb to be ready to pick upexceptions or not.  The 2 extern functions are located in the MongooseVbsp inside gdb-support.c.  They configure & initialize the 2nd serialport & invoke the vector initialization routine located in cpu_asm.Note, we call directly down into the MongooseV UART driver- its quiteunfriendly to TERMIO.  I chose this approach because I wanted tominimize dependence on the I/O subsystems because they might be in astate just short of collapsing if the program had done something bad tocause the exception.If user code leaves the 2nd port alone, then things will work out OK.Greg Menke2/27/2002============================================================================

⌨️ 快捷键说明

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