This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Self Modifying Code on the ARM1176JZF-S (raspberry pi)

Note: This was originally posted on 6th April 2013 at http://forums.arm.com

Hello
I'm trying to write some Self modifying code (SMC) to run on my raspberry pi and I've been reading a few things and am slightly confused.
  • [size=2]From what I understand, ARMv6-M is thumb2 only (i.e. always in thumb mode)  So if I want to write SMC, it has to be in thumb 2? (despite the 1176JZF-S? being able to run both arm and thumb?)
    [/size]
  • [size=2]Should I use MCRR (and stay in the assembly) or linux's mmap/mprotect/__cache__clear (in the OS) for cache coherence?

    Currently, I just keep getting segmentation faults on my code


    Best
    Sally[/size]
Parents
  • Note: This was originally posted on 7th April 2013 at http://forums.arm.com

    ARMv6-M is Thumb only.  However, the ARM1176JZF-S is an implementation of ARMv6 with the Security Extensions - not - ARMv6-M.  I know this can be somewhat confusing.  Basically ARMv6-M and ARMv7-M are the versions of the architecture of used by the Cortex-M microcontrollers.
    For the record, the ARM1176JZF-S does NOT support Thumb-2. It supports ARM and Thumb (or Thumb-1 if that's clearer).
    My Linux experience is admittedly limited, but I'd recommend use the kernel calls.  It will help make your code more portable, and is why they're provided in the first place.

Reply
  • Note: This was originally posted on 7th April 2013 at http://forums.arm.com

    ARMv6-M is Thumb only.  However, the ARM1176JZF-S is an implementation of ARMv6 with the Security Extensions - not - ARMv6-M.  I know this can be somewhat confusing.  Basically ARMv6-M and ARMv7-M are the versions of the architecture of used by the Cortex-M microcontrollers.
    For the record, the ARM1176JZF-S does NOT support Thumb-2. It supports ARM and Thumb (or Thumb-1 if that's clearer).
    My Linux experience is admittedly limited, but I'd recommend use the kernel calls.  It will help make your code more portable, and is why they're provided in the first place.

Children
No data