STM32F4 failure on semaphore release in termios.

Karel Gardas karel.gardas at centrum.cz
Wed Aug 28 21:30:17 UTC 2013


Hello,

I'm trying to get my STM32F4 discovery board working with RTEMS. So far 
I've just modified linkcmd of this BSP to get ROM start address to 
0x08000000:

MEMORY {
	RAM_INT : ORIGIN = 0x20000000, LENGTH = 128k
	ROM_INT : ORIGIN = 0x08000000, LENGTH = 1M
}

that's to get stlink working and flashing the example into MCU flash
and I've also disabled USART 3 and enabled USART 6 in a hope that 
console will be then allocated for this USART. I've done this since I do 
have base board[1] connected to the discovery and it provides canon 9 
pin serial connector connected to the USART 6. Or that's at least how I 
interpret the doc for STM32F4DIS-BB.

Anyway, while trying to run hello.exe for stm32f4 BSP I hit internal 
error with following attributes:

_Internal_error_Occurred (the_source=RTEMS_FATAL_SOURCE_EXCEPTION, 
is_internal=false, the_error=536875260)

this internal error looks to happen in this call chain:

(gdb) where
#0  _Chain_Get_first_unprotected (the_chain=0x20006acc) at 
../../cpukit/../../../stm32f4/lib/include/rtems/score/chainimpl.h:667
#1  0x0800e62a in _Thread_queue_Dequeue_fifo 
(the_thread_queue=0x20006acc) at 
/export/home/karel/vcs/rtems/c/src/../../cpukit/score/src/threadqdequeuefifo.c:37
#2  0x0800e44e in _Thread_queue_Dequeue (the_thread_queue=0x20006acc) at 
/export/home/karel/vcs/rtems/c/src/../../cpukit/score/src/threadqdequeue.c:39
#3  0x0800a766 in _CORE_semaphore_Surrender (the_semaphore=0x20006acc, 
id=436273156, api_semaphore_mp_support=0x0) at 
/export/home/karel/vcs/rtems/c/src/../../cpukit/score/src/coresemsurrender.c:37
#4  0x08008a6a in rtems_semaphore_release (id=436273156) at 
/export/home/karel/vcs/rtems/c/src/../../cpukit/rtems/src/semrelease.c:90
#5  0x08005fb0 in rtems_termios_write (arg=0x20003d80) at 
/export/home/karel/vcs/rtems/c/src/../../cpukit/libcsupport/src/termios.c:806
#6  0x080008ba in console_write (major=0, minor=0, arg=0x20003d80) at 
/export/home/karel/vcs/rtems/c/src/lib/libbsp/arm/stm32f4/../../shared/console_write.c:42
#7  0x080097c4 in rtems_io_write (major=0, minor=0, argument=0x20003d80) 
at /export/home/karel/vcs/rtems/c/src/../../cpukit/sapi/src/iowrite.c:37
#8  0x20003920 in bsp_section_work_begin ()
#9  0x20003920 in bsp_section_work_begin ()

actually this is not the source address of the failure, the failure 
happens on this code line:

Chain_Node *new_first = old_first->next;


Do you have any idea why that happen?

Thanks!
Karel


[1]: 
https://www.element14.com/community/docs/DOC-51084?ICID=knode-STM32F4-bboardmore



More information about the devel mailing list