yep. There is a nice application note by Atmel on that matter that explain
well what to do. Get the .zip file from their website too, with all the
files.Advices:

1- If you don't want to mess with the FREERTOS function "_init_startup",
just rename it and define yours in your main.c.
2- If you are using C++ (main.cpp), you need the "extern "C" {} englobing
your own "init_startup" function.

That's about it. The application note takes care of everything else.

The application note:
http://www.atmel.com/dyn/resources/prod_documents/doc32121.pdf

Some AVRFreaks thread on the matter.
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=623255
http://www.avrfreaks.net/index.php?name ...
p;p=623127<http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=623127>

http://www.avrfreaks.net/index.php?name ...
p;p=568880<http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=568880>


If you have any questions, don't hesitate, I've just done it hehe :)
Downy


On Fri, Oct 2, 2009 at 6:16 AM, Oscar F <[email protected]> wrote:

> Hello, i think i ´ll move the heap and data to SDRAM. I read the
> application note, but i don´t know exactly that files create or edit because
> i have lwip and freeRTOS.
>
> My first idea is to do:
>
> a) edit the crt0.x of the project
> b) edit init_startup function in the port directory of FREERTOS
> c) Add de link_... .lds  to the project
> d)  change the option of linker
>
> Do you follow this step?
> Thanks
> Oscar
>
>
>
> On Thu, Oct 1, 2009 at 7:05 PM, Oscar F <[email protected]> wrote:
>
>> Hello one question, if i defined one buffer very big, is necesary to
>> increase alot the stack of the task. My memory is 64k too and i have
>> FreeRTOS and lwip. I need to create a buffer of 20000bytes.
>>
>> Do you think i have enough memory or i need to move all memory to SDRAM?
>>
>> thanks
>>
>> Oscar
>>
>>
>> On Thu, Oct 1, 2009 at 6:05 PM, Dany Thiffeault 
>> <[email protected]>wrote:
>>
>>> great, thanks!
>>> I tried many things, but not this one.
>>>
>>> Also, I want to point out that in the meantime, I decided to move my heap
>>> to my SDRAM instead of the 64k SRAM on the AVR32UC3. Now I have enough space
>>> to create all my tasks without problem, even with bigger stack sizes.
>>>
>>>
>>>
>>> On Thu, Oct 1, 2009 at 1:09 AM, Mathias Zenger <[email protected]>wrote:
>>>
>>>>  check this:
>>>>
>>>> http://support.atmel.no/bin/customer?=&action=viewKbEntry&id=299
>>>>  mathias
>>>>
>>>> -----Ursprüngliche Nachricht-----
>>>> *Von:* [email protected] [mailto:
>>>> lwip-users-bounces+m.zenger <lwip-users-bounces%2Bm.zenger>=
>>>> [email protected]]*im Auftrag von *Dany Thiffeault
>>>> *Gesendet:* Mittwoch, 30. September 2009 17:42
>>>> *An:* Mailing list for lwIP users
>>>> *Betreff:* Re: [lwip-users] LWIP size
>>>>
>>>> Thanks Bill, good idea.
>>>> I'm still trying to figure out how to generate the MAP file with
>>>> AVRStudio 2.1...
>>>>
>>>>
>>>>
>>>> On Tue, Sep 29, 2009 at 5:30 PM, Bill Auerbach <
>>>> [email protected]> wrote:
>>>>
>>>>>  Check you MAP file and find out where RAM has been allocated.  It’s
>>>>> easy to allocate too many PBUF_POOLs and run out of memory that way.
>>>>>
>>>>>
>>>>>
>>>>> Bill
>>>>>
>>>>>
>>>>>
>>>>> *From:* [email protected][mailto:
>>>>> lwip-users-bounces+bauerbach <lwip-users-bounces%2Bbauerbach>=
>>>>> [email protected]] *On Behalf Of *Dany Thiffeault
>>>>> *Sent:* Tuesday, September 29, 2009 3:56 PM
>>>>> *To:* Mailing list for lwIP users
>>>>> *Subject:* [lwip-users] LWIP size
>>>>>
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>>
>>>>>
>>>>> I would like to know what is the expected (approx.) size of the lwip
>>>>> stack. I use sequential configuration. My problem is that on my AVR32, I
>>>>> only have 64kbytes of SRAM and for some reasons, it is full. I'm trying to
>>>>> run my application using FreeRTOS and lwip. When I create tasks, my last 
>>>>> one
>>>>> always fail on the malloc.
>>>>>
>>>>>
>>>>>
>>>>> So, I'm assuming that FreeRTOS and lwip take a significant amount of
>>>>> space on my AVR32 in SRAM because my tasks have those sizes (presented in
>>>>> order of creation):
>>>>>
>>>>>
>>>>>
>>>>> 1- lwip Main task:                        512
>>>>>
>>>>> 2- Startup task (my own):            512
>>>>>
>>>>> 3- FreeRTOS Scheduler:             256
>>>>>
>>>>> 4- Ethernet task (my own):          512
>>>>>
>>>>> 5- Ethif (lwip):                             256
>>>>>
>>>>> 6- Diags task (my own):              512
>>>>>
>>>>>
>>>>>
>>>>> The last one is the one that fails. So, out of 64kbytes, my tasks take
>>>>> much less memory. I another project not using lwip, I was able to create 3
>>>>> tasks of 1024,  4096 and 4096 of size. So, I presume lwip takes a
>>>>> significant amount of space.
>>>>>
>>>>>
>>>>>
>>>>> If yes, how could I tweak the config to reduce the size taken?
>>>>>
>>>>>
>>>>>
>>>>> Best regards,
>>>>>
>>>>> DownyTif.
>>>>>
>>>>> _______________________________________________
>>>>> lwip-users mailing list
>>>>> [email protected]
>>>>> http://lists.nongnu.org/mailman/listinfo/lwip-users
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> lwip-users mailing list
>>>> [email protected]
>>>> http://lists.nongnu.org/mailman/listinfo/lwip-users
>>>>
>>>
>>>
>>> _______________________________________________
>>> lwip-users mailing list
>>> [email protected]
>>> http://lists.nongnu.org/mailman/listinfo/lwip-users
>>>
>>
>>
>
> _______________________________________________
> lwip-users mailing list
> [email protected]
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to