CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

one nop on high prior irq vector

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
pic18
Guest







one nop on high prior irq vector
PostPosted: Sat Mar 11, 2006 12:37 pm     Reply with quote

CCS 3.236 will jump on RAM-Adr 0x0008 to my IRQ handler

CCS 3.245 have NOP (0x0000) on ROM-Adr 0x0008 and the Jump to IRQ handler is on ROM-Adr 0x000a

=> my problem:
I need the 12 Bytes from ROM-Adr 0x000a to 0x0017 for privat using as VersionID in compatibility to all old systems

All my projects run with this setup and work up to CCS 3.236 ok...

#define BTL_BOOTCODE 0x7b00 // Bootfunctions from 0x7b00
#define BTL_BOOTSTART 0x7f80 // StartBootloader on 0x7f80
#define BTL_MAINRESET 0x0004 // MainResetJump on 0x0004
#define BTL_MAINSTART 0x0007 // 4Byte space => 1x "GOTO" -> "Main"
#define BTL_MAINHIIRQ 0x0008 // Interruptvector HI-Priority[08-17]
#define BTL_MAINLOIRQ 0x0018 // Interruptvector LO-Priority[18...]
#define BTL_MAINSPACE 0x7aff // top of main program space
#define BTL_BOOTRESET 0x0000 // Hardware RESET => 1x "GOTO" -> "BTL_BOOTSTART"->

/**********************************************************************/
#reserve 0x000c:0x17 // 12Byte free space for Version-ID
#fill_rom 0x0000
/*******************************************************************************/
#rom BTL_BOOTRESET={0xefc0,0xf03f} // "goto_address(BTL_BOOTSTART) goto 0x7f80"
/*******************************************************************************/
#build(memory=BTL_MAINRESET:BTL_MAINSPACE) //Assigns memory space
#build(reset=BTL_MAINRESET:BTL_MAINSTART,interrupt=BTL_MAINHIIRQ)
/**********************************************************************/

/*******************************************************************************/
#org BTL_BOOTCODE,BTL_BOOTSTART-1 default
/*******************************************************************************/

....

/*******************************************************************************/
#org BTL_BOOTSTART,0x7fff default
/*******************************************************************************/
void BOOTstart(void)
{

...

goto_address(BTL_MAINRESET); // -> Main
}
/*******************************************************************************/
#org default
/*******************************************************************************/

void main(void)
{

....

}
dorinm



Joined: 07 Jan 2006
Posts: 38

View user's profile Send private message

PostPosted: Sat Mar 11, 2006 1:49 pm     Reply with quote

#reserve 0x000c:0x17 // 12Byte free space for Version-ID

...now is that 0x000c a typo or your problem itself ?
pic18
Guest







0x0008..0x000b
PostPosted: Sun Mar 12, 2006 2:21 am     Reply with quote

CCS well generate a double word GOTO for jump to IRQ handler and i need this 4 Bytes of PIC18 goto opcode from rom adr 0x0008..0x000b.
(the microchip pic18 datasheet's say extact this, the hardware vector is 0x0008)

All my old CCS versions 3.229,3.236 can do this, only later versions up to new 3.245 well set a 2Byte NOP on 0x0008/0x0009 an set 4Byte GOTO opcode from 0x000a..0x00d. On 0x000c/0x000d is now the last word of the double word GOTO instruction :(

0x000c..0x0017 i must use for VersionID
Ttelmah
Guest







PostPosted: Mon Mar 13, 2006 4:10 am     Reply with quote

You don't say what chip?.
The NOP at address 8, is a standard fix for an erratum, on some of the 18 chips. This can be enabled/disabled by device editor. Now whether your chip may have the problem, you will need to verify in the errata sheets, otherwise you should consider relocating your code if you are not going to have problems...

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group