Skip to content

64k problems: trampolines not enabled #176

Open
@WestfW

Description

@WestfW

My understanding is that pointers to functions (which are used somewhat commonly in C++?) are done on AVRs with more than 64k memory by having the 16bit pointers point to "trampolines", which are essentially long jumps placed into the first 64k of memory. So things that call functions via a pointer are always directed at one of these trampolines (via 16bit pointer), and the trampoline jumps to the actual function which can be anywhere in the ~256k of flash space (on a mega2560.)

Unfortunately, to enable this, you are supposed to provide the "-mrelax" option to the gcc compiler, and something similar to the linker, and the current Arduino IDEs don't do that.

This may be fixed or different in the new (1.5.7) avr-gcc toolchain.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions