Patching the gcc for AT90PWM316 support (vector table proble

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Urgently, I need support for the AT90PWM316. I succeeded already in patching support into the gcc, binutils and libavr

But I missed something: The vector table is wrong, it has too few entries.
Can someone give me a pointer, where the vector tables are configured?

Thanks
Tobi

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you look at a typical .map file from a build you'll see something like:

.text           0x00000000       0x96
 *(.vectors)
 .vectors       0x00000000       0x54 c:/winavr-20070525/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr5/crtm16.o
                0x00000000                __vectors
                0x00000000                __vector_default
 *(.vectors)
 *(.progmem.gcc*)
 *(.progmem*)
                0x00000054                . = ALIGN (0x2)
                0x00000054                __trampolines_start = .
 *(.trampolines)

This may give you a clue as to where the vector table is being pulled in from and what needs to be patched/rebuilt to change the behaviour

(OTOH there may be a more "official" way to do this - expect a GCC expert along any minute...)

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

well, if someone is around, please step ahead.

(Currently I try to figure out to tell the avr to avoid jmp and call, as this controller does not support them.... Then I will have to solve the too-short-vector-table problem)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

> well, if someone is around, please step ahead.

You would have got a faster response on the avr-libc-dev list.

Look into gcrt1.S, there you'll find how the vector table is constructed,
based on the information from the respective ioXXX.h file.

All in all, I'd appreciate to rather produce full patches for the entire
toolchain than local hacks. Feel free to call me on the phone if you
want to talk abou this, or send me an email.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Jörg
I wrote you a mail....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On a side note, I'd be VERY surprised if that controller did not use JMP and CALL. As I guess it was an oversight in the cut-and-paste into the datasheet of the instruction set summary from the 8k part. The interrupt vectors are two words, after all.

[I've only peeked into the XML files for the different chips. I'd kind of expected either an instruction list for each chip, or [say] an entry into the INSTRUCTIONS_NOT_SUPPORTD section of an 8k chip with JMP and CALL there.]

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Update: It looks good. Jörg gave me an essential hint, and I probably now have a working compiler.
(The ISR Vector-Table is not yet resolved, however, but for that, I have a B-Plan)

Details later. It is already a long work-day.