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: ecos-3.0 current stm32 bug?


On 25/08/11 13:51, Philipp Meier wrote:

> 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.

Glad to hear it.

While the "correct" approach is to introduce the extra startup type I
mentioned earlier, you could probably make things work by enabling
interrupts in your bootloader before transferring control to the
application. You would need to ensure that no interrupts actually get
delivered by masking any that are enabled, including the SysTick timer.
Enabling interrupts sets BASEPRI to zero, which should allow the SWI to
avoid the condition that caused the HardFault.

[I've not thought this through in any detail, and it might not work for
other reasons, but it is worth a try.]



-- 
Nick Garnett                                       eCos Kernel Architect
eCosCentric Limited    http://www.eCosCentric.com       The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223 245571
Registered in England and Wales:                         Reg No: 4422071

-- 
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]