[avr-gcc-list] GCC 4.5.1 wiht AS5 Error

2011-03-15 Thread Trampas Stern
When trying to compile a bootloader for the AT90CAN128 I am getting the following error, does anyone know what it means? c:/program files (x86)/atmel/avr studio 5.0/extensions/application/avr toolchain/bin/../lib/gcc/avr/4.5.1/../../../../avr/lib/avr51/crtcan128.o: In function `__vectors':

Re: Memory corruption (?) I don't understand

2021-06-22 Thread Trampas Stern
Also when you print out the size in the make file, how much SRAM does it indicate your program is using? On Tue, Jun 22, 2021 at 2:10 PM Trampas Stern wrote: > So I would recommend that you put in the ASSERT for the LDL_PEDANTIC() > macro. > > Secondly, you need to be careful

Re: Memory corruption (?) I don't understand

2021-06-22 Thread Trampas Stern
So I would recommend that you put in the ASSERT for the LDL_PEDANTIC() macro. Secondly, you need to be careful with PROGMEM, that is with AVR being a Harvard machine you can burn up SRAM quickly by not using PROGMEM for constants. For example with the LDL library you need to be sure that

Re: Memory corruption (?) I don't understand

2021-06-22 Thread Trampas Stern
Does the code run if you comment out 'lora_send("coucou", 7); Does it still crash with simple main() { _delay_ms(1000); stty_print("hello");} That is start removing code until it works, when you find the line in main that causes a crash, go into that function and start removing code until it

Re: Memory corruption (?) I don't understand

2021-06-22 Thread Trampas Stern
Can you comment out lines and have firmware run? Could it be that your power supply is dropping and browning out? On Tue, Jun 22, 2021 at 7:59 AM BERTRAND Joël wrote: > Hello, > > I'm writing a firmware for a board that uses a ATMega 1284. > Firmware > continuously restarts

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

2021-04-10 Thread Trampas Stern
: > On Apr 10, 2021, at 2:37 PM, Trampas Stern wrote: > > If you guys have a better way I would love to know. > > > Don’t use C++? > > What does object-oriented coding do for embedded projects? It’s akin to > using printf(). Slow and lots of bloat. > > Time once was I pu

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

2021-04-10 Thread Trampas Stern
I wish there was a better way to interrupt handlers in classes, for embedded. For example I write a UART class as a driver which I initialize by passing a pointer to hardware address. However because different UARTs use different interrupt vectors I end up having to have the extern C and create

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

2021-04-11 Thread Trampas Stern
ibc=no" and > "--without-newlib" to suppress the misspelled ISR warning. > > -Anton > > On Sat, Apr 10, 2021 at 8:19 PM Russell Shaw > wrote: > >> On 11/4/21 8:36 am, Trampas Stern wrote: >> > Actually C++ is not slower or more bloat than C, de

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

2021-04-11 Thread Trampas Stern
In C++ for interrupt vectors in drivers I set up an array of pointers to function all the peripheral driver code like this for timer counters. static voidCallback_t _isr_funcs[TC_INST_NUM]={NULL}; Then in each handler if the pointer is not null I call it. This is a lot of work and overhead but

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

2021-04-11 Thread Trampas Stern
code > and functions in the object code that you used to get with old C > compilers. With a good C compiler (like avr-gcc) you already lose a lot > of that as the compiler inlines code and moves things around. But with > templated code, that effect is significantly amplified. > > David > >

Re: GCC bug?

2021-12-17 Thread Trampas Stern
Maybe one day even a problem in 32bit architectures. On Thu, Dec 16, 2021 at 7:50 PM Bruce D. Lightner wrote: > Ian, > > Just from a purely AVR architecture point of view, the AVR_HAVE_RAMPD > #define indicates that the AVR chip in question supports the "RAMP" paging > register, described as

Re: Version/Signature in Flash

2022-01-19 Thread Trampas Stern
I recommend creating the section in the linker file. It is often easier for the next guy looking at your code to find the section in the linker file. That is, embedded development follows a path, from writing code to make it work, to making it work reliably, to making it where the next guy can