Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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

Status
Not open for further replies.

Benny

Junior Member level 2
Joined
Dec 2, 2005
Messages
23
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,281
Activity points
1,552
Hi,

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.
 

Benny

Junior Member level 2
Joined
Dec 2, 2005
Messages
23
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,281
Activity points
1,552
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?

Ben.
 

kordix

Member level 3
Joined
Jan 18, 2006
Messages
58
Helped
8
Reputation
16
Reaction score
4
Trophy points
1,288
Activity points
1,825
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.
 

Benny

Junior Member level 2
Joined
Dec 2, 2005
Messages
23
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,281
Activity points
1,552
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.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top