lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] freertos + lwip = no uart ?


From: Krzysztof Wesołowski
Subject: Re: [lwip-users] freertos + lwip = no uart ?
Date: Tue, 28 Jul 2015 22:50:05 +0200

Hello,

first thing first - i have no experience with XMEGA, but have learned many things about  STM32 - sometimes the hard way :)

If adding LWIP without initialization (you written it is only compiled, not initialized, so basically adding global variables (sections .data /.bss) and not called code (sections .text)) alters your system behavior IMHO you are in realatively deep "voodo programming", and not tracking root of the problem would probably "hit you later".

Teoretically adding new code can also replace so called "weak references" to interrupt handlers (so for example addin LWIP can change ETH IRQ handler), but if this IRQ is disabled it shoudl not change anything.

Are you using debugger so you can track values in variables/registers to check UART registers when app is not working??

Are you sure your linker script has correctly configured memory areas (if so extra variables will cause link time section overflow information, if linker has bigger memories than MCU some variables are not actually store'able/readable).

If you use dynamic memory allocation are you sure that:
a) there is enough memory in FreeRTOS heap?
b) if other parts of code (linke printf) call malloc do you use wrapper redirecting malloc to FreeRTOS heap / are you sure that you malloc implementation is ok and works with linker script?

I have also have seen some linker scripts where heap is happily growing from other end of RAM (and _sbrk and malloc are used), waiting from stacks to come other way - it is rather ticking timebomb :)

Do you have ASSERT configured in FreeRTOS so you can detect misconfigurations?

Basically there is 98% chance (2% is for you calling LWIP without knowing) that at the moment UART is working "by luck/accident" :)

Regards,
Krzysztof Wesołowski

reply via email to

[Prev in Thread] Current Thread [Next in Thread]