Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 20 Mar 2013 06:03 PM by  agnieto@iuma.ulpgc.es
Segmentation Fault on Zoom OMAP35x SOM-LV
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
agnieto@iuma.ulpgc.es
New Member
New Member
Posts:


--
11 Mar 2013 11:45 AM
    Hello all,

    I am using an OMAP3530 SOM-LV in Zoom OMAP35x board and Linux BSP available in LogicPD web for this board.

    I am able of load and run Linux BSP from SD card on this board.

    I program applications and I get the executables with the CodeSourcery. I storage the executables of the applications in the SD card.

    First, I have executed successfully a "hello world" application.
    Second, I have programmed an application that accesses to memory, with this structure:
    *(int*)0x6E000078, but when the application accesses to memory, an error Segmentation Fault appears.
    If I program an application that accesses to other address, for example 0x48004C10, an error Segmentation Fault appears too.

    Also, I have tried to debug using Code Composer Studio and the configuration of device stop because the internal reset of Watch Dog Timer 2 (WDT2) is ongoing.

    I haven't be able to solve this error.

    Thanks
    richard.laborde@logicpd.com
    Basic Member
    Basic Member
    Posts:247


    --
    12 Mar 2013 02:57 PM
    Alejandro,

    When writing an application in Linux (or any other OS), you cannot access memory directly. First, the OS doesn’t want you to as it risks corrupting other applications or the OS itself. Second, the SOMs use virtual memory. In the OS, the memory addresses (“virtual address” in this context) are mapped to different physical memory. The OS does this as a way to help defrag memory during run time without actually moving data around memory. The OS will defrag memory by simply changing the virtual to physical address mapping so the memory looks contiguous even though it may not be physically. See the “peekpoke” package source included in the BSP, as an example of how to use OS calls to access physical memory.

    The watchdog timers can be turned off using the PRCM.CM_FCLKEN_WKUP[5] EN_WDT2, PRCM.CM_FCLKEN_PER[12] EN_WDT3, PRCM.CM_ICLKEN_WKUP[5] EN_WDT2, and PRCM.CM_ICLKEN_PER[12] EN_WDT3 bits.
    agnieto@iuma.ulpgc.es
    New Member
    New Member
    Posts:


    --
    20 Mar 2013 06:03 PM
    Hello,

    Thank you for the reply.
    I have a question about peekpoke command. I have tried write a long type (32 bits) in a memory location.
    But if the address is aligned only a byte is written in memory. Also, if the address is not aligned (e.g. 0x6E000079) only a 4 bit are written in the memory location.
    I have used all the options of this command but I haven't gotten anything.

    Thanks
    You are not authorized to post a reply.