[ECOS] Changing flash wait state on SAM7
Jürgen Lambrecht
J.Lambrecht@televic.com
Tue Apr 8 08:16:00 GMT 2008
Andrew Lunn wrote:
>>The trick I did was to disable most startup macro's in the platform
>>setup code and let my BDI probe do most of the configuring. My
>>experience with clocks getting reconfigured at eCos startup wasn't a
>>very good one ;)
>>
>>
>
>What happens when you don't have a BDI connected?
>
>Do you know what the BDI actually does which causes problems? It would
>be good to tweak eCos a little to make BDI work properly. However, i
>don't have access to a BDI and i have no problems with my JTAG base
>debugger....
>
> Andrew
>
>
>
My procedure (set-up by company Mind) to debug with a JTAG debugger as
the BDI (I use a BDI2000 from Abatron - I don't know if there are other
ones) or the PEEDI (Ronetix) is to use an eCos RAM build.
Then BDI needs a startup config file (configured with the config command
in a bdi telnet session), and with that file the BDI initializes the
processor (the clock and the chip selects, maybe some GPIO) and then
(for my ARM platform) does a remap.
The same code from the BDI config file is also in hal_platform_setup.h,
but it has a define before it: #if defined(CYG_HAL_STARTUP_ROM) ||
defined(CYG_HAL_STARTUP_ROMRAM). This because RAM mode was made for
RedBoot loading the image (after having initialized the processor).
So you need to change the BDI config file to change wait states and so on.
I have tried using ROM and ROMRAM images to debug, and with and without
initilizing the processor in the binary, but my conclusion was: use ecos
RAM mode to debug.
There is 1 thing to take car of: in RAM mode, by default the VVT
initializing code is not compiled (because RAM mode was made for RedBoot
that initializes the VVT).
Therefor I made another ecos startup mode (my ecos tweak for the BDI):
JTAGRAM. In attach my settings related to RAM mode (I think only the VVT
one is really needed.)
Mark: with the BDI there is a trick to use normal RAM mode: do 'reset
run', then 'sleep 1 [s]' and only then 'reset halt' and then load the
code: this way Redboot starts up for a short while long enough to fill
the VVT.
I hope this addresses your problem..
Kind regards,
Jürgen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RAM.sh
Type: application/x-sh
Size: 706 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20080408/1116acdd/attachment.sh>
-------------- next part --------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list