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

Thread: Error compiling Teensy4 cores

  1. #1
    Junior Member
    Join Date
    Feb 2021

    Error compiling Teensy4 cores

    Hello everyone,
    Currently Im using teensy3 to distribute firmware that uses a third party SDK. The program is written in C and to compile it I use Scons adding the links to core teensy3.
    Now, we want to migrate to teensy4, but when I try to compile the cores, compiler shows this error:

    /opt/arduino/hardware/teensy/avr/cores/teensy4/startup.c:770: undefined reference to `pendablesrvreq_isr'
    /opt/arduino/hardware/teensy/avr/cores/teensy4/startup.c:770: undefined reference to `systick_isr'
    collect2: error: ld returned 1 exit status
    This is the Scons script
        env.Append(CPPDEFINES={'F_CPU' : 600000000})
                           '-nostdlib', '-Wall','-g', '-O2'])
                              '-T' + os.path.join(env['TEENSY4'], 'imxrt1062.ld')])
        variant_top_dir = env['VARIANT_TOP_DIR']
    And these are the source files that I adding to build
    teensy_sources = [
    Can anybody help me figure out what's wrong in my script? I'll gladly take any advice or idea or how to troubleshoot this. Thanks for your time.

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Sorry I know nothing abot scones or the like, so not sure how much help I will be...
    But one thing stands out is: ARDUINO_TEENSY_MICROMOD
    That is for a non-existent board that is rummer to be coming. You might want to set that instead to : ARDUINO_TEENSY40

    Also grep is your friend:

    systick_isr is in the file EventResponder.cpp
    And I believe the other one is as well...

  3. #3
    Junior Member
    Join Date
    Feb 2021
    Hello KurtE,
    Thanks for your answer, I will try and tell you how it goes.

    On the other hand, about EventResponder, I read that I must first compile this class and then link it to the source files in C. But I don't know how to do that.
    So, th problem is that for Teensy3, all source files are in C but for Teensy4 the source files has C and C++ files.

Posting Permissions

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