Topic : linker warning 20: in interrupt vector STM8s

Forum : ST7/STM8

Original Post
Post Information Post
April 3, 2009 - 1:41pm
Guest

Hi,
I get a ***WARNING 20: CODE ADDRESS OUT OF BOUNDS when building code for my STM8S208MB.

When looking in the .map file I see that some ( 3) fields in the interrupt vector has length 8 while all others have length 4.
This generates the warnings.

This is from the .map file:
TYPE BASE LENGTH RELOCATION SEGMENT NAME
---- ---- ------ ---------- ------------
* * * * * * * * C O D E M E M O R Y * * * * * * * *
CODE 008000H 000004H AT ?CO?STARTUP_V_Z00
CODE 008004H 000001H INSECTION0 ?PR??TLI_IRQHANDLER?STM8S_IT
CODE 008005H 000001H INSECTION0 ?PR??AWU_IRQHANDLER?STM8S_IT
CODE 008006H 000001H INSECTION0 ?PR??CLK_IRQHANDLER?STM8S_IT
008007H 000001H *** GAP ***
CODE 008008H 000004H AT ?IT?VECTOR#0
CODE 00800CH 000004H AT ?IT?VECTOR#1
CODE 008010H 000004H AT ?IT?VECTOR#2
CODE 008014H 000004H AT ?IT?VECTOR#3
CODE 008018H 000004H AT ?IT?VECTOR#4
CODE 00801CH 000004H AT ?IT?VECTOR#5
CODE 008020H 000004H AT ?IT?VECTOR#6
CODE 008024H 000004H AT ?IT?VECTOR#7
CODE 008028H 000004H AT ?IT?VECTOR#8
CODE 00802CH 000004H AT ?IT?VECTOR#9
CODE 008030H 000004H AT ?IT?VECTOR#10
CODE 008034H 000004H AT ?IT?VECTOR#11
CODE 008038H 000004H AT ?IT?VECTOR#12
CODE 00803CH 000004H AT ?IT?VECTOR#13
CODE 008040H 000004H AT ?IT?VECTOR#14
CODE 008044H 000004H AT ?IT?VECTOR#15
CODE 008048H 000004H AT ?IT?VECTOR#16
CODE 00804CH 000004H AT ?IT?VECTOR#17
CODE 008050H 000004H AT ?IT?VECTOR#18
CODE 008054H 000004H AT ?IT?VECTOR#19
CODE 008058H 000008H AT ?IT?VECTOR#20

***WARNING 20: CODE ADDRESS OUT OF BOUNDS
ADDRESS: 805C
CODE 00805CH 000008H AT ?IT?VECTOR#21

***WARNING 20: CODE ADDRESS OUT OF BOUNDS
ADDRESS: 8060
CODE 008060H 000008H AT ?IT?VECTOR#22

***WARNING 20: CODE ADDRESS OUT OF BOUNDS
ADDRESS: 8064
CODE 008064H 000004H AT ?IT?VECTOR#23
CODE 008068H 000004H AT ?IT?VECTOR#24

Can someone explain why this happens?

Replies
Post Information Post
+1
0
-1
April 3, 2009 - 4:27pm
Raisonance Support Team

Hi,

This is a problem that may happen if you use the ST firmware library available from ST's Web site. It has several functions that handle interrupts 21, 22 and 23 in their stm8s_it.c file. The linker does not know how to handle this, as 2 interrupt vectors must be located at the same address!

Note that in older versions of RKit-STM8 (before January 2009) were not emitting any error, although the generated vectors were invalid.

The easiest workaround is to remove the duplicated interrupt functions from the stm8s_it.c file.

Another workaround is to remove the whole file from your project if you do not use any interrupts.

We advise you to start new projects from the ST firmware library that can be found in the %ridedir%\Examples\STM8 directory. This is a slightly modified version of the ST library that fixes some (minor) issues.

I hope this helps,
Bruno

+1
0
-1
April 7, 2009 - 12:35pm
Guest

Thanks! No more warnings.