Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Teensy 3.2/3.6 using arm_neon.h

  1. #1
    Junior Member
    Join Date
    Feb 2019
    Posts
    7

    Teensy 3.2/3.6 using arm_neon.h

    Hello,

    I've been poking around the libraries and hardware features of the teensy, and found that there's supposedly SIMD support https://forum.pjrc.com/threads/31285...ns-with-Teensy.

    I looked deeper into this, and found that there's a library in the teensy folder called "arm_neon.h". I tried including it in a bare project but I'm getting this error upon compilation:

    Code:
    #include <arm_math.h>
    #include <arm_neon.h>
    
    int32x2_t i;
    
    void setup() {
    
    }
    
    void loop() {
      
    }
    Code:
    In file included from C:\Users\user\Documents\Arduino\teensy_math\teensy_math.ino:7:0:
    
    c:\program files (x86)\arduino\hardware\tools\arm\lib\gcc\arm-none-eabi\5.4.1\include\arm_neon.h:31:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
    
     #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
    
      ^
    
    teensy_math:9: error: 'int32x2_t' does not name a type
     int32x2_t i;
    
     ^
    
    'int32x2_t' does not name a type
    How do I enable neon? Do I need to edit the build flags? If so, how do I do this?

  2. #2
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,567
    ARM NEON is single instruction - multiple data ("SIMD") for the ARM Cortex-A Series and R52.
    Teensy 3.x is Cortex-M and does not support NEON. But it can do SIMD, with its DSP-Extensions. The audio-library for example uses these instructions.

  3. #3
    Junior Member
    Join Date
    Feb 2019
    Posts
    7
    Ah, I see. My hopes are slightly dashed.

    I was hoping for SIMD instructions that can do vector addition/multiplication like neon. I'll check out the audio library later tonight and see what I find.

    Thanks!

  4. #4
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,567

  5. #5
    Junior Member
    Join Date
    Feb 2019
    Posts
    7
    Thank you so much! Exactly what I was trying to find.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •