1 / 16

NET+OS 6.1 Training

NET+OS 6.1 Training. Debugging. SDRAM Memory settings. Settings.s contains the memory controller register settings for SDRAM. (not in debugger) If you use different memory parts you must modify this file (PC133). RAS and CAS Delay Registers Dynamic memory configuration registers.

rbradwell
Télécharger la présentation

NET+OS 6.1 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. NET+OS 6.1 Training NetSilicon & Digi Confidential

  2. Debugging NetSilicon & Digi Confidential

  3. SDRAM Memory settings • Settings.s contains the memory controller register settings for SDRAM. (not in debugger) • If you use different memory parts you must modify this file (PC133). • RAS and CAS Delay Registers • Dynamic memory configuration registers NetSilicon & Digi Confidential

  4. SRAM (flash) • Table defined in bsp.c defines the register settings for SRAM parts • SRAM memory configuration registers, specifies 16 bit or 32-bit. • Static memory Read Delay registers NetSilicon & Digi Confidential

  5. Remember…. • To modify defines in bsp.h to enable drivers • We now have four serial ports, two are UART and one is SPI and one is not connected. • The boards default to support USB host • Only big endian is supported • There is no EEPROM support for NVRAM NetSilicon & Digi Confidential

  6. Using the Majic Debugger • Initialization Script • JTAG Reset Issue • Debugging with GDB • Debugging with Green Hills NetSilicon & Digi Confidential

  7. Initialization Script • The debugger initialization file is called ns9750_a.cmd • Initializes SDRAM on CS4 • For different types of SDRAM you will have to modify this script • Sets a bit in an SCM register to tell the code that we are in the debugger • Same script works for GNU and Green Hills NetSilicon & Digi Confidential

  8. Initialization Script • Uses monitor commands to read and write registers. • These commands are described in the EPI documentation provided with NET+OS • Sets up the memory controller registers which are described in the HW reference guide NetSilicon & Digi Confidential

  9. Monitor commands • Monitor commands can be used in the MONICE low level debugger • The MONICE debugger is helpful in board bring up, allows you to read/write memory and has built in memory test. • You can create an icon for the MONICE debugger using the majic setup wizard • ew = enter word, dw = display word NetSilicon & Digi Confidential

  10. Initialization: (cont) • // • // Minimal memory controller initialization--just enough to allow code • // to be downloaded. Boot code will do the rest. • // • ew 0xA0700000 = 0x00000001 // Enable the memory controller. • ew 0xA0700024 = 0x00000006 // Set the refresh counter, 60 is optimal, 30 is safer for now • ew 0xA0700028 = 0x00000001 // • ew 0xA0700030 = 0x00000001 // Set the precharge period • ew 0xA0700034 = 0x00000004 // Active to precharge command period is 16 clock cycles • ew 0xA070003C = 0x00000001 // tAPR • ew 0xA0700040 = 0x00000005 // tDAL • ew 0xA0700044 = 0x00000001 // tWR • ew 0xA0700048 = 0x00000006 // tRC 32 clock cycles • ew 0xA070004C = 0x00000006 // tRFC 32 clock cycles NetSilicon & Digi Confidential

  11. Using the majic with GNU • All debugger files are setup by the majic setup wizzard • Epimdi.cfg - Contains the units IP address - processor type and endianess - This file should not have to modified • Startice.cmd - You do not have to modify this file - Contains JTAG configuration commands • ns9750_a.cmd - SDRAM initialization commands NetSilicon & Digi Confidential

  12. JTAG Reset Issue • Cannot run the debugger if there is code in flash (runs unstable) • We don’t have a fix for this yet. • Fixed in the next version of Mercury • Before you power on the board you need to put jumper J1 ON if there is code in flash • Once you start the debugger you can remove JI, this is error prone. You need to remove this jumper before you access flash (NVRAM) NetSilicon & Digi Confidential

  13. GNU Debugging (Cont) • In your applications 32b directory “make gdbinit” This will create a .gdbinit file in your 32b directory. You only need to do this once. The .gdinit file is the initialization file for gdb. And contains the monitor load command. • Type “xtools arm-elf” to specify the processor type NetSilicon & Digi Confidential

  14. GNU Debugging • Put J1 on if there is code in flash • Power on the board • Type gdbtk –se image.elf, the code will start downloading to the board • Remove J1, if you need to access flash • You are now ready to debug. NetSilicon & Digi Confidential

  15. Debugging with GHS • Debugger files are located in /ghs/arm361 and are setup by the installer • rdimajic.cfg - IP address - Processor type, endian • startice.cmd and ns9750_a.cmd, same as GNU • Put J1 on if necessary and Power on board • Start multi and build your application NetSilicon & Digi Confidential

  16. Debugging with GHS (cont) • Click on download to target • rdiserv –ice –nobss –big • You can remove the jumper once the code starts to download, if you need to access flash. • You can now start debugging NetSilicon & Digi Confidential

More Related