STM32F745xx debugging help

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: barthess, RoccoMarco

Posts: 1
Joined: Thu Nov 08, 2018 11:56 am

STM32F745xx debugging help

Postby fvantienen » Thu Nov 08, 2018 12:05 pm

I am new to ChibiOS and could use some debugging help for my new STM32F745VEH6 board. I have some simple functions running, but as soon as I am using any USART, the board immediately crashes while trying to transmit a single character.

The problem occurs inside oq_write at line

Code: Select all

memcpy((void *)oqp->q_wrptr, (const void *)bp, n)
, where immediately after the call of memcpy it crashes.

The GDB output is printed below:

Code: Select all

(gdb) s
123       memcpy((void *)oqp->q_wrptr, (const void *)bp, n);
(gdb) print (void*)oqp->q_wrptr
$4 = (void *) 0x20002c58 <sd_out_buf2>
(gdb) p (const void *)bp
$5 = (const void *) 0x20003a4b <wa_thd_uart2_tx+499>
(gdb) p n
$6 = 1
(gdb) s

Program received signal SIGSEGV, Segmentation fault.
0x00206924 in ?? ()

I am currently out of ideas on how this could happen and how to further debug this, since a normal memcpy somewhere else does not give any problem at all. Could maybe someone give some advise on how to tackle this problem?

User avatar
Site Admin
Posts: 11306
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 412 times
Been thanked: 342 times

Re: STM32F745xx debugging help

Postby Giovanni » Thu Nov 08, 2018 4:02 pm

Have you verified that pointers passed to memcpy are valid? those could be corrupted.


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 8 guests