21-09-2014, 13:57
Hola, estoy con un codigo y me esta tirando un error cuando compilo en el archivo "Proyecto.axf"... el error que sale es el siguiente: "make: *** [Proyecto.axf] Error 1"
viendo un poco el codigo de compilacion:
Building target: Proyecto.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map="Proyecto.map" -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "Proyecto_Debug.ld" -o "Proyecto.axf" ./src/adc.o ./src/cr_startup_lpc175x_6x.o ./src/crp.o ./src/display.o ./src/funciones_generales_e_inicializacion.o ./src/main.o ./src/timer.o
./src/funciones_generales_e_inicializacion.o.data.counts_table+0x0): multiple definition of `counts_table'
./src/adc.o.data.counts_table+0x0): first defined here
./src/funciones_generales_e_inicializacion.o.data.temp_table+0x0): multiple definition of `temp_table'
./src/adc.o.data.temp_table+0x0): first defined here
./src/main.o.data.counts_table+0x0): multiple definition of `counts_table'
./src/adc.o.data.counts_table+0x0): first defined here
./src/main.o.data.temp_table+0x0): multiple definition of `temp_table'
./src/adc.o.data.temp_table+0x0): first defined here
./src/timer.o.data.counts_table+0x0): multiple definition of `counts_table'
./src/adc.o.data.counts_table+0x0): first defined here
./src/timer.o.data.temp_table+0x0): multiple definition of `temp_table'
./src/adc.o.data.temp_table+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [Proyecto.axf] Error 1
13:47:22 Build Finished (took 3s.348ms)
Veo que me esta tirando errores en la definicion de un array... probe el cambiarle el nombre, 3 veces, pero ese no fue el problema, y no encuentro el conflicto. Los array los inicializo de la siguiente manera:
int counts_table[] = {3887, 3828, 3756, 3670, 3568, 3449, 3314, 3163, 2997, 2818, 2630, 2437, 2241, 2048, 1859, 1678, 1524, 1349, 1203, 1070, 950, 842, 746, 661, 585, 519, 460, 408, 363, 324, 289, 257, 231};
int temp_table[] = {-40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120};
Alguna ayuda o idea de lo que esta pasando? Tambien probe el de sacar los valores negativos del segundo array, pero tira lo mismo.
viendo un poco el codigo de compilacion:
Building target: Proyecto.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map="Proyecto.map" -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "Proyecto_Debug.ld" -o "Proyecto.axf" ./src/adc.o ./src/cr_startup_lpc175x_6x.o ./src/crp.o ./src/display.o ./src/funciones_generales_e_inicializacion.o ./src/main.o ./src/timer.o
./src/funciones_generales_e_inicializacion.o.data.counts_table+0x0): multiple definition of `counts_table'
./src/adc.o.data.counts_table+0x0): first defined here
./src/funciones_generales_e_inicializacion.o.data.temp_table+0x0): multiple definition of `temp_table'
./src/adc.o.data.temp_table+0x0): first defined here
./src/main.o.data.counts_table+0x0): multiple definition of `counts_table'
./src/adc.o.data.counts_table+0x0): first defined here
./src/main.o.data.temp_table+0x0): multiple definition of `temp_table'
./src/adc.o.data.temp_table+0x0): first defined here
./src/timer.o.data.counts_table+0x0): multiple definition of `counts_table'
./src/adc.o.data.counts_table+0x0): first defined here
./src/timer.o.data.temp_table+0x0): multiple definition of `temp_table'
./src/adc.o.data.temp_table+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [Proyecto.axf] Error 1
13:47:22 Build Finished (took 3s.348ms)
Veo que me esta tirando errores en la definicion de un array... probe el cambiarle el nombre, 3 veces, pero ese no fue el problema, y no encuentro el conflicto. Los array los inicializo de la siguiente manera:
int counts_table[] = {3887, 3828, 3756, 3670, 3568, 3449, 3314, 3163, 2997, 2818, 2630, 2437, 2241, 2048, 1859, 1678, 1524, 1349, 1203, 1070, 950, 842, 746, 661, 585, 519, 460, 408, 363, 324, 289, 257, 231};
int temp_table[] = {-40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120};
Alguna ayuda o idea de lo que esta pasando? Tambien probe el de sacar los valores negativos del segundo array, pero tira lo mismo.