Forum Rule: Always post complete source code & details to reproduce any issue!
Page 4 of 4 FirstFirst ... 2 3 4
Results 76 to 86 of 86

Thread: Teensy Convolution SDR (Software Defined Radio)

  1. #76
    Junior Member
    Join Date
    Apr 2017
    Posts
    8
    I uninstalled then re-installed Arduino/Teensy on my computer and followed Jan's instructions today, but I'm still getting some puzzling errors. While installing the CMSIS files I found that arm_math.h and arm_common_tables.h already existed in the teensy3/ folder, so I replaced them. I also discovered that libarm_cortexM4l_math.a and libarm_cortexM4lf_math.a already existed in the arduino arm-none-eabi/lib/ folder and also replaced them with new CMSIS files.

    Here is the compiler output from a clean install + Jan's modifications:

    Code:
    Arduino: 1.8.2 (Windows 10), TD: 1.36, Board: "Teensy 3.6, Serial, 180 MHz, Faster, US English"
    
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio/analyze_fft256.h:32:0,
    
                     from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio/Audio.h:61,
    
                     from C:\Users\John\Documents\Radio stuff\CS-40\Teensy-ConvolutionSDR-master\Teensy_Convolution_SDR\Teensy_Convolution_SDR.ino:114:
    
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/arm_math.h:314:4: error: #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS or ARM_MATH_CM0"
    
       #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS or ARM_MATH_CM0"
    
        ^
    
    C:\Users\John\Documents\Radio stuff\CS-40\Teensy-ConvolutionSDR-master\Teensy_Convolution_SDR\Teensy_Convolution_SDR.ino:127:50: fatal error: play_sd_mp3.h: No such file or directory
    
    compilation terminated.
    
    Multiple libraries were found for "SD.h"
     Used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
     Not used: C:\Program Files (x86)\Arduino\libraries\SD
    Error compiling for board Teensy 3.6.
    
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    After inserting the code suggested by Pete (#define ARM_MATH_CM4) I get the following errors:

    Code:
    Arduino: 1.8.2 (Windows 10), TD: 1.36, Board: "Teensy 3.6, Serial, 180 MHz, Faster, US English"
    
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/arm_math.h:304:0,
    
                     from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio/analyze_fft256.h:32,
    
                     from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio/Audio.h:61,
    
                     from C:\Users\John\Documents\Radio stuff\CS-40\Teensy-ConvolutionSDR-master\Teensy_Convolution_SDR\Teensy_Convolution_SDR.ino:114:
    
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/core_cm4.h:155:95: fatal error: core_cmFunc.h: No such file or directory
    
    compilation terminated.
    
    Error compiling for board Teensy 3.6.
    
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    At this point my only thought is that I'm using a newer version of Arduino/Teensy that breaks the dependencies somehow. I'm not sure if anyone else can recreate these errors, but it would be nice to get to the bottom of this.

    EDIT:

    Hunting down the source of some of the errors I've discovered two things.

    1) The error in audio.h leads to #include "analyze_fft256.h", and analyze_fft256.h traces back to #include "arm_math.h", which traces to #include "core_cm4.h"

    2) After copying core_cmFunc.h from the CMSIS library into the teensy3/ folder I get an error about a missing cmsis_gcc.h file. I also copied that into the teensy3 folder, which brings us back to the errors found in this earlier post: https://forum.pjrc.com/threads/40590...l=1#post147325

    So we seem to have come full circle. I'm officially stumped.
    Last edited by Hobbes; 06-30-2017 at 04:49 PM.

  2. #77
    Junior Member
    Join Date
    Apr 2017
    Posts
    8
    RESOLVED!

    It is with great relief, and no small amount of chagrin, that I can report that the source of these errors was in the unmodified arm_math.h file. As it turns out, Notepad++ will only turn administrator mode on and not automatically save without clicking the button again, which I had failed to do. So all of this was traced back to a permissions issue; Jan's modifications were simply never saved. Whew!

    In other news, I had to overcome two more errors before getting a clean complie. The first was the same error regarding sincosf that has been encountered by other users.

    Code:
    error: 'sincosf' was not declared in this scope
    This was overcome by inserting the following code just after the buttons are defined:
    Code:
    {
    void sincosf(float err, float *s, float *c);
    
    }
    It may be that this function is not in the default Arduino/Teensy installation, but that's a matter for another time.


    The next error had to do with another missing file, this time play_sd_mp3.h. This was fixed by installing the Arduino-Teensy-Codec-lib by Frank Boesing, available here: https://github.com/FrankBoesing/Ardu...ensy-Codec-lib

    Thanks to everyone for your support and I will hopefully have some results from my project in the next week or so!

    Cheers,
    John VA7JBE

  3. #78
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    190
    Hi John,

    thatīs great news! Thank you also for providing the two solutions for sincosf and the excellent MP3 lib by Frank B.

    Have fun with the Teensy Convolution SDR and would be nice to hear about your progress and potential improvements ;-).

    73 de Frank DD4WH

  4. #79
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    190
    It took me some time to implement the main filters in the Teensy Convolution SDR in a quite different way:

    - they used to be implemented as filters with real coefficients, meaning that in the course of the convolution process during the complex multiply of the filter mask and the FFT results only half of the filter mask was filled with coefficients (real), the other half (imaginary) just contained zeros

    - in Whiteley (2011, page 48) I found a very nice description of a convolution process which uses complex FIR filter coefficients, additionally using a frequency shift making it possible to not only lowpass filter the audio samples, but also implement bandpass filtering with the same amount of calculations!
    https://sourceforge.net/projects/cut...2.pdf/download

    So now the audio chain in the Teensy Convolution SDR has a "new" way of filtering using complex FIR filter coefficients making it possible to adjust filters in a totally flexible way, freely adjustable by the user: try receiving in SAM mode with 1.5khz lowpass in the lower sideband and 3.6kHz lowpass filter in the upper sideband or receive LSB with 300Hz to 2400Hz response :-) [calculations are not more complicated, the same processor power is necessary!]

    One surprise for me was, that you do not need any removal of bins prior to the complex multiply in order to choose sidebands (LSB, USB) any more, the new filter does all the magic for you: just choose HiCut frequency of 2300Hz and low cut frequency of 200Hz and you listen to USB, choose HiCut of -300Hz and LoCut of -2700Hz and listen to LSB ;-).

    Source code -as usual- is on github: https://github.com/DD4WH/Teensy-Conv...lution_SDR.ino

    Have fun with the Teensy Convolution SDR!

    73 de Frank

  5. #80
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    190
    After updating the (very) old Arduino and Teensyduino installations on my computer to the newest versions 1.8.5 and 1.40, I had to change some small things in the Teensy Convolution SDR code in order to compile it accurately.

    Some more changes in the Teensy Convolution SDR:

    * I took this opportunity to update the description of how to setup the software for the Teensy Convolution SDR (can be found on the github front page), so it should now be easier to set it up
    * repaired the FM mono and FM stereo code, which was distorting heavily, but is now clean again
    * Convolution FFT size was changed to 512 taps (was 1024 taps) in order to save a real lot of memory (this memory is needed, because I plan to implement morse code and RTTY decoding in the future)
    * because of this change and freeing up of memory, now MP3 playing works again

    https://github.com/DD4WH/Teensy-ConvolutionSDR

    Have fun with the Teensy,

    Frank DD4WH

  6. #81
    Junior Member
    Join Date
    Nov 2017
    Posts
    2
    Hi all
    I have the same configuration as frank arduino ide 1.85 and the teensyduino 1.40.
    I have also install the new ARM CMSIS DSP library and modify the arm_math.h file
    When I compiled the sketch I get next error :

    Arduino: 1.8.5 (Windows 10), TD: 1.40, Board:"Teensy 3.6, Serial, 180 MHz, Faster, US English"
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/core_cmFunc.h:61:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/core_cm4.h:155,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/arm_math.h:315,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio/analyze_fft256.h:32,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio/Audio.h:61,
    from C:\Users\PC Hellum\Documents\Arduino\Teensy-ConvolutionSDR-master\Teensy_Convolution_SDR\Teensy_Convolution_S DR.ino:124:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/cmsis_gcc.h:58:75: error: macro "__enable_irq" passed 1 arguments, but takes just 0
    __attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_irq(void)
    ^
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/cmsis_gcc.h:69:76: error: macro "__disable_irq" passed 1 arguments, but takes just 0
    __attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_irq(void)

    ^
    Meerdere bibliotheken gevonden voor "SD.h"
    Gebruikt: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
    Niet gebruikt: C:\Program Files (x86)\Arduino\libraries\SD
    Fout bij het compileren voor board Teensy 3.6[/SIZE]

    what am I doing wrong ?
    please help
    jwsmid PE1RZM

  7. #82
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    190
    Hi PE1RZM,

    sorry for late reply.

    Well, I am really no expert in error interpretation, but I guess you did something wrong with installing the CMSIS lib. Did you follow EXACTLY Jans description here?:

    https://forum.pjrc.com/threads/40590...l=1#post129081

    Sorry, but cannot give you more help.

    I installed a fresh copy of the newest Arduino and Teensyduino versions on my computer (1.8.5 and 1.40) and then followed exactly Jans description and it worked . . .

    73 de Frank DD4WH

  8. #83
    Junior Member
    Join Date
    Nov 2017
    Posts
    2
    Hi DD4WH

    It works now
    I got help from xhenk01

    73 jan PE1RZM

  9. #84
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    190
    Hi Jan,

    very nice to hear that it works now!

    For all others it would be interesting to know how you got your problem solved, so others can learn from you.

    Would be nice if you could post the solution!

    All the best, have fun,

    73 de Frank DD4WH

  10. #85
    First, thanks Frank for letting us share the project. I am putting one together using a piece of hardware that might be of interest to others.

    Before getting to that, let me explain how I got here. I have an out-of-date 2-meter transmit and receive SDR called the DSP-10, http://www.proaxis.com/~boblark/dsp10.htm
    There are 300 or so of these around but end of life is here since, in part, the ADSP-2181 boards are no longer available. Plus the code for the DSP-10 is all in assembly language, and changes are a bit laborious. So, the first thought for dealing with the processor issues was to use a T3.6 and a Codec to make a drop in replacement for what Analog Devices called the "EZ-Kit."

    Then I saw Frank's Convolution SDR and the use of floating point routines that looked like a great starting point for the DSP-10 project. Besides, it looked like a neat project by itself. So, I now have Frank's software compiling (except for the SD card that is commented out) and am ready to make up I-Q mixers, display and associated control stuff. It dawned on me that if I did a decent job of making a Control Box that had the T3.6 and knobs, buttons, the touch 360x240 display and assorted interfaces, it could be used with Frank's project, and by re-plugging the RF hardware, the DSP-10. The latter has always wanted a tuning knob, and the little display would make it capable of stand-alone operation.

    So to get to the reason for this post, I put together a schematic diagram that (hopefully) is the super-set of things needed for both radios, as well as most anything that might reasonably come along. I have not yet laid out the board, but wanted to get community comments that might make this more useful. The board is posted:
    http://www.proaxis.com/~boblark/SDR_Ctrl1.pdf
    It includes:
    * Teensy 3.6 with an extender card to bring out the bottom pads under the SD card
    http://https://forum.pjrc.com/thread...m-pads-on-T3-6
    * PJRC Touch Screen
    * PJRC plug-in Codec or alternative with the same pinout
    * 8 Buttons (including those on knobs)
    * 3 Knobs
    * The USB port on the Teensy
    * Three RS-232 ports (DSP-10 historically needs this, PC control, GPS and Antenna Control)
    * Two extra SPI ports
    * 12 or so extra digital outputs
    * Buffering and voltage shifting on lines to the RF hardware
    * A single 25-pin D connector for control of the RF hardware
    It is tough to figure out usage from the schematic, so my spread sheet tracking of pins is here:
    http://www.proaxis.com/~boblark/TeensyPinAssignment.pdf

    Comments would be appreciated. My intention is to get this onto a compact PC board that would be shared through OSH Park. So, there are no promises, but if anyone else would be interested in this sort of control box, this is a chance to steer the functionality and/or implementation.

    Thanks, Bob W7PUA

  11. #86
    Let me see if I can enter the link to the extender card [that 404's because of 2 http(s)]:

    https://forum.pjrc.com/threads/48553...m-pads-on-T3-6

Posting Permissions

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