Giter Site home page Giter Site logo

freertos-arduino's People

Contributors

greiman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freertos-arduino's Issues

FreeRTOS_AVR tick timer question.

Thanks @greiman for this Arduino port of FreeRTOS, its great! I've been using it for some simple applications and mostly following the examples.

Now I got to do some applications where tasks have to wait for long periods of time and it got me wondering how long can the vTaskDelay and vTaskDelayUntil functions wait for. I am not really familiarized with the avr architecture (I've worked mostly with arm cortex-m) but I took a look at the port.c to see what timer you were using and it seems like you are using timer0, correct?

#if 1 // WHG
/*-----------------------------------------------------------*/
/*
 * Setup timer 0 compare match A to generate a tick interrupt.
 */
static void prvSetupTimerInterrupt( void )
{
  OCR0A = 1;
  TIMSK0  |= (1 << OCIE0A);
}
#if configUSE_PREEMPTION == 1

Not sure what the ISR configuration is in this case. The comment indicates that it interrupts due to a comparator match A, but I don't understand the configuration.

I also saw that there is a hard-coded conditional preprocessor directive that excludes timer1 configuration functions with a "WHG" comment.

#else  // WHG
/*
 * Setup timer 1 compare match A to generate a tick interrupt.
 */
static void prvSetupTimerInterrupt( void )
{
uint32_t ulCompareMatch;
uint8_t ucHighByte, ucLowByte;
...

What does WHG stand for?
It would be awesome to get some insight!
Thanks again.
Martin.

Free_RTOS_ARM compatibility with teensy 3.1

Hello, i am using a teensy 3.1 board. PlatformIO is able to find my library however when running the example frBLink.ino i got an error:
in function pendablesrvreq_isr': EventResponder.cpp:(.text.pendablesrvreq_isr+0x0): multiple definition of pendablesrvreq_isr'; .pio\build\main\lib632\libFreeRTOS_ARM_AMDC.a(port.c.o):port.c:(.text.pendablesrvreq_isr+0x0): first defined here
in function systick_isr': EventResponder.cpp:(.text.systick_isr+0x0): multiple definition of systick_isr'; .pio\build\main\lib632\libFreeRTOS_ARM_AMDC.a(port.c.o):port.c:(.text.systick_isr+0x0): first defined here
Could this be an issue?

Also, is it possible to configure this library so that it is compatible with teensy 4.1? Thank you!

Adding Arduino Zero/SamD21 processors

Hello Greiman,

Thank you for porting freeRTOS to the Arduino, I have been using your libraries alot these past few months and am going to use them in many Arduino projects to come. I appreciate all the time and RTOS examples you included with the libraries, has made it quite easy and enjoyable to poke around and learn FreeRtos.

I would like to port your libraries over to the Arduino Zero/SamD21 line of processors as well. Both Sparkfun and Adafruit both have very popular SamD21 board lines right now and have plenty of ram to support a lot of task stacks. I just ram out of ram on a large AVR project and its time to move up a processor line.

I am messaging to get your advice or assistance on what would need to be done to port to this new processor. I have Avr Studio and freeRTOS examples running on the samD21, would be nice to focus my attention to the proper source files :-)

Memory

Hi

In my repository I have added https://github.com/Formator/FreeRTOS-Arduino/blob/master/libraries/FreeRTOS_ARM/examples/frMemTest/frMemTest.ino which is demo for Memory issue. Problem is that heap and stack memory overlap each other.

My demo output on Arduino DUE:

    arena=0
  ordblks=0
 uordblks=0
 fordblks=0
 keepcost=0
RAM Start 20070000
Data/Bss end 2007144c
Heap End 2007144c
Stack Ptr 20087f98
RAM End 20088000
Heap RAM Used: 0
Program RAM Used 5196
Estimated Free RAM: 93004

    arena=7092
  ordblks=1
 uordblks=3572
 fordblks=3520
 keepcost=3520
RAM Start 20070000
Data/Bss end 2007144c
Heap End 20073000
Stack Ptr 20071a18
RAM End 20088000
Heap RAM Used: 3572
Program RAM Used 5196
Estimated Free RAM: -9128

First output is before FreeRTOS start, second output and all outputs after that are outputs from FreeRTOS task. I have tested this example also on ChRt (ChibiOS/RT) but I'm getting similar negative free ram numbers...

Maybe I'm doing something wrong or is here some OS Memory issue?

Linking issue on a mac for Blinky project

I get the error below when compiling the sketch on macos High Sierra, with Arduino 1.8.4 and teensyduino on top.

My Sketch

/*
 * Example to demonstrate thread definition, semaphores, and thread sleep.
 */


// The LED is attached to pin 13 on Arduino.
const uint8_t LED_PIN = 13;

// Declare a semaphore handle.
SemaphoreHandle_t sem;
//------------------------------------------------------------------------------
/*
 * Thread 1, turn the LED off when signalled by thread 2.
 */
// Declare the thread function for thread 1.
static void Thread1(void* arg) {
  while (1) {

    // Wait for signal from thread 2.
    xSemaphoreTake(sem, portMAX_DELAY);

    // Turn LED off.
    digitalWrite(LED_PIN, LOW);
  }
}
//------------------------------------------------------------------------------
/*
 * Thread 2, turn the LED on and signal thread 1 to turn the LED off.
 */
// Declare the thread function for thread 2.
static void Thread2(void* arg) {

  pinMode(LED_PIN, OUTPUT);

  while (1) {
    // Turn LED on.
    digitalWrite(LED_PIN, HIGH);

    // Sleep for 200 milliseconds.
    vTaskDelay((200L * configTICK_RATE_HZ) / 1000L);

    // Signal thread 1 to turn LED off.
    xSemaphoreGive(sem);

    // Sleep for 200 milliseconds.
    vTaskDelay((200L * configTICK_RATE_HZ) / 1000L);
  }
}
//------------------------------------------------------------------------------
void setup() {
  portBASE_TYPE s1, s2;

  Serial.begin(9600);
  
  // initialize semaphore
  sem = xSemaphoreCreateCounting(1, 0);

  // create task at priority two
  s1 = xTaskCreate(Thread1, NULL, configMINIMAL_STACK_SIZE, NULL, 2, NULL);

  // create task at priority one
  s2 = xTaskCreate(Thread2, NULL, configMINIMAL_STACK_SIZE, NULL, 1, NULL);

  // check for creation errors
  if (sem== NULL || s1 != pdPASS || s2 != pdPASS ) {
    Serial.println(F("Creation problem"));
    while(1);
  }
  // start scheduler
  vTaskStartScheduler();
  Serial.println(F("Insufficient RAM"));
  while(1);
}
//------------------------------------------------------------------------------
// WARNING idle loop has a very small stack (configMINIMAL_STACK_SIZE)
// loop must never block
void loop() {
  // Not used.
}

Error log

Linking everything together...
"/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-gcc" -O2 -Wl,--gc-sections,--relax,--defsym=__rtc_localtime=1506482470 "-T/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/mk20dx256.ld" -lstdc++  -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -o "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/freertos.ino.elf" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/sketch/freertos.ino.cpp.o" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/FreeRTOS_ARM.c.o" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/assertMsg.cpp.o" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/basic_io_arm.cpp.o" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/utility/croutine.c.o" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/utility/event_groups.c.o" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/utility/heap_3.c.o" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/utility/list.c.o" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/utility/port.c.o" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/utility/queue.c.o" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/utility/tasks.c.o" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/utility/timers.c.o" "/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/core/core.a" "-L/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264" -larm_cortexM4l_math -lm
/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/core/core.a(EventResponder.cpp.o): In function `pendablesrvreq_isr':
/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/EventResponder.cpp:86: multiple definition of `pendablesrvreq_isr'
/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/utility/port.c.o:/Users/xxxxxxxxx/Documents/Arduino/libraries/FreeRTOS_ARM/src/utility/port.c:469: first defined here
/Applications/Arduino.app/Contents/Java/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
/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/core/core.a(EventResponder.cpp.o): In function `EventResponder::triggerEventNotImmediate()':
/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/EventResponder.cpp:45: multiple definition of `systick_isr'
/var/folders/0p/861x6w911d32vmxzcgxm8wpm0000gn/T/arduino_build_335264/libraries/FreeRTOS_ARM/utility/port.c.o:/Users/xxxxxxxxx/Documents/Arduino/libraries/FreeRTOS_ARM/src/utility/port.c:291: first defined here
collect2: error: ld returned 1 exit status
Using library FreeRTOS_ARM at version 2015.11.12 in folder: /Users/xxxxxxxxx/Documents/Arduino/libraries/FreeRTOS_ARM 

Compile error with MKR1000 board

I'm getting a compile error when using this lib with MKR1000 board. Any idea how to fix?

[Sun Jul 24 23:45:18 2016] Processing mkr1000USB (extra_script: extra.py, platform: atmelsam, lib_install: 299, board: mkr1000USB, framework: arduino)

--------------------------------------------------------------------------------
arm-none-eabi-gcc -o .pioenvs/mkr1000USB/FreeRTOS_ARM_ID324/utility/port.o -c -std=gnu11 -g -Os -ffunction-sections -fdata-sections -Wall -mthumb -mcpu=cortex-m0plus -no
stdlib --param max-inline-insns-single=500 -MMD -DF_CPU=48000000L -DUSBCON -DPLATFORMIO=021101 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x23
41 -DUSB_PID=0x804E "-DUSB_PRODUCT=\"Arduino MKR1000\"" -DUSB_MANUFACTURER=\"Arduino\" -DARDUINO=10608 -I.pioenvs/mkr1000USB/FrameworkArduino -I.pioenvs/mkr1000USB/Frame

workCMSISInc -I.pioenvs/mkr1000USB/FrameworkLibSam -I.pioenvs/mkr1000USB/FrameworkLibSam/include -I.pioenvs/mkr1000USB/FrameworkDeviceInc -I.pioenvs/mkr1000USB/Framework
DeviceInc/d21g18a/include -I.pioenvs/mkr1000USB/FrameworkArduinoVariant -I.pioenvs/mkr1000USB/FreeRTOS_ARM_ID324 -I.pioenvs/mkr1000USB/FreeRTOS_ARM_ID324/utility -I.pioe
nvs/mkr1000USB/SPI -I.pioenvs/mkr1000USB/WiFi101_ID299 .pioenvs/mkr1000USB/FreeRTOS_ARM_ID324/utility/port.c
arm-none-eabi-gcc -o .pioenvs/mkr1000USB/FreeRTOS_ARM_ID324/utility/tasks.o -c -std=gnu11 -g -Os -ffunction-sections -fdata-sections -Wall -mthumb -mcpu=cortex-m0plus -n
ostdlib --param max-inline-insns-single=500 -MMD -DF_CPU=48000000L -DUSBCON -DPLATFORMIO=021101 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x2
341 -DUSB_PID=0x804E "-DUSB_PRODUCT=\"Arduino MKR1000\"" -DUSB_MANUFACTURER=\"Arduino\" -DARDUINO=10608 -I.pioenvs/mkr1000USB/FrameworkArduino -I.pioenvs/mkr1000USB/Fram
eworkCMSISInc -I.pioenvs/mkr1000USB/FrameworkLibSam -I.pioenvs/mkr1000USB/FrameworkLibSam/include -I.pioenvs/mkr1000USB/FrameworkDeviceInc -I.pioenvs/mkr1000USB/Framewor
kDeviceInc/d21g18a/include -I.pioenvs/mkr1000USB/FrameworkArduinoVariant -I.pioenvs/mkr1000USB/FreeRTOS_ARM_ID324 -I.pioenvs/mkr1000USB/FreeRTOS_ARM_ID324/utility -I.pio
envs/mkr1000USB/SPI -I.pioenvs/mkr1000USB/WiFi101_ID299 .pioenvs/mkr1000USB/FreeRTOS_ARM_ID324/utility/tasks.c
/tmp/cc5RJsGA.s: Assembler messages:
/tmp/cc5RJsGA.s:113: Error: lo register required -- `ldmia r0!,{r4-r11}'
/tmp/cc5RJsGA.s:118: Error: unshifted register required -- `orr r14,#0xd'
/tmp/cc5RJsGA.s:399: Error: selected processor does not support Thumb mode `stmdb r0!,{r4-r11}'
/tmp/cc5RJsGA.s:402: Error: selected processor does not support Thumb mode `stmdb sp!,{r3,r14}'
/tmp/cc5RJsGA.s:408: Error: lo register required -- `ldmia sp!,{r3,r14}'
/tmp/cc5RJsGA.s:412: Error: lo register required -- `ldmia r0!,{r4-r11}'
/tmp/ccClL1dD.s: Assembler messages:
/tmp/ccClL1dD.s:2330: Error: selected processor does not support Thumb mode `clz r5,r5'
scons: *** [.pioenvs/mkr1000USB/FreeRTOS_ARM_ID324/utility/port.o] Error 1
scons: *** [.pioenvs/mkr1000USB/FreeRTOS_ARM_ID324/utility/tasks.o] Error 1

Update to FreeRTOS 8.2

Hello,

Thanks for your work on this port!
I wonder, do you have any plans to update it to FreeRTOS 8.2 (Task Notifications)?

Regards,
Gunter

Serial.readString() returns empty String

Hi,

I used Serial.readString() method to receive string message from string monitor.
but it returns empty string.

#include "Arduino.h"
#include "FreeRTOS_AVR.h"

void setup()
{
	Serial.begin(9600);
	xTaskCreate(vTaskSerial,  NULL, configMINIMAL_STACK_SIZE, NULL, 2, NULL);
	vTaskStartScheduler();

	while(1);
}

void vTaskSerial(void *pvParameters) {

	while(1) {
		if(Serial.available() > 0) {
			Serial.println("Serial is available");
			String msg = Serial.readString();
			Serial.println(msg);
			Serial.println("Message printing ends");
		}

		vTaskDelay(100 / portTICK_PERIOD_MS);
	}
}

void loop() {

}
>>Send to COM3: "hello"<<
Serial is available
 
Message printing ends 

ATTiny1634 support.

Hello. When trying to compile the program for the ATTiny1634 processor, I get the following error:

Building file: /home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/croutine.c
Starting C compile
"/home/denis/opt/eclipse//arduinoPlugin/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -Wall -Wextra -std=gnu11 -ffunction-sections -fdata-sections -mmcu=attiny1634 -DF_CPU=8000000L -DARDUINO=10802 -DARDUINO_AVR_ATTINY1634_OPTIBOOT -DARDUINO_ARCH_AVR   -I"/home/denis/opt/eclipse/arduinoPlugin/packages/ATTinyCore/hardware/avr/1.1.5/cores/tinymodern" -I"/home/denis/opt/eclipse/arduinoPlugin/libraries/ShiftRegister74HC595/1.1.0" -I"/home/denis/opt/eclipse/arduinoPlugin/libraries/ShiftRegister74HC595/1.1.0/src" -I"/home/denis/opt/eclipse/arduinoPlugin/packages/ATTinyCore/hardware/avr/1.1.5/libraries/EEPROM" -I"/home/denis/Arduino/libraries/Polymorphic_Buttons" -I"/home/denis/Arduino/libraries/Audio" -I"/home/denis/Arduino/libraries/Audio/src" -I"/home/denis/Arduino/libraries/FreeRTOS_AVR" -I"/home/denis/Arduino/libraries/FreeRTOS_AVR/src" -MMD -MP -MF"libraries/FreeRTOS_AVR/src/utility/croutine.c.d" -MT"libraries/FreeRTOS_AVR/src/utility/croutine.c.o" -D__IN_ECLIPSE__=1 "/home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/croutine.c"  -o  "libraries/FreeRTOS_AVR/src/utility/croutine.c.o"
Finished building: /home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/croutine.c
 
Building file: /home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/event_groups.c
Starting C compile
"/home/denis/opt/eclipse//arduinoPlugin/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -Wall -Wextra -std=gnu11 -ffunction-sections -fdata-sections -mmcu=attiny1634 -DF_CPU=8000000L -DARDUINO=10802 -DARDUINO_AVR_ATTINY1634_OPTIBOOT -DARDUINO_ARCH_AVR   -I"/home/denis/opt/eclipse/arduinoPlugin/packages/ATTinyCore/hardware/avr/1.1.5/cores/tinymodern" -I"/home/denis/opt/eclipse/arduinoPlugin/libraries/ShiftRegister74HC595/1.1.0" -I"/home/denis/opt/eclipse/arduinoPlugin/libraries/ShiftRegister74HC595/1.1.0/src" -I"/home/denis/opt/eclipse/arduinoPlugin/packages/ATTinyCore/hardware/avr/1.1.5/libraries/EEPROM" -I"/home/denis/Arduino/libraries/Polymorphic_Buttons" -I"/home/denis/Arduino/libraries/Audio" -I"/home/denis/Arduino/libraries/Audio/src" -I"/home/denis/Arduino/libraries/FreeRTOS_AVR" -I"/home/denis/Arduino/libraries/FreeRTOS_AVR/src" -MMD -MP -MF"libraries/FreeRTOS_AVR/src/utility/event_groups.c.d" -MT"libraries/FreeRTOS_AVR/src/utility/event_groups.c.o" -D__IN_ECLIPSE__=1 "/home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/event_groups.c"  -o  "libraries/FreeRTOS_AVR/src/utility/event_groups.c.o"
Finished building: /home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/event_groups.c
 
Building file: /home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/heap_3.c
Starting C compile
"/home/denis/opt/eclipse//arduinoPlugin/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -Wall -Wextra -std=gnu11 -ffunction-sections -fdata-sections -mmcu=attiny1634 -DF_CPU=8000000L -DARDUINO=10802 -DARDUINO_AVR_ATTINY1634_OPTIBOOT -DARDUINO_ARCH_AVR   -I"/home/denis/opt/eclipse/arduinoPlugin/packages/ATTinyCore/hardware/avr/1.1.5/cores/tinymodern" -I"/home/denis/opt/eclipse/arduinoPlugin/libraries/ShiftRegister74HC595/1.1.0" -I"/home/denis/opt/eclipse/arduinoPlugin/libraries/ShiftRegister74HC595/1.1.0/src" -I"/home/denis/opt/eclipse/arduinoPlugin/packages/ATTinyCore/hardware/avr/1.1.5/libraries/EEPROM" -I"/home/denis/Arduino/libraries/Polymorphic_Buttons" -I"/home/denis/Arduino/libraries/Audio" -I"/home/denis/Arduino/libraries/Audio/src" -I"/home/denis/Arduino/libraries/FreeRTOS_AVR" -I"/home/denis/Arduino/libraries/FreeRTOS_AVR/src" -MMD -MP -MF"libraries/FreeRTOS_AVR/src/utility/heap_3.c.d" -MT"libraries/FreeRTOS_AVR/src/utility/heap_3.c.o" -D__IN_ECLIPSE__=1 "/home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/heap_3.c"  -o  "libraries/FreeRTOS_AVR/src/utility/heap_3.c.o"
Finished building: /home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/heap_3.c
 
Building file: /home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/list.c
Starting C compile
"/home/denis/opt/eclipse//arduinoPlugin/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -Wall -Wextra -std=gnu11 -ffunction-sections -fdata-sections -mmcu=attiny1634 -DF_CPU=8000000L -DARDUINO=10802 -DARDUINO_AVR_ATTINY1634_OPTIBOOT -DARDUINO_ARCH_AVR   -I"/home/denis/opt/eclipse/arduinoPlugin/packages/ATTinyCore/hardware/avr/1.1.5/cores/tinymodern" -I"/home/denis/opt/eclipse/arduinoPlugin/libraries/ShiftRegister74HC595/1.1.0" -I"/home/denis/opt/eclipse/arduinoPlugin/libraries/ShiftRegister74HC595/1.1.0/src" -I"/home/denis/opt/eclipse/arduinoPlugin/packages/ATTinyCore/hardware/avr/1.1.5/libraries/EEPROM" -I"/home/denis/Arduino/libraries/Polymorphic_Buttons" -I"/home/denis/Arduino/libraries/Audio" -I"/home/denis/Arduino/libraries/Audio/src" -I"/home/denis/Arduino/libraries/FreeRTOS_AVR" -I"/home/denis/Arduino/libraries/FreeRTOS_AVR/src" -MMD -MP -MF"libraries/FreeRTOS_AVR/src/utility/list.c.d" -MT"libraries/FreeRTOS_AVR/src/utility/list.c.o" -D__IN_ECLIPSE__=1 "/home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/list.c"  -o  "libraries/FreeRTOS_AVR/src/utility/list.c.o"
Finished building: /home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/list.c
 
Building file: /home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/port.c
Starting C compile
"/home/denis/opt/eclipse//arduinoPlugin/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc" -c -g -Os -Wall -Wextra -std=gnu11 -ffunction-sections -fdata-sections -mmcu=attiny1634 -DF_CPU=8000000L -DARDUINO=10802 -DARDUINO_AVR_ATTINY1634_OPTIBOOT -DARDUINO_ARCH_AVR   -I"/home/denis/opt/eclipse/arduinoPlugin/packages/ATTinyCore/hardware/avr/1.1.5/cores/tinymodern" -I"/home/denis/opt/eclipse/arduinoPlugin/libraries/ShiftRegister74HC595/1.1.0" -I"/home/denis/opt/eclipse/arduinoPlugin/libraries/ShiftRegister74HC595/1.1.0/src" -I"/home/denis/opt/eclipse/arduinoPlugin/packages/ATTinyCore/hardware/avr/1.1.5/libraries/EEPROM" -I"/home/denis/Arduino/libraries/Polymorphic_Buttons" -I"/home/denis/Arduino/libraries/Audio" -I"/home/denis/Arduino/libraries/Audio/src" -I"/home/denis/Arduino/libraries/FreeRTOS_AVR" -I"/home/denis/Arduino/libraries/FreeRTOS_AVR/src" -MMD -MP -MF"libraries/FreeRTOS_AVR/src/utility/port.c.d" -MT"libraries/FreeRTOS_AVR/src/utility/port.c.o" -D__IN_ECLIPSE__=1 "/home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/port.c"  -o  "libraries/FreeRTOS_AVR/src/utility/port.c.o"
/home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/port.c: In function 'prvSetupTimerInterrupt':
/home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/port.c:530:3: error: 'TIMSK0' undeclared (first use in this function)
   TIMSK0  |= (1 << OCIE0A);
   ^
/home/denis/Arduino/libraries/FreeRTOS_AVR/src/utility/port.c:530:3: note: each undeclared identifier is reported only once for each function it appears in
make: *** [libraries/FreeRTOS_AVR/src/utility/port.c.o] Error 1

Serial.read in task

Hi, I am a newbie and I fell confused about How to read serial data in the task correctly.

String msgData = "";
SoftwareSerial wifiSerial(10, 11);
static void vMessageTask(void* arg) {
    while (1) {
        while(wifiSerial.available() > 0) {
            msgData += char(wifiSerial.read());
            Serial.print(char(wifiSerial.read())); // five character, eg. H e l l o
            vTaskDelay(2L * configTICK_RATE_HZ / 1000L);
        }
        // if message received
        if (msgData.length() > 0) {
            Serial.println(msgData);   // only one character, eg. H
            // clear msgData
            msgData = "";
        }
    }
}

Could you help me, please? Thx very much.

Timer not working

Thanks for this port of FreeRTOs to Arduino.
I've been working with the examples and so far it works great.

I've been having some trouble working with timers.
I'm trying to upload this code to a MEGA2560 using arduino IDE 1.6.5:

#include <FreeRTOS_AVR.h>
#include <basic_io_avr.h>
#include "utility/timers.h"

TimerHandle_t timer1;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  int x=1;
  //xTimerCreate();
  timer1 = xTimerCreate("timer1", 500, pdFALSE, (void*)x, timer1_callback);
  Serial.print("Before execution: ");
  Serial.println(millis());

  xTimerStart(timer1, 0);
  vTaskStartScheduler();
  for( ;; );
}

void loop() {}

void timer1_callback( TimerHandle_t pxTimer){
  Serial.println("Ready !");
}

But it doesn't compile:

timer_test.cpp.o: In function `setup':
/opt/arduino/timer_test.ino:12: undefined reference to `xTimerCreate'
/opt/arduino/timer_test.ino:16: undefined reference to `xTimerGenericCommand'
collect2: error: ld returned 1 exit status
Error compiling.

Seems to be a problem of the compiler not recognizing those functions.

Any ideas,
Thanks

Float not working with FreeRTOS_ARM

I have been trying to use a float variable in the code and then it doesn't compile with a Teensy 3.5, everything else works.

For example on the frBlinkPrint.ino, if I only create a float variable and try to Serial.print it, the code doesn't write.

Any idea of why?

Thanks

Can the tick rate be adjusted?

I tried playing with this value, but it seems that if I set it to for instance 500, then it will actually double the speed.

#define configTICK_RATE_HZ ( ( TickType_t ) (F_CPU/16384L))

Supported processors

Hello. Could you provide a list of supported machines? You may need to add it to the "README" file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.