lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Bootloader to Application + lwip crash


From: nrichard
Subject: Re: [lwip-users] Bootloader to Application + lwip crash
Date: Tue, 2 May 2017 07:00:41 -0700 (MST)

Yes, by itself the application works perfectly fine.  The only thing I change
for it to run by itself or after the bootloader is the start flash address
being x00430000 instead of x00400000.  I also have a  countdown timer (in
the bootloader) on startupt.  If not interrupted by a keyboard press, a few
seconds later it goes straight to the application, no initialization of lwip
until after the countdown or it hits the application.

Yes, I have a binary execute function (provided by Atmel) that disables
interrupts, moves the vector table, re-enables interrupts again, then loads
at the address I chose.

I'm working with a Sam4e Xplained Pro. As for switching between USER and SVC
mode, I have not seen these before. After looking up what they are, I would
assume I am always in USER mode except for when the vector table moves.

I'll check interrupts again.  Enabling the lwip printf debug code makes it
work but it's very laggy.  Without it, it does not work.  It sounds like
something is not getting interrupted to me and is crashing instead.


contact wrote
> Are you taking care of relocating your ISR routines or reassign ISR
> handlers after you switch from bootloader to application? If you’re using
> ARM are you switching between USER and SVC mode?
> 
> -Ajay
> 
> From: Krzysztof Wesołowski
> Sent: Tuesday, May 2, 2017 2:58 PM
> To: Mailing list for lwIP users
> Subject: Re: [lwip-users] Bootloader to Application + lwip crash
> 
> Can you load and start application without involving bootloader?
> It's quite possible that driver handling hardware init does not work as
> expected if hw was already configured (i.e. MAC, DMA are already setup and
> in the middle of operation when application start). 
> 
> On Mon, 1 May 2017, 23:27 nrichard, <

> nrichard@

> > wrote:
> Hello,
> 
> My project consists of two sub-projects, a bootloader and an application.
> My bootloader is programmed at the start of flash, and always starts when
> the board is given power.  I also have an application project, that
> through
> my bootloader I use FTP to transfer the image to a certain address.  Then
> I
> can jump to that address and my application starts.  This process works
> perfectly fine.
> 
> In both my application and my bootloader, I am using lwip version 2.0.2
> raw
> api for all internet related protocols and applications.  These include
> ftp,
> http, telnet, and snmp.  The bootloader specifically has ftp, http, and
> telnet.  The application has ftp, http, telnet, AND snmp.  So other than
> snmp, these two projects are nearly identical.
> 
> The issue I'm having is that when I jump from my bootloader to my
> application, lwip crashes my board.  The initialization works perfectly
> fine, but when I try to ping the board, go to the built in web page, or
> try
> snmp, etc. it completely locks up my board and I am forced to hit the
> reset
> button.  What's more interesting is that when I turn on one of the built
> in
> printf debug statements, it prints messages for random traffic.  Along
> with
> that, if I turn multiple debug options on, aka, cluttering my console with
> debug print statements, my application works exactly as intended, just
> with
> a very high ms (around 60+ when it should be <1).
> 
> Just to clarify, my bootloader is working exactly as intended with lwip.
> The webpage works, I can ping the board, and use telnet.  My application
> is
> exactly the same as my bootloader, it just has snmp added on and a few
> minor
> changes (none that would break lwip since they are unrelated).
> 
> Any ideas? What steps could I take to resolve this issue?  I'm not sure if
> this is a problem with my lwip settings in my application somehow, or an
> issue with something else.  I find it very strange that lwip on my
> bootloader works perfectly yet the lwip on my application does not.
> 
> Thanks, Nick
> 
> 
> _______________________________________________
> lwip-users mailing list

> lwip-users@

> https://lists.nongnu.org/mailman/listinfo/lwip-users
> -- 
> Pozdrawiam,
> Krzysztof Wesołowski
> +48 721 337 238
> 
> 
> _______________________________________________
> lwip-users mailing list

> lwip-users@

> https://lists.nongnu.org/mailman/listinfo/lwip-users





--
View this message in context: 
http://lwip.100.n7.nabble.com/Bootloader-to-Application-lwip-crash-tp29489p29502.html
Sent from the lwip-users mailing list archive at Nabble.com.



reply via email to

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