Hello!! everyone i had purchased a PIC18F4550 development board from a company in India.
That board is having a inbuilt Bootloader and the problem is that i can't use mikroc for this purpose..
because the code generated by mikroc is overwriting the bootloader thats why program is not transferred in that.
i want to shift the code little bit in mikroc
like in hitech c it is as follow
void main () @ 0x0000A0
okay
what it will be in MikroC
I love mikroc thats why i want to use it...
I have tried this one
but it didn't work
void main() org 0x0000A0
Some one pls help me..
Thanks in Advance
How shift the Code Generated by MikroC to some other locatio
-
- Posts: 46
- Joined: 16 Apr 2011 14:37
Re: How shift the Code Generated by MikroC to some other loc
You do it exactly as you showed in your post by hitech compiler,
look in the mikroC help File for orgall and absolute directives
example
look in the mikroC help File for orgall and absolute directives
example
void main () orgall 0x0000A0
P.Erasmus
Saratov,Russia
--------------------------------------------------------------
Saratov,Russia
--------------------------------------------------------------
-
- Posts: 46
- Joined: 16 Apr 2011 14:37
Re: How shift the Code Generated by MikroC to some other loc
Thanks for your reply..
I had read the documentation and found that
and it works it shift my code to 0x0000A0 location
Here is the shift in my code..
But still above two lines contains some data what is this..
and how to shift that
I had read the documentation and found that
Code: Select all
#pragma orgall 0x0000A0
Here is the shift in my code..
But still above two lines contains some data what is this..
and how to shift that
- janko.kaljevic
- Posts: 3565
- Joined: 16 Jun 2011 13:48
Re: How shift the Code Generated by MikroC to some other loc
Hello,
After you do
all functions will be on addresses higher than specified.
But there will be stored stored addresses for GOTO labels on addresses 0x0000, 0x0008 and 0x0018, which is exactly shown on your picture.
I believe that Microchip bootloader should be aware of this, and it should take care for those instructions.
Best regards.
After you do
Code: Select all
#pragma orgall 0x0000A0
But there will be stored stored addresses for GOTO labels on addresses 0x0000, 0x0008 and 0x0018, which is exactly shown on your picture.
I believe that Microchip bootloader should be aware of this, and it should take care for those instructions.
Best regards.