TODOPIC
Microcontroladores PIC => Todo en microcontroladores PIC => Mensaje iniciado por: adbensi en 30 de Mayo de 2006, 10:34:50
-
Hi :-/,
I need help to solve one problem with BANK_MEMORY of PIC18F258 and section in C18 of Mplink,
I tried to solve this problem creating more sessions, but, I have one bigger vector, and I didn´t know how to solve this, because I can´t to minimize the bigger vector.
The opcode:
////////////////////
#pragma idata uno // this is work. :)
char const uno [195]={ // I can to fix the section uno. :P
[...library of Noctuno...]
};
#pragma idata
#pragma idata F_7_8 // this is doesn´t work. :?
char const F_7_8 [685]={ // I can´t to fix this bigger vector :(
[...library of Noctuno...] // in one section.
}; //
#pragma idata // How do can do? :shock:
#pragma idata tres
[...more code...]
////////////////////
Linker ask to me: Error - section 'F_7_8' can not fit the section. Section 'F_7_8' length=0x000002ad
I saw one sample in (http://forum.microchip.com/tm.aspx?m=159738),
but I can´t to minimize the vector F_7_8, How do can do? :shock:
Thanks,
Saludos,
Alexandre.
-
adbensi can you post your linker file? There are many sample code about "how to allocate more than 256 bytes arrays" on the Microchip site but you have to modify the linker file in order to make it work.
As far as I can see, the section F_7_8 is too small.
adbensi puedes subir el archivo del linker? Hay muchos ejemplos sobre como "alojar arrays de mas de 256 bytes" en el sitio de Microchip pero debes modificar el archivo de linker para hacer que esto funcione.
Hasta donde puedo ver, la sección F_7_8 es muy pequeña.
PD: muchachos, por lo que conozco adbensi habla portugues y se ve que se le hizo complicado explicar su problema en español.
-
Gracias Maumix :-/
Estoy inserindo el archivo del linker .map (linkermap.txt),
tieno el archivo de linker, ejemplo:
CODEPAGE NAME=page START=0x2A END=0x7FFF
ACCESSBANK NAME=accessram START=0x0 END=0x5F
DATABANK NAME=gpr0 START=0x60 END=0xFF
DATABANK NAME=gpr1 START=0x100 END=0x1FF
DATABANK NAME=gpr2 START=0x200 END=0x2FF
DATABANK NAME=gpr3 START=0x300 END=0x3FF
DATABANK NAME=gpr4 START=0x400 END=0x4FF
DATABANK NAME=gpr5 START=0x500 END=0x5FF
ACCESSBANK NAME=accesssfr START=0xF60 END=0xFFF
char tiene 8 bytes, mult per 685 posiciones del vector (char F_7_8 [685]), resulta 5480 bytes (START=0x0 END=0x1568)
Codepage page tiene ~ 32Kbytes (START=0x2A END=0x7FFF). :-)
Dos tipos de secciones para cada tipo de memoria, tiene alguno que puede alocar 5480 bytes? :lol:
code: instrucciones en memoria de programa
romdata: datos en memoria de programa
udata: variables de usuario estáticas sin inicializar
idata: variables de usuario estáticas inicializadas
I don´t see relation between linker file and code map file to can to modify the struct in linker file. :?
How to configure the linker file using the code map file? You teach to me? :mrgreen:
Muthas Gracias! :-/
Saludos!
-
English
adbensi the .map file is the output "during and after" the linking. If the linking process fails then the map file will be incomplete.
The linker file is the file that tells the compiler where to allocate the variables and the program code.
Tell me are you trying to make an array in RAM or in Program Memory? Is quite different!
Please note this that you wrote:
char tiene 8 bytes, mult per 685 posiciones del vector (char F_7_8 [685]), resulta 5480 bytes (START=0x0 END=0x1568)
A char variable is 8bits long so its 1 byte long!, then char F_7_8 [685] will ocupy 685 bytes.
Please can you post your .c file, and your complete .lkr file?
Español
adbensi el archivo .map es la salida durante y despues del proceso de linkeado. Si el proceso de linkeado falla luego el archivo .map quedará incompleto.
Dime, estas intentando hacer un array en RAM o en la Memoria de Programa? Es bastante diferente!
Por favor, nota lo siguiente:
Una variable char tiene 8 bits de longitud osea que ocupa 1 byte. Luego char F_7_8 [685] ocupará 685 bytes.
Puedes subir tu archivo .c y el archivo .lkr completos?
Saludos
-
Gracias! :D
Estoy inserindo el archivo fuente.zip con biblioteca_noctuno, main_lcd y pic18f258.lkr :-)
I am trying to make an array in RAM, but i can to use ROM too, because this vector doesn´t change.
I understand yours posts in Español. I have difficult to express my questions, but understand you. :-)
Mui gracias, :-/
Saludos!!
-
jejeje aquí en el foro no hay barreras de lenguaje :mrgreen:
-
rsss... es verdade :D
Tieno una buena :D :-/ :-/ :-/
I put the vectors to alocate in "rom", then BUILD SUCCEEDED, but i have one problem yet.. :?
The vector "char MemoriaVideo[504]" doesn´t can to be rom data.
I need to allocate 504 bytes array in RAM to this vector. any suggestion how to do this ?
Gracias, Saludos !! :-)
-
migsantiago se hace lo que se puede ;) . Si le entiendo trataré de responderle no si antes ponerlo también en el idioma del foro así alguno que no sepa inglés pueda entender de que estamos hablando ya que hasta donde sé el espíritu del foro es hablar en español.
adbensi que bueno que hayas resuelto tu problema de los arrays en ROM. No me has dado tiempo a probar una solución en mi escaso tiempo libre que ya lo has resuelto, me alegro por tí ;).
En cuanto a hacer arrays en RAM fijate el siguiente link
http://forum.microchip.com/tm.aspx?m=39357 (http://forum.microchip.com/tm.aspx?m=39357)
Si observas debes 'unir' dos secciones de memoria hasta lograr el tamaño requerido.
El ejemplo en cuestión es para 384 bytes pero podrías hacerlo extensivo a 504.
Saludos
PD: si algún moderador lee estos posts, creo que sería mejor moverlos a la sección lenguaje C para microcontroladores donde creo que el tema se ajusta más.
-
MigSantiago, és uno MESTRE! :-/
Mui gracias por su ayuda!! My problema és finito con su indicacione :-) :-) :-) :-)
Saludos! :-/
-
MigSantiago, és uno MESTRE! :-/
Mui gracias por su ayuda!! My problema és finito con su indicacione :-) :-) :-) :-)
Saludos! :-/
Me alegro mucho :) :mrgreen: :mrgreen:
-
Abdensi, qué bueno que tus programas están funcionando :)