<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: i.mx6q sabresd OpenGL ES API Segmentation fault in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-mx6q-sabresd-OpenGL-ES-API-Segmentation-fault/m-p/603933#M90911</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can try GPU SDK&lt;/P&gt;&lt;P&gt;Software Development Kits (4)&lt;BR /&gt;&amp;nbsp;i.MX6DQP/DQ/DL/SL/SX GPU Demo Framework SDK (REV 2.3)&lt;BR /&gt;This package contains binary of NXP® GPU demo-framework 2.3 SDK source and tools &lt;BR /&gt;to generate and build demo frame work applications.&lt;BR /&gt;&lt;A href="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-processors/i.mx-6-processors/i.mx6qp/i.mx-6quadplus-processor-quad-core-high-performance-advanced-3d-graphics-hd-video-advanced-multimedia-arm-cortex-a9-core:i.MX6QP?fpsp=1&amp;amp;tab=Design_Tools_Tab"&gt;http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-processors/i.mx-6-processors/i.mx6qp/i.mx-6quadplus-processor-quad-core-high-performance-advanced-3d-graphics-hd-video-advanced-multimedia-arm-cortex-a9-core:i.MX6QP?fpsp=1&amp;amp;tab=Design_Tools_Tab&lt;/A&gt;&lt;/P&gt;&lt;P&gt;also please check that correct bsp is used:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-processors/i.mx-6-processors/i.mx6qp/i.mx-6-series-software-and-development-tool-resources:IMX6_SW" title="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-processors/i.mx-6-processors/i.mx6qp/i.mx-6-series-software-and-development-tool-resources:IMX6_SW"&gt;i.MX 6 Series Software and Development Tool|NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Oct 2016 23:35:31 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2016-10-04T23:35:31Z</dc:date>
    <item>
      <title>i.mx6q sabresd OpenGL ES API Segmentation fault</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx6q-sabresd-OpenGL-ES-API-Segmentation-fault/m-p/603932#M90910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i.mx6q &amp;nbsp; &amp;nbsp; &amp;nbsp;linux 3.14.28&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;unistd.h&amp;gt;&lt;BR /&gt;#include &amp;lt;sys/types.h&amp;gt;&lt;BR /&gt;#include &amp;lt;sys/ioctl.h&amp;gt;&lt;BR /&gt;#include &amp;lt;sys/wait.h&amp;gt;&lt;BR /&gt;#include &amp;lt;sys/mman.h&amp;gt;&lt;BR /&gt;#include &amp;lt;sys/mount.h&amp;gt;&lt;BR /&gt;#include &amp;lt;sys/stat.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;BR /&gt;#include &amp;lt;string.h&amp;gt;&lt;BR /&gt;#include &amp;lt;fcntl.h&amp;gt;&lt;BR /&gt;#include &amp;lt;errno.h&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;EGL/egl.h&amp;gt;&lt;BR /&gt;#include &amp;lt;GLES/gl.h&amp;gt;&lt;BR /&gt;#include &amp;lt;math.h&amp;gt;&lt;BR /&gt;#include &amp;lt;time.h&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(int argc, char** argv)&lt;BR /&gt;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;int fb;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;GLint maj, min;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;EGLDisplay m_eglDisplay;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("OpenGL ES 1.1 DEMO\n");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fb = open("/dev/fb0", O_RDWR);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(fb &amp;lt; 0)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("device fb0 open failed[%d : %d]!\n", fb, errno);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;goto exit0;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;m_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(EGL_NO_DISPLAY == m_eglDisplay)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("error: eglGetDisplay returns EGL_NO_DISPLAY\n");&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;goto exit1;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("eglGetDisplay() success\n");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(EGL_FALSE == eglInitialize(m_eglDisplay, &amp;amp;maj, &amp;amp;min))&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("error: eglInitialize() returns EGL_FALSE\n");&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;goto exit1;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("eglInitialize() success[%d.%d]\n", maj, min);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... ...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Compile options:&lt;/P&gt;&lt;P&gt;CFLAGS += -DLINUX -DEGL_API_FB&lt;/P&gt;&lt;P&gt;LIBS += -lGLESv1_CM -lGAL -lEGL -lVSC -lGAL_egl -lX11&lt;BR /&gt;LIBS += -lXdamage -lXfixes -lXext -lxcb -lXau -lXdmcp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run the app:&lt;BR /&gt;root@imx6qsabresd:~# ./gles_demo&amp;nbsp;&lt;BR /&gt;OpenGL ES 1.1 DEMO&lt;BR /&gt;eglGetDisplay() success&lt;BR /&gt;Segmentation fault&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the API call "eglInitialize(m_eglDisplay, &amp;amp;maj, &amp;amp;min)" causes the Segmentation fault. Why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 04:41:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx6q-sabresd-OpenGL-ES-API-Segmentation-fault/m-p/603932#M90910</guid>
      <dc:creator>garyyin</dc:creator>
      <dc:date>2016-10-04T04:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx6q sabresd OpenGL ES API Segmentation fault</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx6q-sabresd-OpenGL-ES-API-Segmentation-fault/m-p/603933#M90911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can try GPU SDK&lt;/P&gt;&lt;P&gt;Software Development Kits (4)&lt;BR /&gt;&amp;nbsp;i.MX6DQP/DQ/DL/SL/SX GPU Demo Framework SDK (REV 2.3)&lt;BR /&gt;This package contains binary of NXP® GPU demo-framework 2.3 SDK source and tools &lt;BR /&gt;to generate and build demo frame work applications.&lt;BR /&gt;&lt;A href="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-processors/i.mx-6-processors/i.mx6qp/i.mx-6quadplus-processor-quad-core-high-performance-advanced-3d-graphics-hd-video-advanced-multimedia-arm-cortex-a9-core:i.MX6QP?fpsp=1&amp;amp;tab=Design_Tools_Tab"&gt;http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-processors/i.mx-6-processors/i.mx6qp/i.mx-6quadplus-processor-quad-core-high-performance-advanced-3d-graphics-hd-video-advanced-multimedia-arm-cortex-a9-core:i.MX6QP?fpsp=1&amp;amp;tab=Design_Tools_Tab&lt;/A&gt;&lt;/P&gt;&lt;P&gt;also please check that correct bsp is used:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-processors/i.mx-6-processors/i.mx6qp/i.mx-6-series-software-and-development-tool-resources:IMX6_SW" title="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-processors/i.mx-6-processors/i.mx6qp/i.mx-6-series-software-and-development-tool-resources:IMX6_SW"&gt;i.MX 6 Series Software and Development Tool|NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 23:35:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx6q-sabresd-OpenGL-ES-API-Segmentation-fault/m-p/603933#M90911</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2016-10-04T23:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx6q sabresd OpenGL ES API Segmentation fault</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx6q-sabresd-OpenGL-ES-API-Segmentation-fault/m-p/603934#M90912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi igor,&lt;/P&gt;&lt;P&gt;I found the demo code in my L3.14.28 yocto project,&amp;nbsp;tmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/fsl-gpu-sdk/2.0.1-r0/fsl-gpu-sdk-2.0.1/DemoApps.&lt;/P&gt;&lt;P&gt;I can use 'bitbake -c compile -f fsl-gpu-sdk' cmd to compile the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I want to rewrite the main() entry function, only the core OpenGL ES code is needed.&lt;/P&gt;&lt;P&gt;Q1: I can't find the main() function anywhere. How can I do so?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q2: Should I override the main() function? But I don't know how to make the related class(es) work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 12:52:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx6q-sabresd-OpenGL-ES-API-Segmentation-fault/m-p/603934#M90912</guid>
      <dc:creator>garyyin</dc:creator>
      <dc:date>2016-11-02T12:52:17Z</dc:date>
    </item>
  </channel>
</rss>

