EmbeddedRelated.com
Forums

problems with Cosmic C's @interrupt

Started by alienprey2000 July 27, 2003
Hi, I have been trying to get interrupts working on my B32 board for
a couple of days now and am really stuck.
My problem is with the @interrupt qualifier.
Whenever I use it I get a linking error
"unexpected bank location"
The manual clarifies this as, "an interrupt function or a function
accessing the PPAGE register is located in a bank" ????
My link file is as follows;

# Link command file for MC68HC12B32
+seg .text -b 0x8000 -n .code # program start address
+seg .const -a .code # constants follow program
+seg .data -b 0x800 -m 0x400 # data start address
+seg .eeprom -b 0xd00 -m0x300 # eeprom start address if
needed
+def __sbss=@.bss # start address of bss
/cosmic/cx12/lib/crtsi.h12 # startup file (or crts.h12)

# enter object files here
/cosmic/cx12/ujet/porta.o
/cosmic/cx12/lib/libi.h12 # C library (if needed)
/cosmic/cx12/lib/libm.h12 # machine library
+seg .vector -b 0xffd0 # vectors start address
/cosmic/cx12/ujet/vector.o # interrupt vectors
+def __memory=@.bss # symbol used by library
+def __stack=0xc00 # stack pointer initial value

Would appreciate some help. What am I doing wrong???



I think I've solved this?
If I use the -bs0 option my code will link OK.
Can anybody confirm that I'm right?


Hi,

You simply need to link with option -bs0 to disable the linker banking
mechanism which is not relevant for a B32.

Best Regards,
Jean-Pierre Lavandier
COSMIC Software -----Message d'origine-----
De : alienprey2000 [mailto:]
Envoy: dimanche 27 juillet 2003 21:03
:
Objet : [68HC12] problems with Cosmic C's @interrupt Hi, I have been trying to get interrupts working on my B32 board for
a couple of days now and am really stuck.
My problem is with the @interrupt qualifier.
Whenever I use it I get a linking error
"unexpected bank location"
The manual clarifies this as, "an interrupt function or a function
accessing the PPAGE register is located in a bank" ????
My link file is as follows;

# Link command file for MC68HC12B32
+seg .text -b 0x8000 -n .code # program start address
+seg .const -a .code # constants follow program
+seg .data -b 0x800 -m 0x400 # data start address
+seg .eeprom -b 0xd00 -m0x300 # eeprom start address if
needed
+def __sbss=@.bss # start address of bss
/cosmic/cx12/lib/crtsi.h12 # startup file (or crts.h12)

# enter object files here
/cosmic/cx12/ujet/porta.o
/cosmic/cx12/lib/libi.h12 # C library (if needed)
/cosmic/cx12/lib/libm.h12 # machine library
+seg .vector -b 0xffd0 # vectors start address
/cosmic/cx12/ujet/vector.o # interrupt vectors
+def __memory=@.bss # symbol used by library
+def __stack=0xc00 # stack pointer initial value

Would appreciate some help. What am I doing wrong??? <http://rd.yahoo.com/M4081.3551198.4824677.1261774/D=egroupweb/S065542
05:HM/A63535/R=0/SIGps6rfef/*http://www.ediets.com/start.cfm?code050
4&media=atkins> click here

<http://us.adserver.yahoo.com/l?M4081.3551198.4824677.1261774/D=egroupmai
l/S=:HM/A63535/randT2778598>

--------------------
<http://www.motorola.com/mcu ">http://docs.yahoo.com/info/terms/> .