Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Linker Command question

Not open for further replies.


Junior Member level 2
Dec 2, 2005
Reaction score
Trophy points
Activity points

I wans to separate my code into 2 parts, first part i want to write it at the following addresses : 0000H ÷ 07FFH and the other part satrting at 0800H address.

Im not familiar with the linker commands, can someone help me with it, i need to know what kind of commands i need to put inside the code for that.

Im not interested in seperating the code into 2 applications and to burn them separatly (using the "start programming address" at the compiler options).

Im using PIC18F452 device with MPLAB + Hitech Compiler.

Can anyone help me please.

Thanks, Ben.

I saw a reference to the asm command regarding programming sections -> "psec" command, does anybody knows if using this command can solve may problem and how to implement this command into the code?


are u sure that in 18F452 there is an asm command named psec? there is no 'psec' in the datasheet!!

i didn't work with 18Fxx2, so i'm not sure if i can tell u more, sorry.

Hi kordix,

You are right, the command is "psect" not "psec, i saw that command at the hi-tech manual. it should direct the linker to reference to a specific program section. though i dont know how to use it correctly in order to separate my code into 2 parts at the program memory.

Im interested in compiling the whole code, while some of the code will be placed at specific location(lets say between 0000h - 07ffh) and the other part at a different location(starting 0800h). im doing so in ordet to include a bootloader inside my whole code and i need to compile it all so the application will be familiar with some funcions located at the bootloader files.

I know how to do so by separating the code into two different compilation units, though i dont know how to compile it as one all compilation unit.

Do you have any suggestions?

Thanks, Ben.

Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to