PDA

View Full Version : reset_org with 16f193X ?



kik1kou
- 8th October 2011, 21:32
hi everobody,

I use a 16F193x with a home bootloader
my bootloader is put between 0x0000 and 0x08FF

I created a test program with picbasic pro 2.60c
but when I use a routine : DEFINE RESET_ORG 0x0900
the compilator return an error "ERROR[101] c:\pbp\pbppi14e.lib 7907 : ERROR: (library cannot exceed address 800h.)"
I think it's because is not in the same page and picbasic pro doesn't use a PCLATH register (pagesel)

how can I do for use my home bootloader and use picbasic pro for the software?

thanks

mackrackit
- 9th October 2011, 05:26
Not sure how to do what you want but I do think you are going about it wrong
From the manual:
DEFINE RESET_ORG 0h 'Change reset address for PIC18

kik1kou
- 9th October 2011, 08:32
hi,
thanks for you reply
I don't find your answer in my manual (LOL) I have the version 6/09 :confused:
It only write "DEFINE RESET_ORG 0h ‘Change reset address"

Before I write my bootloader, RESET_ORG moved the code ;-)

I opened the pbppli14e.lib and find this :

ifndef USE_LINKER
if ($ > 800h)
LIST
error "Library cannot exceed address 800h."
NOLIST
endif
endif

So I define USE_LINKER in my code with RESET_ORG
and it work well :D


ex : DEFINE RESET_ORG 100h only

MEMORY USAGE MAP ('X' = Used, '-' = Unused)
0100 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0140 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0180 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXX-------
8000 : XXXX---XX------- ---------------- ---------------- ----------------

and with
DEFINE RESET_ORG 900h
DEFINE USE_LINKER 1

MEMORY USAGE MAP ('X' = Used, '-' = Unused)
0900 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0940 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0980 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXX-------
8000 : XXXX---XX------- ---------------- ---------------- ----------------



thanks ;)