ARM MMC Boot Problem

View: New views
2 Messages — Rating Filter:   Alert me  

ARM MMC Boot Problem

by Ethernut :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello list,

During the last days I've spend some hours to track down a problem with
Ethernut 3. No success so far.

I may later create a full sample to show the problem. My intention right
now is simply to ask, whether someone else had a similar problem and
possibly an idea about what causes this.

We have two Nut/OS applications, mmcloader and httpserv.

mmcloader is linked with at91_rom for running in flash. We modified the
linker script to let the RAM start at 0x3C000. RAM 0-0x3BFFF is free
(except the vector table).

httpserv is actually the httpd sample, linked with at91_ram.

bootmon is replaced by mmcloader, which loads the binary of httpserv
from MMC and stores it in the lower RAM area. This had been verified and
works fine. There are a few things to take care of, like writing the
lowest RAM sector last and disabling interrupts before doing this.

mmloader loads the image, jumps to address 0x0 and httpserv starts
running. Everything works until there is some network traffic. In most
cases the first HTTP request is completely processed and the browser
shows the correct result. The second or third request freezes the system.

Running the same RAM image of httpserv with bootmon works without
problems. Thus, we can assume, that the httpserv image itself is OK.

mmcloader seems to work fine too. Otherwise httpserv won't come that
far, being able to respond to the first one or two HTTP requests, right?

I'm almost sure, that the problem is caused by the state/mode of the
CPU, when jumping from the Nut/OS application running in flash to
address zero into another Nut/OS app.

The bootloader does the same, but is not a full Nut/OS application by
itself. For example, no interrupts are used.

Btw. I tried SVN trunk and release 4.8.3. No difference.

Harald

_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion

Re: ARM MMC Boot Problem

by Ole Reinhardt-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Harald,

> mmcloader seems to work fine too. Otherwise httpserv won't come that
> far, being able to respond to the first one or two HTTP requests, right?

I also had problems using a bootloader. Perhaps at the end this results
from the same problem.

I have a (serial) bootloader, which itself is a NutOS Application linked
to the start of flash. I have my user application linked to offset 64K
into the flash by modifying the startup code and linker script.

My application works fine as long as the .bss and / or .data segment
does not become larger than somewhat around 6000+x bytes. If it grows
larger than this magic threshold my application just freezes if the
bootloader jumps into it. No output at all... If I remove some global
variables so that the bss / data segment is smaler like this threshold
the application works like a charme. So I just have to allocate the
needed ram on the heap instead using global variables.

As I absolutely don't know the reason of this problem I can't tell you
if there is a common reason, but perhaps a starting point for further
investigations.

Bye,

Ole

--
 _____________________________________________________________
|                                                             |
| Embedded-IT                                                 |
|                                                             |
| Ole Reinhardt        Tel. / Fax:        +49 (0)271  7420433 |
| Luisenstraße 29      Mobil:             +49 (0)177  7420433 |
| 57076 Siegen         eMail:    ole.reinhardt@... |
| Germany              Web:         http://www.embedded-it.de |
|_____________________________________________________________|

_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion