Re: AVR tick-less (freerunning) for RT
Posted: Wed Jul 22, 2015 8:18 am
Hi, yes I read the post you referenced.
The way I read the gcc manual we are not going to get 32 bit function pointers, because that would waste space for all mcu's only needing 16 bit pointers -- and that is the majority of AVR mcu's. Everything should work OK if EIND is default zero and the compiler emits code generating and linking the trampolines into the default lower segment of memory, and -mrelax is used to bring it all together cleanly.
There may be reasons for building your own trampoline area and setting EIND (using AVR assembler code) and jumping to a non-symbolic (not compiler generated symbol) location. But this is an advanced need and will need advanced support like linker scripts, something beyond just a large C/C++ program.
Like I said, that's what I understand from the gcc manual.
Rick.
The way I read the gcc manual we are not going to get 32 bit function pointers, because that would waste space for all mcu's only needing 16 bit pointers -- and that is the majority of AVR mcu's. Everything should work OK if EIND is default zero and the compiler emits code generating and linking the trampolines into the default lower segment of memory, and -mrelax is used to bring it all together cleanly.
There may be reasons for building your own trampoline area and setting EIND (using AVR assembler code) and jumping to a non-symbolic (not compiler generated symbol) location. But this is an advanced need and will need advanced support like linker scripts, something beyond just a large C/C++ program.
Like I said, that's what I understand from the gcc manual.
Rick.