This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Purpose of CYGACC_CALL_IF_RESET?


On 08/18/2010 12:54 AM, Stuart Longland wrote:
Hi,

Does anyone happen to know what CYGACC_CALL_IF_RESET _actually_ does?
Please don't say "reset the device", because in my case, it doesn't...
and I'm looking to find out why.

The target board here is a Ka-Ro TX27 module (Freescale i.MX27), and I
believe the RedBoot that it came with is based on eCos 2.0, but that's a
guess.

After adding some features to be able to manipulate an I²C EEPROM from
within RedBoot and adjust the Linux kernel command line to suit, I've
found that the reset command is broken, the device hangs instead.  I
have no JTAG, so must debug this by tracing through the code by hand,
and inserting diag_printf's liberally.

My understanding is that calling this function (or macro as the case may
be), eventually leads to HAL_PLATFORM_RESET getting called... however it
stops somewhere, indefinitely.  I've tried tracing it, but I find it
very hard to navigate the twists and turns of eCos' internals.

I think I might have a much better idea as to what's going on if I could
determine what the actual flow of execution is once this macro/function
is called.

Could someone enlighten me?
Regards,

Look at .../packages/hal/arm/mdbmx1/var/current/include/hal_var_ints.h


#define HAL_PLATFORM_RESET()                                               \
    CYG_MACRO_START                                                        \
    ((void(*)(void))0)(); /* hang here forever if reset fails */           \
    CYG_MACRO_END

This says that to reset the board, simply jump to location 0, which may or
may not really do what you want.  You'll have to figure out what magic can
actually reset the board.

Note: the code for this platform is not in the public repository, so you
really should ask whomever delivered it to you for help as the eCos community
in general will have no clue.  I just happen to also have access to it.

--
Please keep your replies on the mailing list(s) so that all
may benefit.  Private support is available under contract
from various agents, including MLB Associates.  Private
email to me without a contract will be ignored.

------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]