]> git.sur5r.net Git - openocd/blobdiff - src/jtag/rlink/init.m4
- fix rlink build under native win32 (mingw)
[openocd] / src / jtag / rlink / init.m4
index 268462ffef3209255585cf168727e0e86b41b142..3e64523c65fa79a518102e16f804507c2b901fd1 100644 (file)
@@ -1,74 +1,74 @@
-m4_divert(`-1')\r
-/***************************************************************************\r
- *   Copyright (C) 2008 Lou Deluxe                                         *\r
- *   lou.openocd012@fixit.nospammail.net                                   *\r
- *                                                                         *\r
- *   This program is free software; you can redistribute it and/or modify  *\r
- *   it under the terms of the GNU General Public License as published by  *\r
- *   the Free Software Foundation; either version 2 of the License, or     *\r
- *   (at your option) any later version.                                   *\r
- *                                                                         *\r
- *   This program is distributed in the hope that it will be useful,       *\r
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *\r
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *\r
- *   GNU General Public License for more details.                          *\r
- *                                                                         *\r
- *   You should have received a copy of the GNU General Public License     *\r
- *   along with this program; if not, write to the                         *\r
- *   Free Software Foundation, Inc.,                                       *\r
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *\r
- ***************************************************************************/\r
-\r
-m4_undefine(`CTRL_MPEG_L')\r
-m4_undefine(`CTRL_CARD_L')\r
-\r
-m4_ifelse(SHIFTER_PRESCALER, 1, `\r
-       m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x0')')\r
-')\r
-m4_ifelse(SHIFTER_PRESCALER, 2, `\r
-       m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x2')')\r
-       m4_define(`CTRL_CARD_L', `m4_eval(`0x8 | 0x1')')\r
-')\r
-m4_ifelse(SHIFTER_PRESCALER, 8, `\r
-       m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x3')')\r
-')\r
-m4_ifelse(SHIFTER_PRESCALER, 11, `\r
-       m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x4')')\r
-')\r
-m4_ifelse(SHIFTER_PRESCALER, 64, `\r
-       m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x7')')\r
-')\r
-\r
-m4_ifdef(`CTRL_MPEG_L',,`\r
-       m4_errprint(`SHIFTER_PRESCALER was not defined with a supported value\r
-')     m4_m4exit(`1')\r
-')\r
-\r
-m4_divert(`0')m4_dnl\r
-\r
-init:\r
-       A.H = 0\r
-\r
-       A.L = 0\r
-\r
-       DR_MPEG = A     ; TDI and TCK start out low\r
-       DR_CARD = A     ; TMS starts out low\r
-\r
-       A.L = 0x6\r
-\r
-       CTRL_FCI = A    ; MPEG and CARD driven by FCI\r
-       DDR_MPEG = A    ; TDI and TCK are outputs\r
-\r
-       A.L = 0x1\r
-\r
-       X = A           ; X == 1\r
-       DDR_CARD = A    ; TMS is output\r
-\r
-       A.L = CTRL_MPEG_L\r
-       CTRL_MPEG = A\r
-m4_ifdef(`CTRL_CARD_L',\r
-`      A.L = 'CTRL_CARD_L`\r
-')m4_dnl\r
-       CTRL_CARD = A\r
-\r
-       STATUS STOP\r
+m4_divert(`-1')
+/***************************************************************************
+ *   Copyright (C) 2008 Lou Deluxe                                         *
+ *   lou.openocd012@fixit.nospammail.net                                   *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+
+m4_undefine(`CTRL_MPEG_L')
+m4_undefine(`CTRL_CARD_L')
+
+m4_ifelse(SHIFTER_PRESCALER, 1, `
+       m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x0')')
+')
+m4_ifelse(SHIFTER_PRESCALER, 2, `
+       m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x2')')
+       m4_define(`CTRL_CARD_L', `m4_eval(`0x8 | 0x1')')
+')
+m4_ifelse(SHIFTER_PRESCALER, 8, `
+       m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x3')')
+')
+m4_ifelse(SHIFTER_PRESCALER, 11, `
+       m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x4')')
+')
+m4_ifelse(SHIFTER_PRESCALER, 64, `
+       m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x7')')
+')
+
+m4_ifdef(`CTRL_MPEG_L',,`
+       m4_errprint(`SHIFTER_PRESCALER was not defined with a supported value
+')     m4_m4exit(`1')
+')
+
+m4_divert(`0')m4_dnl
+
+init:
+       A.H = 0
+
+       A.L = 0
+
+       DR_MPEG = A     ; TDI and TCK start out low
+       DR_CARD = A     ; TMS starts out low
+
+       A.L = 0x6
+
+       CTRL_FCI = A    ; MPEG and CARD driven by FCI
+       DDR_MPEG = A    ; TDI and TCK are outputs
+
+       A.L = 0x1
+
+       X = A           ; X == 1
+       DDR_CARD = A    ; TMS is output
+
+       A.L = CTRL_MPEG_L
+       CTRL_MPEG = A
+m4_ifdef(`CTRL_CARD_L',
+`      A.L = 'CTRL_CARD_L`
+')m4_dnl
+       CTRL_CARD = A
+
+       STATUS STOP