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:
This is the Scons script
And these are the source files that I adding to build
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.
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:
Code:
/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
Code:
env.Append(CPPPATH=[env['TEENSY4']])
env.Append(CPPDEFINES=['__IMXRT1062__', 'ARDUINO_TEENSY_MICROMOD', 'USB_SERIAL', 'LAYOUT_US_ENGLISH'])
env.Append(CPPDEFINES={'F_CPU' : 600000000})
env.Append(CFLAGS=['-mcpu=cortex-m7',
'-mthumb',
'-mfloat-abi=hard',
'-mfpu=fpv5-d16',
'-ffunction-sections',
'-fdata-sections',
'-nostdlib', '-Wall','-g', '-O2'])
env.Append(LINKFLAGS=['-mcpu=cortex-m7',
'-mfloat-abi=hard',
'-mfpu=fpv5-d16',
'-mthumb',
'-Wl,--gc-sections',
'-T' + os.path.join(env['TEENSY4'], 'imxrt1062.ld')])
variant_top_dir = env['VARIANT_TOP_DIR']
env.Append(LIBPATH=[variant_top_dir.Dir(env['RUNTIME_DIR'])])
And these are the source files that I adding to build
Code:
teensy_sources = [
'startup.c',
'bootdata.c',
'digital.c',
'analog.c',
'nonstd.c',
'pwm.c',
'rtc.c',
'delay.c',
'clockspeed.c',
'tempmon.c',
'usb.c',
'usb_serial.c',
'usb_serial2.c',
'usb_serial3.c',
'usb_desc.c',
'usb_midi.c',
'usb_mouse.c',
'usb_touch.c',
'usb_joystick.c',
'keylayouts.c',
'usb_keyboard.c',
'usb_rawhid.c',
'usb_mtp.c',
'usb_seremu.c',
'debugprintf.c']
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.