Example_281xRunFromXintf.gel
上传用户:qingfan3
上传日期:2014-10-27
资源大小:31439k
文件大小:3k
源码类别:

DSP编程

开发平台:

C/C++

  1. menuitem "DSP281x Run from XINTF"
  2. hotmenu Load_and_Build_Project()
  3. {
  4.    F2812_XINTF_Map();
  5.    GEL_Reset();   
  6.    GEL_ProjectLoad("Example_281xCodeRunFromXintf.pjt");
  7.    GEL_ProjectBuild("Example_281xCodeRunFromXintf.pjt");
  8. }
  9. hotmenu Load_Code()
  10. {
  11.    GEL_DisableRealtime();
  12.    F28112_XINTF_Map();
  13.    GEL_Reset();
  14. }
  15. OnReset()
  16. {
  17.    GEL_Load(".\debug\Example_281xCodeRunFromXintf.out");
  18. }
  19. OnFileLoaded()
  20. {
  21.    GEL_Go(main);
  22.    GEL_WatchReset();
  23.    GEL_WatchAdd("CpuTimer0.InterruptCount,x");
  24.    GEL_WatchAdd("BackgroundCount,x");
  25.    GEL_WatchAdd("CpuTimer0",,"CPU Timer Variables");
  26.    //Note: Go until after the DBGIER and DBGM bit are setup
  27.    GEL_Go(ConfigCpuTimer);
  28.    GEL_EnableRealtime();
  29. }
  30. F2812_XINTF_Map()
  31. {
  32.     GEL_MapReset();
  33.     GEL_MapOn();
  34.     /* Program memory maps */
  35.     GEL_MapAdd(0x0,0,0x800,1,1);                    /* M0/M1 SARAM  */
  36.     GEL_MapAdd(0x2000,0,0x2000,1,1);                /* XINTF ZONE 0 */
  37.     GEL_MapAdd(0x4000,0,0x2000,1,1);                /* XINTF ZONE 1 */
  38.     GEL_MapAdd(0x8000,0,0x2000,1,1);                /* L0/L1 SARAM  */
  39.     GEL_MapAdd(0x80000,0,0x80000,1,1);              /* XINTF ZONE 2 */
  40.     GEL_MapAdd(0x100000,0,0x80000,1,1);             /* XINTF ZONE 6 */
  41.     GEL_MapAdd(0x3d7800,0,0x800,1,0);               /* OTP          */
  42.     GEL_MapAdd(0x3d8000,0,0x20000,1,0);             /* FLASH        */
  43.     GEL_MapAdd(0x3f8000,0,0x2000,1,1);              /* H0 SARAM     */
  44.     /* Data memory maps */
  45.     GEL_MapAdd(0x0,1,0x800,1,1);                    /* M0/M1 SARAM  */
  46.     GEL_MapAdd(0x800,1,0x800,1,1);                  /* PF0          */
  47.     GEL_MapAdd(0x2000,1,0x2000,1,1);                /* XINTF ZONE 0 */
  48.     GEL_MapAdd(0x4000,1,0x2000,1,1);                /* XINTF ZONE 1 */
  49.     GEL_MapAdd(0x6000,1,0x1000,1,1);                /* PF1          */
  50.     GEL_MapAddStr(0x7000,1,0x1000,"R|W|AS2",0);     /* PF2          */
  51.     GEL_MapAdd(0x8000,1,0x2000,1,1);                /* L0/L1 SARAM  */
  52.     GEL_MapAdd(0x80000,1,0x80000,1,1);              /* XINTF ZONE 2 */
  53.     GEL_MapAdd(0x100000,1,0x80000,1,1);             /* XINTF ZONE 6 */
  54.     GEL_MapAdd(0x3d7800,1,0x800,1,0);               /* OTP          */
  55.     GEL_MapAdd(0x3d8000,1,0x20000,1,0);             /* FLASH        */
  56.     GEL_MapAdd(0x3f8000,1,0x2000,1,1);              /* H0 SARAM     */
  57.     /* Map External Interface Zone 7 if MPNMC = 1               */
  58.     GEL_MapAdd(0x3fc000,0,0x4000,1,1);          /* XINTF ZONE 7 */
  59.     GEL_MapAdd(0x3fc000,1,0x4000,1,1);          /* XINTF ZONE 7 */
  60. }