Re: [avr-gcc-list] C++ Syntax Question

2014-07-07 Thread Matthijs Kooijman
Hey Thomas, My initial thought was to use function pointers and a list. If the function is defined outside the class, I can add it to the list. f1 in the example. If the function is declared in the class, I get a compile error, f2 in the example. I have tried qualifying f2, etc. No

Re: [avr-gcc-list] How to handle paths with spaces?

2014-07-17 Thread Matthijs Kooijman
Hey Royce, In my makefile i have included a folder in the 'extra include directories' line. AFAIU, make cannot handle spaces properly. I think that in some circumstances, you can do some stuff with escaping or quoting, but since make uses the space as a list separator, it will probably break

Re: [avr-gcc-list] push r1, pop r0

2017-11-07 Thread Matthijs Kooijman
Hi Szikra, I believe these pushes and pops are just meant to allocate 2 bytes on the stack. > 222: cd b7in r28, 0x3d ; 61 > 224: de b7in r29, 0x3e ; 62 This loads Y with SP, so the location of the 2 pushed bytes > 226: 2e b7in r18, 0x3e ; 62 > 228: 8d b7in

Re: [avr-gcc-list] push r1, pop r0

2017-11-08 Thread Matthijs Kooijman
Hi Szikra, > So it is 2017, but the compiler still cannot optimize away bitwise or > zero... :( I think this is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41076 (which should be fixed in gcc 7 according to the comments). The fix contains a peephole optimization that I think catches exactly this

Re: Why are switch statement tables in section .rodata which gets copied to RAM with avr-gcc?

2020-03-31 Thread Matthijs Kooijman
Hi Peter, > It turns out, that avr-gcc or the linker for the Arduino processor that I > have access to, generate code to copy .rodata to .data in RAM. This is bad, > and may have been the reason for these PROGMEM tables. .rodata is copied to RAM, because flash and RAM are not in the same address

Re: Partial libstdc++ Support

2021-02-02 Thread Matthijs Kooijman
Hey John, > Naturally, much of the C++ standard library isn't remotely suitable for > AVRs, and should not be supported. However, there are a fair amount of > features that I believe would work very nicely, and would be worthwhile > to support. I've been playing with the same thought for a while

Re: static class member as interrupt handler works, but not if class is templated

2021-04-12 Thread Matthijs Kooijman
> > - figure out, where the special handling of the __vector_10 seems to > > happen, and why it is not happening in the class template case. This > > might help diagnose if and where to fix it within the compiler. > > That is compiler internals... yes, if it is a compiler bug, it is the > way to

Re: tgmath.h

2022-07-22 Thread Matthijs Kooijman
Hi, A bit of an old thread, but I wanted to add a bit more detail on how Arduino handles C/C++ code. > Arduino is a non-standard mix of C and C++, of undocumented (AFAIK) version, > with an IDE that automates and hides some features (such as some headers). > They use their own special libraries,