Fixup overflow error in _vect...

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fixup overflow error in _vect...

Jump to solution
2,638 Views
嘉星邓
Contributor II

Hi All,

When I upgraded from mc9s08dz60 to mc9s08dz96, I got this error:

Fixup overflow in _vect2, to SysTimer_Interrupt type 1, at offset 0xC
Fixup overflow in _vect2, to RFIRQ_Interrupt type 1, at offset 0x12
Fixup overflow in _vect2, to Cpu_Interrupt type 1, at offset 0xE
Fixup overflow in _vect2, to Cpu_Interrupt type 1, at offset 0xA

......

My code was working with mc9s12dz60, how can I fix this?

Thanks!

prm file:

pastedImage_2.png

Interrupt vector table:

pastedImage_3.png

Labels (1)
Tags (1)
1 Solution
1,880 Views
stanish
NXP Employee
NXP Employee

Hi,

Please check where are the ISRs placed into. I assume they are placed in paged/banked memory - DEFAULT_ROM.

I'd recommend you to add an explicit pragma to place the ISR into non-banked memory segment e.g see the snippet below:

#pragma push
#pragma CODE_SEG __NEAR_SEG NON_BANKED
interrupt void SysTimer_Interrupt(void);
#pragma pop‍‍‍‍

Hope it helps.

S.

View solution in original post

5 Replies
1,881 Views
stanish
NXP Employee
NXP Employee

Hi,

Please check where are the ISRs placed into. I assume they are placed in paged/banked memory - DEFAULT_ROM.

I'd recommend you to add an explicit pragma to place the ISR into non-banked memory segment e.g see the snippet below:

#pragma push
#pragma CODE_SEG __NEAR_SEG NON_BANKED
interrupt void SysTimer_Interrupt(void);
#pragma pop‍‍‍‍

Hope it helps.

S.

1,880 Views
嘉星邓
Contributor II

Hi Stanislav,

Thanks for your reply, I according to your suggestions tried and solved the problem.

But I don't understand why can't the ISRs are placed in paged/banked memory, My interrupt vector table are placed in a fixed cpu address @0xFFC0.

Best Regards!

Jiaxing Deng

0 Kudos
1,880 Views
stanish
NXP Employee
NXP Employee

This is because of how interrupt vector table is implemented on HCS08/HCs12 architectures.

There are just 16 bits (near) pointer dedicated to each interrupt vector - this is hardwired.

It makes sense since for a long time HC08 cores didn't have more than 64kB of flash memory. To keep backward compatibility it is the same on devices with more 64kB of Flash.

 

Now on such a devices you need to take special care about where ISR routines are placed so they can be accessed by near 16bit pointer.

Hope it helps.

 

Stan

0 Kudos
1,880 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Jiaxing Deng,

I wonder you have overlap vector table definition in your code.

Please upload your demo project here. I will check.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,880 Views
嘉星邓
Contributor II

Hi Jennie Zhang,

Thanks for your reply.

I'm sorry I can't upload my project, but I solved the problem through @Stanislav Sliva's tips.

Thank you again.

0 Kudos