On 08/25/2011 02:31 PM, Nick Garnett wrote:
On 25/08/11 13:13, Philipp Meier wrote:
With the bootloader built under Windows/Cygwin, basepri (mon reg
basepri) is 0x00 when my application's hal_reset_vsr function is reached.
When I build the bootloader (using the same ecos-library version/code
and the same bootloader source code) under Linux, then basepri is 0x10
when my application's hal_reset_vsr function is reached.
Why this difference between Cygwin and Linux?
In theory BASEPRI should have been set to 0x10 by both bootloaders by
the time the application starts running. That the Windows-built
bootloader has not done that is unexpected. It looks like the actual bug
is in the Windows build. The Linux build is doing what I would expect.
So it looks like you have been fortunate not to trip over this issue
earlier.
The comparison of the executables that I mentioned earlier should help.
It looks like only the bootloaders may need comparing.
Thank's a lot. This is exactly the case!
There has been a bug in HAL_DISABLE_INTERRUPTS (hal_intr.h) - corrected
with "changeset: 3009:9ba76199bff2" (Mercurial): Bugzilla 1001154
This bug "helped" as so that our bootloader was working until now.
I validated this by "re-implementing" the disable interrupt bug on my
Linux box (just have to change the hal_intr.h file in the ecos library)
- and with this faulty version my application starts up as with the
cygwin built bootloader.
On my Windows/Cygwin box I manually corrected this bug in the ecos
source code (at that moment I could not change to ecos-current) - but
for my bootloader I did not re-build the ecos library. And therefore my
Windows/Cygwin built bootloader still has the HAL_DISABLE_INTERRUPTS bug
which makes our code to run.
Thank you all for your good ideas - I now know where I have to change my
implementation.
Regards
Philipp
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss