FreeRTOS compile error saying Teensy 3.5 board is AVR architecture

Status
Not open for further replies.

dlm080

Member
I'm trying to compile a sketch using FreeRTOS for the first time on my Teensy 3.5 board. I'm getting a compile error saying my board runs on AVR architecture (see error message below). I believe I have a Freescale ARM processor. Note: I am able to run the Teensy Tutorial Blink sketch successfully. Am I'm missing something basic here?

Arduino: 1.8.9 (Linux), TD: 1.47, Board: "Teensy 3.5, Serial, 120 MHz, Faster, US English"

WARNING: library FreeRTOS_ARM claims to run on (sam) architecture(s) and may be incompatible with your current board which runs on (avr) architecture(s).
/tmp/arduino_build_755366/core/core.a(EventResponder.cpp.o): In function `pendablesrvreq_isr':
/home/derek/arduino-1.8.9/hardware/teensy/avr/cores/teensy3/EventResponder.cpp:87: multiple definition of `pendablesrvreq_isr'
/tmp/arduino_build_755366/libraries/FreeRTOS_ARM/utility/port.c.o:/home/derek/Arduino/libraries/FreeRTOS_ARM/src/utility/port.c:469: first defined here
/home/derek/arduino-1.8.9/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: Disabling relaxation: it will not work with multiple definitions
/tmp/arduino_build_755366/core/core.a(EventResponder.cpp.o): In function `EventResponder::triggerEventNotImmediate()':
/home/derek/arduino-1.8.9/hardware/teensy/avr/cores/teensy3/EventResponder.cpp:46: multiple definition of `systick_isr'
/tmp/arduino_build_755366/libraries/FreeRTOS_ARM/utility/port.c.o:/home/derek/Arduino/libraries/FreeRTOS_ARM/src/utility/port.c:291: first defined here
collect2: error: ld returned 1 exit status
Error compiling for board Teensy 3.5.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
 

Attachments

  • teensy3.5_board.jpg
    teensy3.5_board.jpg
    112.7 KB · Views: 94
  • freeRTOS.ino
    2 KB · Views: 52
@PaulStoffregen - can answer this a lot better than I can...

The Teensy Teensy 3.x and 4.0 and LC are all ARM based products, but the earlier Teensy 1 and 2.x were AVR based products.

When a board (set of boards) is installed, under the Arduino, IDE, part of the installation is to pick a location on where things are installed, and as you can see in the messages like:
Code:
/home/derek/arduino-1.8.9/hardware/teensy/[B]avr/[/B]cores/teensy3/EventResponder.cpp:46: multiple definition of `systick_isr'
Paul choose to put all of it under the AVR tag. Why?

I believe it is such that all of the libraries installed like for example: Wire
will only need to be installed in one place and can be used by both the T2(AVR) and the others which are ARM.
However this does cause some defines to be set that show AVR...
 
I just commented out the systick_isr and pendablesrvreq_isr functions in arduino-1.8.9/hardware/teensy/avr/cores/teensy3/EventResponder.cpp, so the ones from freeRTOS would be used instead.
 
Great! Thx. It worked right away.

I just commented out the systick_isr and pendablesrvreq_isr functions in arduino-1.8.9/hardware/teensy/avr/cores/teensy3/EventResponder.cpp, so the ones from freeRTOS would be used instead.

It just took me awhile to figure where the "Contents" folder was on my Mac: I had to right click on the Arduino app.
It worked right away after commenting out those 2 functions from "EventResponder.cpp" as you explained before.
Thx.
 
Status
Not open for further replies.
Back
Top