there is lots of problem at the 2.0 ıde but this problem very fascinating there is also be at the Servo.h library
I think the problem is simply that the "Arduino_FreeRTOS" library is not compatible with the "Arduino Due" board you are compiling for.
But that is only a guess. We can provide you with a definite answer if you provide more information:
Full output
There is some valuable information in that "Output" panel you gave us a glimpse of in your picture of a computer monitor. But pictures of text aren't so useful even when the text is visible. You need to post text as text.
Please do this:
- Right click on the black "Output" pane at the bottom of the Arduino IDE 2.x window.
- From the context menu, click Copy All.
- Open a forum reply here by clicking the Reply button.
- Click the
</>
icon on the post composer toolbar.
This will add the forum's code block markup (```
) to your reply to make sure the error messages are correctly formatted.
- Press Ctrl+V.
This will paste the compilation output into the code block. - Move the cursor outside of the code tags before you add any additional text to your reply.
- Click the Reply button to post the output.
Identify the library
Please tell us where you got this library from.
If you installed it using the Arduino Library Manager (Sketch > Include Library > Manage Libraries in the Arduino IDE or Libraries > Library Manager in the Arduino Web Editor) then say so and state the full name of the library.
If you downloaded it from a website, then please post a link to that website.
Using board 'arduino_due_x_dbg' from platform in folder: C:\Users\yyild\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12
Using core 'arduino' from platform in folder: C:\Users\yyild\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12
Detecting libraries used...
"C:\Users\yyild\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -mcpu=cortex-m3 -mthumb -DF_CPU=84000000L -DARDUINO=10607 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON "-DUSB_MANUFACTURER="Arduino LLC"" "-DUSB_PRODUCT="Arduino Due"" "-IC:\Users\yyild\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/libsam" "-IC:\Users\yyild\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/CMSIS/CMSIS/Include/" "-IC:\Users\yyild\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/CMSIS/Device/ATMEL/" "-IC:\Users\yyild\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino" "-IC:\Users\yyild\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\variants\arduino_due_x" "C:\Users\yyild\AppData\Local\Temp\arduino-sketch-C9F964F74BD577E9DA0253D18DE7E829\sketch\Blink_AnalogRead.ino.cpp" -o nul
Alternatives for Arduino_FreeRTOS.h: [FreeRTOS-10.4.6-1@10.4.6-1 Arduino_FreeRTOS_Library-master@10.4.6-1 FreeRTOS@10.4.6-0]
ResolveLibrary(Arduino_FreeRTOS.h)
-> candidates: [FreeRTOS-10.4.6-1@10.4.6-1 Arduino_FreeRTOS_Library-master@10.4.6-1 FreeRTOS@10.4.6-0]
"C:\Users\yyild\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -mcpu=cortex-m3 -mthumb -DF_CPU=84000000L -DARDUINO=10607 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON "-DUSB_MANUFACTURER="Arduino LLC"" "-DUSB_PRODUCT="Arduino Due"" "-IC:\Users\yyild\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/libsam" "-IC:\Users\yyild\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/CMSIS/CMSIS/Include/" "-IC:\Users\yyild\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/CMSIS/Device/ATMEL/" "-IC:\Users\yyild\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino" "-IC:\Users\yyild\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\variants\arduino_due_x" "-Ic:\Users\yyild\Documents\Arduino\libraries\Arduino_FreeRTOS_Library-master\src" "C:\Users\yyild\AppData\Local\Temp\arduino-sketch-C9F964F74BD577E9DA0253D18DE7E829\sketch\Blink_AnalogRead.ino.cpp" -o nul
Alternatives for avr/io.h: []
ResolveLibrary(avr/io.h)
In file included from c:\Users\yyild\Documents\Arduino\libraries\Arduino_FreeRTOS_Library-master\src/Arduino_FreeRTOS.h:59:0,
from C:\Users\yyild\AppData\Local\Temp.arduinoIDE-unsaved2022212-16720-1stsc8n.55e2\Blink_AnalogRead\Blink_AnalogRead.ino:1:
c:\Users\yyild\Documents\Arduino\libraries\Arduino_FreeRTOS_Library-master\src/FreeRTOSConfig.h:32:20: fatal error: avr/io.h: No such file or directory
#include <avr/io.h>
^
compilation terminated.
-> candidates: []
Multiple libraries were found for "Arduino_FreeRTOS.h"
Used: C:\Users\yyild\Documents\Arduino\libraries\Arduino_FreeRTOS_Library-master
Not used: C:\Users\yyild\Documents\Arduino\libraries\FreeRTOS-10.4.6-1
Not used: C:\Users\yyild\Documents\Arduino\libraries\FreeRTOS
Using library Arduino_FreeRTOS_Library-master at version 10.4.6-1 in folder: C:\Users\yyild\Documents\Arduino\libraries\Arduino_FreeRTOS_Library-master
Compilation error: exit status 1
that my output panel ,show the error at the line 1 by the arduino ide 2.0 but same code working the arduino ide 1.8 version I am using the same RTOS library both ide but ide 2.0 give the error in this shape `
Önceden biçimlendirilmiş yazı
`
#include <Arduino_FreeRTOS.h>
// define two tasks for Blink & AnalogRead
void TaskBlink( void *pvParameters );
void TaskAnalogRead( void *pvParameters );
// the setup function runs once when you press reset or power the board
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB, on LEONARDO, MICRO, YUN, and other 32u4 based boards.
}
// Now set up two tasks to run independently.
xTaskCreate(
TaskBlink
, "Blink" // A name just for humans
, 128 // This stack size can be checked & adjusted by reading the Stack Highwater
, NULL
, 2 // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest.
, NULL );
xTaskCreate(
TaskAnalogRead
, "AnalogRead"
, 128 // Stack size
, NULL
, 1 // Priority
, NULL );
// Now the task scheduler, which takes over control of scheduling individual tasks, is automatically started.
}
void loop()
{
// Empty. Things are done in Tasks.
}
/--------------------------------------------------/
/---------------------- Tasks ---------------------/
/--------------------------------------------------/
void TaskBlink(void *pvParameters) // This is a task.
{
(void) pvParameters;
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the UNO, LEONARDO, MEGA, and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN takes care
of use the correct LED pin whatever is the board used.
The MICRO does not have a LED_BUILTIN available. For the MICRO board please substitute
the LED_BUILTIN definition with either LED_BUILTIN_RX or LED_BUILTIN_TX.
e.g. pinMode(LED_BUILTIN_RX, OUTPUT); etc.
If you want to know what pin the on-board LED is connected to on your Arduino model, check
the Technical Specs of your board at https://www.arduino.cc/en/Main/Products
This example code is in the public domain.
modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
*/
// initialize digital LED_BUILTIN on pin 13 as an output.
pinMode(LED_BUILTIN, OUTPUT);
for (; // A Task shall never return or exit.
{
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
vTaskDelay( 1000 / portTICK_PERIOD_MS ); // wait for one second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
vTaskDelay( 1000 / portTICK_PERIOD_MS ); // wait for one second
}
}
void TaskAnalogRead(void *pvParameters) // This is a task.
{
(void) pvParameters;
/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the serial monitor.
Graphical representation is available using serial plotter (Tools > Serial Plotter menu)
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
This example code is in the public domain.
*/
for (;
{
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
vTaskDelay(1); // one tick delay (15ms) in between reads for stability
}
that my example code this code example code in the rtos library
}Önceden biçimlendirilmiş yazı
OK, this is valuable information.
I'm going to ask you to provide the verbose output from compiling the same sketch using Arduino IDE 1.8.
Please do this:
- Start Arduino IDE 1.8
- Select File > Preferences from the Arduino IDE menus.
- Check the box next to "Show verbose output during: ☐ compilation".
- Click the OK button.
- Select Sketch > Verify/Compile from the Arduino IDE menus.
- Wait for the compilation to finish.
- Click on the black console pane at the bottom of the Arduino IDE window.
- Press Ctrl+A to select all the text.
- Press Ctrl+C.
This will copy the selected text to the clipboard. - Open a forum reply here by clicking the Reply button.
- Click the
</>
icon on the post composer toolbar.
This will add the forum's code block markup (```
) to your reply to make sure the compilation output is correctly formatted.
- Press Ctrl+V.
This will paste the compilation output into the code block. - Move the cursor outside of the code tags before you add any additional text to your reply.
- Click the Reply button to post the output.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.