[En-Nut-Discussion] atmega2560 support

Chris Gude cg at tis-net.de
Thu Jul 10 17:05:01 CEST 2008


Hello,


Thiago A. Corrêa schrieb:
> On Thu, Jul 10, 2008 at 11:17 AM, Chris Gude <cg at tis-net.de> wrote:
>   
>> Hello,
>>
>> I recently worked on some changes to support the ATMega1280, which
>> should be pretty similar to your work.
>>     
>
> Cool. Did you get the other serial ports to work too? I've done the
> changes in the lua script to add the additional serial ports, but
> didn't yet add it to the code.
>
>   

yes I got the other ports to work too, but I made the changes in 
ahdlcavr.c as I need to use PPP for my application.

>> If you use avr-gcc:
>> First of all check whether the macro __AVR_3_BYTE_PC__ is activated.(It
>> is used in arch\avr\os\context_gcc.c)
>> This Macro is similar to MCU_ATMEGA2561 and makes sure, that the stack
>> pointer is set correctly, so that the threads can be started.
>>     
>
> So, this is set in the Makefiles then? Nutconf.mk or something?
> I grepped for it but couldn't find where it was set, then I guess this
> confirms it. It's most likely not set, will try again with it
> explicitly set on the makefile.
>
>   

To be honest I don´t know, where exactly the macro __AVR_3_BYTE_PC__ is 
set. I just undefined it if the macro for ATMega1280 is set. That was 
the easiest way for me.

>> And are you able to debug the Nut/Os code or just your usercode? Because
>> if you are able to debug the Nut/Os you could set a breakpoint at
>> NutInit() or NutInitHeap() to see where you get stuck.
>>
>>     
>
> I suppose I could debug ethernut code as well, I'm not quite sure how
> though. AVRStudio isn't exactly very good at debuging. Idealy, it
> would have loaded up the debug symbols from ethernut ( I compiled with
> debug support ), but it didn't.
>
>   

I also use AVRStudio and I can debug the Nut/Os code. The only thing I 
had to change was adding -gdwarf-2 in Makedefs.avr-gcc. After that I 
could open the code in AVRStudio and a set breakpoint at NutInitHeap(), 
so that I could debug the whole startup of Nut/Os.

Chris

> Kind Regards,
>     Thiago A. Correa.
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
>   




More information about the En-Nut-Discussion mailing list