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.
AVR tick-less (freerunning) for RT
-
- Posts: 359
- Joined: Sat Jan 07, 2012 6:22 pm
- Location: Brazil
- Has thanked: 1 time
- Been thanked: 20 times
- Contact:
Re: AVR tick-less (freerunning) for RT
I just applied the changes. I also made the RT demo free running because the performance seems to be slightly better:
https://gist.github.com/utzig/263173f80c03eb187d01
https://gist.github.com/utzig/b2552e40ac3e4cb96052
While I have an old Mega 1280 the -mrelax option causes no issues for me so I put it there too. I'm considering changing the MCU of the demos to 2560 because more people seem to have it.
Cheers,
Fabio Utzig
https://gist.github.com/utzig/263173f80c03eb187d01
https://gist.github.com/utzig/b2552e40ac3e4cb96052
While I have an old Mega 1280 the -mrelax option causes no issues for me so I put it there too. I'm considering changing the MCU of the demos to 2560 because more people seem to have it.
Cheers,
Fabio Utzig
Who is online
Users browsing this forum: No registered users and 38 guests