Segmentation fault (core dumped) STM32mp1 DK2

52 views
asked May 16 in System Integration by AbdulRehman
Hi Everyone, I'm new to Embedded Wizard, after couple of days struggle able to compile and run the application but when I press the push button getting crashed.

I have developed an application for turn ON the onboard LED. Everything compiled and running;

When I press the PushButton application got to crash. Everything already Initialized in and running in the CM4 through STM32CubeIDE..

Below function is written in DeviceDriver.c file.

#define LD7_ORANGE GPIO_PIN_7
void toggel_LED( XInt32 dbg){

    if(dbg) HAL_GPIO_WritePin(GPIOH,  LD7_ORANGE, GPIO_PIN_SET);
    else HAL_GPIO_WritePin(GPIOH,  LD7_ORANGE, GPIO_PIN_RESET);

}

This function is written in command method for On and OFF, Below one is for OFF

$if !$prototyper
native
{
   extern void toggel_LED( int aValue );
   toggel_LED(0);
}
$endif

/********************************************OUTPUT****************************************/

Initialize Display...                        [OK]

Initialize Touch Driver...                   [OK]

Initialize Memory Manager...                 [OK]

Initialize Graphics Engine...                [OK]

Create Embedded Wizard Root Object...        [OK]

Create Embedded Wizard Viewport...           [OK]

Starting Embedded Wizard main loop - press <p> to shutdown application...

---------------------------------------------

Target system                                STM32MP157C-DK2 (OpenGL ES 2.0/EGL/DRM)

Color format                                 RGBA8888

MemoryPool address                           0x000DB260

MemoryPool size                              8388608 bytes

Framebuffer size                             480 x 800

EwScreeenSize                                800 x 480

Graphics accelerator                         OpenGL ES 2.0

Vector graphics support                      enabled

Warp function support                        enabled

Index8 bitmap resource format                enabled

RGB565 bitmap resource format                enabled

Bidirectional text support                   enabled

Operating system                             Embedded Linux

Toolchain                                    GCC

C-Compiler version                           8.2.0

Build date and time                          May 16 2020, 03:33:58

Runtime Environment (RTE) version            9.30

Graphics Engine (GFX) version                9.30

Max surface cache size                       8388608 bytes

Glyph cache size                             256 x 256

Max issue tasks                              100

Surface rotation                             270

---------------------------------------------

Segmentation fault (core dumped)
root@stm32mp1:/usr/local#

1 Answer

+1 vote
answered May 18 by Manfred Schweyer
Hello,

please note that the entire GUI application is running on the Cortex A7 core of the STM32MP1 target and not on the Cortex M4 core. Maybe this is the reason for the segmentation fault.

Let me recommend to check the STM32MP1 documentation or some STM32MP1 forum to get more information about accessing GPIOs on that target.

Best regards,

Manfred.
commented May 24 by AbdulRehman
Thanks Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...