This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: STM32 ROMINT don't run
- From: John Dallaway <john at dallaway dot org dot uk>
- To: Samuel Charnet <samcharnet at gmail dot com>
- Cc: eCos Discussion <ecos-discuss at sourceware dot org>
- Date: Fri, 24 Jan 2014 08:57:03 +0000
- Subject: Re: STM32 ROMINT don't run
- Authentication-results: sourceware.org; auth=none
- References: <CACra8jX5=y1-7iRktxuvK11T8zTNBPfR38=5b57PK2EJNbQ1nA at mail dot gmail dot com> <CACra8jX2N2HkH2QnmTh+6u76bUGOT8AyGALQiSB_g0jEXhvHFA at mail dot gmail dot com> <52E14C04 dot 30308 at dallaway dot org dot uk> <CACra8jU0qa3i0xFD+o7FoPE7p4iAExz-pY9i5gJogdgE285MCQ at mail dot gmail dot com>
Hi Samuel
On 23/01/14 18:02, Samuel Charnet wrote:
> John Dallaway wrote:
>
>> You may be observing the following issue:
>>
>> http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001864
>>
>> Try modifying hal/cortexm/arch/current/src/hal_misc.c to read as follows:
>>
>>> #if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMINT)
>>> // Relocate data from ROM to RAM
>
> Thanks for your quick answer.
>
> I had a hope but it is not enought, it still doesn't run.
>
> the stack is different :
>
> (gdb) target remote :3333
> Remote debugging using :3333
> 0x00000000 in ?? ()
> (gdb) c
> Continuing.
> Note: automatically using hardware breakpoints for read-only addresses.
> stm32f4x.cpu -- clearing lockup after double fault
> Program received signal SIGINT, Interrupt.
> 0x00000000 in ?? ()
> (gdb) where
> #0 0x00000000 in ?? ()
> #1 0x08001d3c in Cyg_Exception_Control::deliver_exception
> (this=<optimized out>, exception_number=<optimized out>,
> exception_info=<optimized out>)
> at /home/lucky/Devel/PLSee/ecos/ecos-3.0/packages/kernel/current/src/common/except.cxx:234
> #2 0x0800005e in hal_default_exception_vsr () at
> /home/lucky/Devel/PLSee/ecos/ecos-3.0/packages/hal/cortexm/arch/current/src/vectors.S:184
> #3 0x0800005e in hal_default_exception_vsr () at
> /home/lucky/Devel/PLSee/ecos/ecos-3.0/packages/hal/cortexm/arch/current/src/vectors.S:184
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
> (gdb)
If you have not already done so, disable compiler optimisation by
removing "-O2" from the CYGBLD_GLOBAL_CFLAGS option. Also enable
CYGPKG_INFRA_DEBUG. You should then be able to step into your code from
system reset and see where the exception is triggered.
Note that STM3240G-EVAL ROMINT startup is similar to STM32F4-Discovery
ROM startup which is working fine. So I don't think there is a major
problem here. Check all references to "CYG_HAL_STARTUP == ROM" and
"CYG_HAL_STARTUP_ROM". Modify these expressions if the code they control
is also relevant for ROMINT startup.
Good luck with your debugging...
John Dallaway
eCos maintainer
http://www.dallaway.org.uk/john
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss