Topic : RBuilder Generates Incorrect Vector for Cosmic Tools

Forum : ST7/STM8

Original Post
Post Information Post
November 26, 2007 - 7:59pm
Guest

When building for Cosmic tools, RBuilder generates an incorrect vector.c source file. There are 32 bytes of interrupt and reset vectors mapped from 0xFFE0 to 0xFFFF, inclusive (see Table 4 of the ST7263B datasheet for example). This amounts to 16 word-sized interrupt slots. However, RBuilder generates 17 such slots, such that when an .LKF file is generated with an offset of 0xFFEO, all of the slots are off by one:

void (* const _vectab[])() = {
   _stext,             // 0x FFE0:  0 - RESERVED
   _stext,             // 0x FFE2:  1 - RESERVED
   _stext,             // 0x FFE4:  2 - RESERVED
   _stext,             // 0x FFE6:  3 - RESERVED
   _stext,             // 0x FFE8:  4 - RESERVED
   _stext,             // 0x FFEA:  5 - RESERVED
   _stext,             // 0x FFEC:  6 - RESERVED
   _stext,             // 0x FFEE:  7 - RESERVED           !!! Whoops, this reserved slot is extra
   _stext,             // 0x FFF0:  8 - USB
   _stext,             // 0x FFF2:  9 - SCI
   _stext,             // 0x FFF4: 10 - I2C
   _stext,             // 0x FFF6: 11 - TIMER A
   _stext,             // 0x FFF8: 12 - IT
   _stext,             // 0x FFFA: 13 - USB
   _stext,             // 0x FFFC: 14 - ICP FLASH
   _stext,             // 0x FFFE: 15 - TRAP
   _stext              // 0x10000: 16 - RESET      !!! Whoops, off the end
};
Replies
Post Information Post
+1
0
-1
November 27, 2007 - 9:23am
Raisonance Support Team

Hi,

Indeed your file in invalid, you have an extra entry in the _vectab array.

I attempted at reproducing your problem, but did not have any luck: When RBuilder generates my project, the _vectab array has 16 entries, hence is correct. For some reason your array has 17 entries.

Can you start over with a new project, and generate a new file from scratch? If you still find 17 entries, please give use your Ride build number so that we have a chance to reproduce the problem in our labs.

Have a good day.
Bruno

+1
0
-1
November 27, 2007 - 10:09am
Raisonance Support Team

Hi again,

I finally reproduced the problem: It happens only on the ST763B devices. We will correct it, in the meanwhile just remove the extra array entry as a workaround.

And thanks for reporting the problem!

Bruno