EmbDev.net

Forum: ARM programming with GCC/GNU tools problem to compile


von Sevc D. (sevc)


Rate this post
useful
not useful
Hi all.

today I start with LPC2148.
Download latest version of WinARM.
Create proto board with mcu and try.
from this addres
http://www.scienceprog.com/wp-content/uploads/2006/05/LPC2148.zip I
download program .
install LPC2000 flash utility and upload flash to mcu and Led blinking.
but if open project in WinARM (pn.exe) and make all then create differ
hex file like in original (from zip file).
If try to upload to mcu nothik to do. led just light.

I thinks so problem is on some redefinition.

after make  show me this:

> "make.exe" all

-------- begin --------
arm-elf-gcc (GCC) 4.1.1 (WinARM)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.


Assembling (ARM-only): crt0.S
c:/WinARM//bin/arm-elf-gcc -c -mcpu=arm7tdmi  -I. -x assembler-with-cpp
-DROM_RUN -Wa,-adhlns=crt0.lst,-gdwarf-2 crt0.S -o crt0.o

Compiling C (ARM-only): uartISR.c
c:/WinARM//bin/arm-elf-gcc -c -mcpu=arm7tdmi  -I. -gdwarf-2 -DROM_RUN
-Os -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch
-Wredundant-decls -Wreturn-type -Wshadow -Wunused
-Wa,-adhlns=uartISR.lst  -I./inc -I./conf -MD -MP -MF .dep/uartISR.o.d
-Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs  -std=gnu99 uartISR.c -o uartISR.o

Compiling C (ARM-only): armVIC.c
c:/WinARM//bin/arm-elf-gcc -c -mcpu=arm7tdmi  -I. -gdwarf-2 -DROM_RUN
-Os -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch
-Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-adhlns=armVIC.lst
-I./inc -I./conf -MD -MP -MF .dep/armVIC.o.d -Wstrict-prototypes
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs  -std=gnu99
armVIC.c -o armVIC.o

Compiling C: main.c
c:/WinARM//bin/arm-elf-gcc -c  -mcpu=arm7tdmi  -I. -gdwarf-2 -DROM_RUN
-Os -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch
-Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-adhlns=main.lst
-I./inc -I./conf -MD -MP -MF .dep/main.o.d -Wstrict-prototypes
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs  -std=gnu99
main.c -o main.o
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:39:1: warning: "WDMOD" redefined
In file included from main.c:8:
LPC214x.h:323:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:40:1: warning: "WDTC" redefined
In file included from main.c:8:
LPC214x.h:324:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:41:1: warning: "WDFEED" redefined
In file included from main.c:8:
LPC214x.h:325:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:42:1: warning: "WDTV" redefined
In file included from main.c:8:
LPC214x.h:326:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:49:1: warning: "T0IR" redefined
In file included from main.c:8:
LPC214x.h:145:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:50:1: warning: "T0TCR" redefined
In file included from main.c:8:
LPC214x.h:146:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:51:1: warning: "T0TC" redefined
In file included from main.c:8:
LPC214x.h:147:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:52:1: warning: "T0PR" redefined
In file included from main.c:8:
LPC214x.h:148:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:53:1: warning: "T0PC" redefined
In file included from main.c:8:
LPC214x.h:149:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:54:1: warning: "T0MCR" redefined
In file included from main.c:8:
LPC214x.h:150:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:55:1: warning: "T0MR0" redefined
In file included from main.c:8:
LPC214x.h:151:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:56:1: warning: "T0MR1" redefined
In file included from main.c:8:
LPC214x.h:152:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:57:1: warning: "T0MR2" redefined
In file included from main.c:8:
LPC214x.h:153:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:58:1: warning: "T0MR3" redefined
In file included from main.c:8:
LPC214x.h:154:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:59:1: warning: "T0CCR" redefined
In file included from main.c:8:
LPC214x.h:155:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:60:1: warning: "T0CR0" redefined
In file included from main.c:8:
LPC214x.h:156:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:61:1: warning: "T0CR1" redefined
In file included from main.c:8:
LPC214x.h:157:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:62:1: warning: "T0CR2" redefined
In file included from main.c:8:
LPC214x.h:158:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:63:1: warning: "T0CR3" redefined
In file included from main.c:8:
LPC214x.h:159:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:64:1: warning: "T0EMR" redefined
In file included from main.c:8:
LPC214x.h:160:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:71:1: warning: "T1IR" redefined
In file included from main.c:8:
LPC214x.h:165:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:72:1: warning: "T1TCR" redefined
In file included from main.c:8:
LPC214x.h:166:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:73:1: warning: "T1TC" redefined
In file included from main.c:8:
LPC214x.h:167:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:74:1: warning: "T1PR" redefined
In file included from main.c:8:
LPC214x.h:168:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:75:1: warning: "T1PC" redefined
In file included from main.c:8:
LPC214x.h:169:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:76:1: warning: "T1MCR" redefined
In file included from main.c:8:
LPC214x.h:170:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:77:1: warning: "T1MR0" redefined
In file included from main.c:8:
LPC214x.h:171:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:78:1: warning: "T1MR1" redefined
In file included from main.c:8:
LPC214x.h:172:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:79:1: warning: "T1MR2" redefined
In file included from main.c:8:
LPC214x.h:173:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:80:1: warning: "T1MR3" redefined
In file included from main.c:8:
LPC214x.h:174:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:81:1: warning: "T1CCR" redefined
In file included from main.c:8:
LPC214x.h:175:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:82:1: warning: "T1CR0" redefined
In file included from main.c:8:
LPC214x.h:176:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:83:1: warning: "T1CR1" redefined
In file included from main.c:8:
LPC214x.h:177:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:84:1: warning: "T1CR2" redefined
In file included from main.c:8:
LPC214x.h:178:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:85:1: warning: "T1CR3" redefined
In file included from main.c:8:
LPC214x.h:179:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:86:1: warning: "T1EMR" redefined
In file included from main.c:8:
LPC214x.h:180:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:93:1: warning: "PWMIR" redefined
In file included from main.c:8:
LPC214x.h:185:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:94:1: warning: "PWMTCR" redefined
In file included from main.c:8:
LPC214x.h:186:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:95:1: warning: "PWMTC" redefined
In file included from main.c:8:
LPC214x.h:187:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:96:1: warning: "PWMPR" redefined
In file included from main.c:8:
LPC214x.h:188:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:97:1: warning: "PWMPC" redefined
In file included from main.c:8:
LPC214x.h:189:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:98:1: warning: "PWMMCR" redefined
In file included from main.c:8:
LPC214x.h:190:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:99:1: warning: "PWMMR0" redefined
In file included from main.c:8:
LPC214x.h:191:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:100:1: warning: "PWMMR1" redefined
In file included from main.c:8:
LPC214x.h:192:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:101:1: warning: "PWMMR2" redefined
In file included from main.c:8:
LPC214x.h:193:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:102:1: warning: "PWMMR3" redefined
In file included from main.c:8:
LPC214x.h:194:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:103:1: warning: "PWMMR4" redefined
In file included from main.c:8:
LPC214x.h:195:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:104:1: warning: "PWMMR5" redefined
In file included from main.c:8:
LPC214x.h:196:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:105:1: warning: "PWMMR6" redefined
In file included from main.c:8:
LPC214x.h:197:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:106:1: warning: "PWMPCR" redefined
In file included from main.c:8:
LPC214x.h:199:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:107:1: warning: "PWMLER" redefined
In file included from main.c:8:
LPC214x.h:200:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:116:1: warning: "U0RBR" redefined
In file included from main.c:8:
LPC214x.h:204:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:117:1: warning: "U0THR" redefined
In file included from main.c:8:
LPC214x.h:205:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:118:1: warning: "U0IER" redefined
In file included from main.c:8:
LPC214x.h:208:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:119:1: warning: "U0IIR" redefined
In file included from main.c:8:
LPC214x.h:209:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:120:1: warning: "U0FCR" redefined
In file included from main.c:8:
LPC214x.h:210:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:121:1: warning: "U0LCR" redefined
In file included from main.c:8:
LPC214x.h:211:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:122:1: warning: "U0LSR" redefined
In file included from main.c:8:
LPC214x.h:213:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:123:1: warning: "U0SCR" redefined
In file included from main.c:8:
LPC214x.h:215:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:124:1: warning: "U0DLL" redefined
In file included from main.c:8:
LPC214x.h:206:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:125:1: warning: "U0DLM" redefined
In file included from main.c:8:
LPC214x.h:207:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:134:1: warning: "U1RBR" redefined
In file included from main.c:8:
LPC214x.h:222:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:135:1: warning: "U1THR" redefined
In file included from main.c:8:
LPC214x.h:223:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:136:1: warning: "U1IER" redefined
In file included from main.c:8:
LPC214x.h:226:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:137:1: warning: "U1IIR" redefined
In file included from main.c:8:
LPC214x.h:227:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:138:1: warning: "U1FCR" redefined
In file included from main.c:8:
LPC214x.h:228:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:139:1: warning: "U1LCR" redefined
In file included from main.c:8:
LPC214x.h:229:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:140:1: warning: "U1MCR" redefined
In file included from main.c:8:
LPC214x.h:230:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:141:1: warning: "U1LSR" redefined
In file included from main.c:8:
LPC214x.h:231:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:142:1: warning: "U1MSR" redefined
In file included from main.c:8:
LPC214x.h:232:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:143:1: warning: "U1SCR" redefined
In file included from main.c:8:
LPC214x.h:233:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:144:1: warning: "U1DLL" redefined
In file included from main.c:8:
LPC214x.h:224:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:145:1: warning: "U1DLM" redefined
In file included from main.c:8:
LPC214x.h:225:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:165:1: warning: "S0SPCR" redefined
In file included from main.c:8:
LPC214x.h:260:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:166:1: warning: "S0SPSR" redefined
In file included from main.c:8:
LPC214x.h:261:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:167:1: warning: "S0SPDR" redefined
In file included from main.c:8:
LPC214x.h:262:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:168:1: warning: "S0SPCCR" redefined
In file included from main.c:8:
LPC214x.h:263:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:169:1: warning: "S0SPINT" redefined
In file included from main.c:8:
LPC214x.h:264:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:233:1: warning: "PINSEL0" redefined
In file included from main.c:8:
LPC214x.h:73:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:234:1: warning: "PINSEL1" redefined
In file included from main.c:8:
LPC214x.h:74:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:235:1: warning: "PINSEL2" redefined
In file included from main.c:8:
LPC214x.h:75:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:250:1: warning: "MAMCR" redefined
In file included from main.c:8:
LPC214x.h:108:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:251:1: warning: "MAMTIM" redefined
In file included from main.c:8:
LPC214x.h:109:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:254:1: warning: "MEMMAP" redefined
In file included from main.c:8:
LPC214x.h:110:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:257:1: warning: "PLLCON" redefined
In file included from main.c:8:
LPC214x.h:113:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:258:1: warning: "PLLCFG" redefined
In file included from main.c:8:
LPC214x.h:114:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:259:1: warning: "PLLSTAT" redefined
In file included from main.c:8:
LPC214x.h:115:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:260:1: warning: "PLLFEED" redefined
In file included from main.c:8:
LPC214x.h:116:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:263:1: warning: "PCON" redefined
In file included from main.c:8:
LPC214x.h:125:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:264:1: warning: "PCONP" redefined
In file included from main.c:8:
LPC214x.h:126:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:267:1: warning: "VPBDIV" redefined
In file included from main.c:8:
LPC214x.h:129:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:270:1: warning: "EXTINT" redefined
In file included from main.c:8:
LPC214x.h:132:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:272:1: warning: "EXTMODE" redefined
In file included from main.c:8:
LPC214x.h:134:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:273:1: warning: "EXTPOLAR" redefined
In file included from main.c:8:
LPC214x.h:135:1: warning: this is the location of the previous
definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:280:1: warning: "VICIRQStatus" redefined
In file included from main.c:8:
LPC214x.h:27:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:281:1: warning: "VICFIQStatus" redefined
In file included from main.c:8:
LPC214x.h:28:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:282:1: warning: "VICRawIntr" redefined
In file included from main.c:8:
LPC214x.h:29:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:283:1: warning: "VICIntSelect" redefined
In file included from main.c:8:
LPC214x.h:30:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:284:1: warning: "VICIntEnable" redefined
In file included from main.c:8:
LPC214x.h:31:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:286:1: warning: "VICSoftInt" redefined
In file included from main.c:8:
LPC214x.h:33:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:288:1: warning: "VICProtection" redefined
In file included from main.c:8:
LPC214x.h:35:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:289:1: warning: "VICVectAddr" redefined
In file included from main.c:8:
LPC214x.h:36:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:290:1: warning: "VICDefVectAddr" redefined
In file included from main.c:8:
LPC214x.h:37:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:291:1: warning: "VICVectAddr0" redefined
In file included from main.c:8:
LPC214x.h:38:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:292:1: warning: "VICVectAddr1" redefined
In file included from main.c:8:
LPC214x.h:39:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:293:1: warning: "VICVectAddr2" redefined
In file included from main.c:8:
LPC214x.h:40:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:294:1: warning: "VICVectAddr3" redefined
In file included from main.c:8:
LPC214x.h:41:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:295:1: warning: "VICVectAddr4" redefined
In file included from main.c:8:
LPC214x.h:42:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:296:1: warning: "VICVectAddr5" redefined
In file included from main.c:8:
LPC214x.h:43:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:297:1: warning: "VICVectAddr6" redefined
In file included from main.c:8:
LPC214x.h:44:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:298:1: warning: "VICVectAddr7" redefined
In file included from main.c:8:
LPC214x.h:45:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:299:1: warning: "VICVectAddr8" redefined
In file included from main.c:8:
LPC214x.h:46:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:300:1: warning: "VICVectAddr9" redefined
In file included from main.c:8:
LPC214x.h:47:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:301:1: warning: "VICVectAddr10" redefined
In file included from main.c:8:
LPC214x.h:48:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:302:1: warning: "VICVectAddr11" redefined
In file included from main.c:8:
LPC214x.h:49:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:303:1: warning: "VICVectAddr12" redefined
In file included from main.c:8:
LPC214x.h:50:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:304:1: warning: "VICVectAddr13" redefined
In file included from main.c:8:
LPC214x.h:51:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:305:1: warning: "VICVectAddr14" redefined
In file included from main.c:8:
LPC214x.h:52:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:306:1: warning: "VICVectAddr15" redefined
In file included from main.c:8:
LPC214x.h:53:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:307:1: warning: "VICVectCntl0" redefined
In file included from main.c:8:
LPC214x.h:54:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:308:1: warning: "VICVectCntl1" redefined
In file included from main.c:8:
LPC214x.h:55:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:309:1: warning: "VICVectCntl2" redefined
In file included from main.c:8:
LPC214x.h:56:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:310:1: warning: "VICVectCntl3" redefined
In file included from main.c:8:
LPC214x.h:57:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:311:1: warning: "VICVectCntl4" redefined
In file included from main.c:8:
LPC214x.h:58:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:312:1: warning: "VICVectCntl5" redefined
In file included from main.c:8:
LPC214x.h:59:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:313:1: warning: "VICVectCntl6" redefined
In file included from main.c:8:
LPC214x.h:60:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:314:1: warning: "VICVectCntl7" redefined
In file included from main.c:8:
LPC214x.h:61:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:315:1: warning: "VICVectCntl8" redefined
In file included from main.c:8:
LPC214x.h:62:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:316:1: warning: "VICVectCntl9" redefined
In file included from main.c:8:
LPC214x.h:63:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:317:1: warning: "VICVectCntl10" redefined
In file included from main.c:8:
LPC214x.h:64:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:318:1: warning: "VICVectCntl11" redefined
In file included from main.c:8:
LPC214x.h:65:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:319:1: warning: "VICVectCntl12" redefined
In file included from main.c:8:
LPC214x.h:66:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:320:1: warning: "VICVectCntl13" redefined
In file included from main.c:8:
LPC214x.h:67:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:321:1: warning: "VICVectCntl14" redefined
In file included from main.c:8:
LPC214x.h:68:1: warning: this is the location of the previous definition
In file included from config.h:20,
                 from main.c:9:
LPC21xx.h:322:1: warning: "VICVectCntl15" redefined
In file included from main.c:8:
LPC214x.h:69:1: warning: this is the location of the previous definition

Compiling C: uart.c
c:/WinARM//bin/arm-elf-gcc -c  -mcpu=arm7tdmi  -I. -gdwarf-2 -DROM_RUN
-Os -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch
-Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-adhlns=uart.lst
-I./inc -I./conf -MD -MP -MF .dep/uart.o.d -Wstrict-prototypes
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs  -std=gnu99
uart.c -o uart.o

Compiling C: sysTime.c
c:/WinARM//bin/arm-elf-gcc -c  -mcpu=arm7tdmi  -I. -gdwarf-2 -DROM_RUN
-Os -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch
-Wredundant-decls -Wreturn-type -Wshadow -Wunused
-Wa,-adhlns=sysTime.lst  -I./inc -I./conf -MD -MP -MF .dep/sysTime.o.d
-Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs  -std=gnu99 sysTime.c -o sysTime.o

Linking: main.elf
c:/WinARM//bin/arm-elf-gcc  -mcpu=arm7tdmi  -I. -gdwarf-2 -DROM_RUN  -Os
-Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch
-Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-adhlns=crt0.lst
-I./inc -I./conf -MD -MP -MF .dep/main.elf.d crt0.o   uartISR.o armVIC.o
main.o  uart.o sysTime.o     --output main.elf -nostartfiles
-Wl,-Map=main.map,--cref -lc -lnewlib-lpc -lm -lc -lgcc  -lstdc++
-TLPC2148-ROM.ld

Creating load file for Flash: main.hex
c:/WinARM//bin/arm-elf-objcopy -O ihex main.elf main.hex

Creating Extended Listing: main.lss
c:/WinARM//bin/arm-elf-objdump -h -S -C main.elf > main.lss

Creating Symbol Table: main.sym
c:/WinARM//bin/arm-elf-nm -n main.elf > main.sym

Size after:
main.elf  :
section            size         addr
.text              3216            0
.bss                548   1073741824
.stack             1024   1073742592
.comment            135            0
.debug_aranges      192            0
.debug_pubnames     838            0
.debug_info        3144            0
.debug_abbrev      1268            0
.debug_line         974            0
.debug_frame        668            0
.debug_str          919            0
.debug_loc         1176            0
.debug_ranges       216            0
Total             14318



Errors: none
-------- end --------


> Process Exit Code: 0
> Time Taken: 00:01

von Clifford S. (clifford)


Rate this post
useful
not useful
In main.c you have included lpc214x.h followed by config.h which in turn
includes lpxc21xx.h which defines many of the same macros as lpc214x.h.

This generates only a warning because if the duplicate definitions are
identical, it will not cause a problem. However, generating that many
warnings, you might fail to spot genuine errors so it is best to fix it.
The files lpc214x.h and lpc21xx.h appear to have come from different
sources (different copyright owners) - that is probably not a good idea.
Use one or the other, but not both I suggest.

Other than that the code does not work because the -Os (optimise for
speed) option will cause code such as:

static void _delay(uint32_t N)
{
 for (uint32_t i=0; i<N;i++);
}

to be optimised to nothing. The compiler sees that i is never used, so
it will omit the code altogether; after all you did tell it to generated
code that executes code fast - what could be faster than that! ;-)

Apart from the fact that you would be far better-off using a hardware
timer for delays, you can prevent this code being optimised out thus:

static void _delay( uint32_t N )
{
   for( volatile uint32_t i = 0; i < N; i++ );
}

Clifford

von Sevc D. (sevc)


Rate this post
useful
not useful
Hi original code I change
> static void _delay(uint32_t N)
> {
>  for (uint32_t i=0; i<N;i++);
> }
>

with this
> static void _delay( uint32_t N )
> {
>    for( volatile uint32_t i = 0; i < N; i++ );
> }

and work thanks.
I need some time to learn ... .
regards

von Clifford S. (clifford)


Rate this post
useful
not useful

von Sevc D. (sevc)


Rate this post
useful
not useful
Clifford Slocombe wrote:
> Sevc Dominik wrote:
>> I need some time to learn ... .
>
> Some articles you might read:
> http://www.embedded.com/columns/beginerscorner/9900209
> http://www.embedded.com/columns/programmingpointers/170701302
> http://www.embedded.com/columns/programmingpointers/174300478
> http://www.embedded.com/columns/programmingpointers/175801310

nice.

I want start prject to create own CNC mill machine.
I create one and use MACH3 software.But it use Printer port and I need
more input and output to control me machine(not just mill).
I have ide to create with ARM7 (AVR is too slow).
ARM have more speed , more free pin ... .but I want work with Gcode in
CPU not in PC. PC send gcode trought USB and , ARM calculate speed ,
acrerelation ... .
any sugestion (I know it's for other forum)
regards

von Mhel M. (mhel)


Rate this post
useful
not useful
> I want start prject to create own CNC mill machine.
> I create one and use MACH3 software.But it use Printer port and I need
> more input and output to control me machine(not just mill).
> I have ide to create with ARM7 (AVR is too slow).
> ARM have more speed , more free pin ... .but I want work with Gcode in
> CPU not in PC. PC send gcode trought USB and , ARM calculate speed ,
> acrerelation ... .
> any sugestion (I know it's for other forum)
> regards


you can start here: (not arm but pic, but it could be a good start)
http://cstep.luberth.com/PStep.html
http://ogrenci.hacettepe.edu.tr/%7Eb0164043/maximus/index.htm

mhel

von Clifford S. (clifford)


Rate this post
useful
not useful
Sevc Dominik wrote:
I create one and use MACH3 software.But it use Printer port and I need
> more input and output to control me machine(not just mill).

You may be approaching this from the wrong direction. There are plenty
of Industrial I/O solutions for PCs that will provide plenty of I/O. As
far As I can tell from the www.artsoftcontrols.com web-site, the
software supports Modbus I/O. Take a look at the Modbus modules in the
ADAM-4000 range for example:
http://www.advantech.com/products/RS-485-I-O-Modules/sub_1-23I55L.aspx

You could even easily use you ARM board as a Modbus I/O device and
continue to use the PC with the MACH3 software talking to your board as
an I/O device.

Clifford

von Sevc D. (sevc)


Rate this post
useful
not useful
Clifford Slocombe wrote:
> Sevc Dominik wrote:
> I create one and use MACH3 software.But it use Printer port and I need
>> more input and output to control me machine(not just mill).
>
> You may be approaching this from the wrong direction. There are plenty
> of Industrial I/O solutions for PCs that will provide plenty of I/O. As
> far As I can tell from the www.artsoftcontrols.com web-site, the
> software supports Modbus I/O. Take a look at the Modbus modules in the
> ADAM-4000 range for example:
> http://www.advantech.com/products/RS-485-I-O-Modules/sub_1-23I55L.aspx
>
> You could even easily use you ARM board as a Modbus I/O device and
> continue to use the PC with the MACH3 software talking to your board as
> an I/O device.
>
> Clifford

Hi Clifford.
All what you write is true, but why we create own programs , electronic
and construction.Ever what we create can we buy (I thinks). In fact we
aare small Edison (I'm very small :-) ).
Create machine and software to only drill is easy , but mill where must
calculate max. speed , aceleration and all motion must stop in same time
it is problem.

regards.

von Clifford S. (clifford)


Rate this post
useful
not useful
Sevc Dominik wrote:
> All what you write is true, but why we create own programs , electronic
> and construction.Ever what we create can we buy (I thinks).
I am not suggesting that you don't write your own code, merely that the
platform can remain a PC. If I/O is the only reason you can't use a PC
there are numerous industrial I/O cards that will solve that problem.
The  www.artsoftcontrols.com site makes much of the ability to
accuratley send pulses, overcoming the lack of real-time control on
Windows; I an not sure how well thier solution works, but well a better
solution for more comples applications is simply not to use Windows, but
rather an RTOS such as MicroC/OS-II, or eCOS for example.

> Create machine and software to only drill is easy , but mill where must
> calculate max. speed , aceleration and all motion must stop in same time
> it is problem.
You need to be aware of PID control loops.
http://en.wikipedia.org/wiki/PID_controller They are fundamental to most
motion control applications. It is possible to perform open loop control
using stepper motors, but a servo motor can have far more torque in
relation to its size, allowing less gearing and consequently potentially
greater accuracy.

Clifford

von Sevc D. (sevc)


Rate this post
useful
not useful
Hi.

Clifford Slocombe wrote:
> You need to be aware of PID control loops.
huh , I read wikipediu ... . complicated for me.
Now I create application in delphi to simulate motion in 3-axis (X,Y,Z).
Set max. speed,max acerelation,step... . for ax , and calculate with
other ax.
want calculate and see number if is easy or more complicated to start
motion 3ax and stop in same time.
But this is not for this forum.
I want direct control from MCU (LPC2148) Mosfet transistor for unipolar
motor.
and how create motion (half step), controll max current for motor ... .
Me sugestion is to use PWM for control current in coil. Use ADC input to
read real value and change PWM parameter.
60MHz ARM7 core is good or slow to controll 3-axis.

regards

von Clifford S. (clifford)


Rate this post
useful
not useful
Sevc Dominik wrote:
> I want direct control from MCU (LPC2148) Mosfet transistor for unipolar
> motor.
> and how create motion (half step), controll max current for motor ... .
> Me sugestion is to use PWM for control current in coil. Use ADC input to
> read real value and change PWM parameter.
> 60MHz ARM7 core is good or slow to controll 3-axis.

You'd have to describe your hardware in more detail (links to the
motors/circuits etc). Measuring the input is not very useful, you need
to measure the output. This is normally done with a quadrature encoder
(http://en.wikipedia.org/wiki/Rotary_encoder#Incremental_rotary_encoder).
You also need ot drive teh motor in both directions. You need to be able
to do this even if you only ever move in one direction because a PID
must be able to reverse the current in order to control deceleration and
braking (otherwise it will just coast to a stop). To do this for a
brushed DC motor you need an H-Bridge
(http://en.wikipedia.org/wiki/H_bridge), if you use brushless DC motors
(BLDC) control is more complex since you need to electronically
commutate the motor. There are chips that do that for you, or you can do
it in the microprocessor, but each axis requires three PWM signals, so
for three axes this is not very practical, you'll generally need one
micro per axis. I don't know much about unipolar motors.

Clifford

von Sevc D. (sevc)


Rate this post
useful
not useful
Hi.
hmmm.
I now use unipolar steper motor look at this teory:
http://www.gravirovanie.sk/krok.%20mot.nov/leptetomotorok.htm
I use 6-wire motor. To control can use L298D or else, but I thinks so
good is from trinamic TMC239 + MosFet transistor.This driver have
current regulator for coil... , and use external PWM to control current.
My teoretical solution use MCU LPC2148 or else.Send data from PC to MCU
over  USB (HID or Serial port emulated) and calculate G-code in MCU.To
drive motor use exteranl driver (TMC239).If drill it is easy. Set
position and calculate how many step need.For mill is complicated.
I create easy program in delphi to calculate all variable(slovak
language) and show max speed, accerelation, lenght ... for all motion.
now must write to not for speed mm/s ,but for step/s . Can sownload from
www.sevc.szm.sk/CNC.zip .
I don't know if calculate good. try it .

regards

von Mhel M. (mhel)


Rate this post
useful
not useful
Sevc,

Check this site for easy to build stepper drivers http://www.pminmo.com

There's also a open source DOS app called CNCpro. Join yahoo groups
http://tech.groups.yahoo.com/group/CNCPro/  and get the files
you can look at the interpolation algorithm they used. And if you make
it work on your lpc2148 don't forget to share :)

Mhel.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.