![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| PIC Programing / Design Discuss programing of PIC chips here and design of electronics using PIC chips. |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Hello, I am relatively new to programing pics but I have MPLAB and PIKIT1 Classic and can easily program (assembly) and control I/O on a 12f675 which is great but here is my problem: I have been using the linker file in my projects on the 12f and tried moving up to a 16f684 and when I include the linker file (recommended in the MPLAB manual, using the project wizard) I constantly get a "cannot fit ORG 0x000" error when I try to build it. This is a Linker error according to the build screen. I have even tried this with the supplied code template from Microchip so I don't think my code is at fault. I finally asked on another forum about this and they said to do away with the linker file in my project, or modify the linker file which is beyond my capability right now. So I did away with the linker file and it assembles ok but the chip seems to act erratically, unlike the 12f675. My question is, do I or don;t I need to use a linker file with these? I tried to research this topic until I get so confused I get no where. Thanks for any and all help on my problem. |
|
#3
| ||||
| ||||
| If you down load the Assembler/Linker manual it gives examples as to what is happening and how to get rid of it. I ran into that the first time I used it, your program probabally can be compiled without the Lkr file, but in this instance you need to edit the Linker file, get rid of the NAME=vectors line and change the NAME=page start to 0x0000 If you are not using the interupt vector section. Like I mentioned, they give a detailed example in the MPlab manual. Al. also remove the SECTION NAME=STARTUP ROM=vectors line for now.
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#4
| ||||
| ||||
| Also remember you can edit the ASM and LNK files on the fly after a faulty compile simply by double clicking on the file drop downs on the Left side of the screen. Then simply re-compile by the Build-ALL on the tool bar. Make sure you always tick the 'copy files' box when you identify linker files etc as this retains the original, also when you edit the linker file, instead of removing a line, just put // in front of anything to ignore. Al.
__________________ “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#5
| |||
| |||
| Thank you Al, I will download the manual immediately. I didn't catch the part about copying the files at first, and THAT was confusing. I re-read the manual several times and finally found out what was going on. I have a lot to work on, I appreciate your adivse. |
| Sponsored Links |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |