Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tasking with AVR-Ada

I'm trying to implement tasking features using AVR-Ada, but when I run make, I get these error messages:

C:\avr_test>make
avr-gcc.exe (GCC) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ADA_PROJECT_PATH= avr-gnatmake -XMCU=atmega8 -p -Pbuild.gpr  -XAVRADA_MAIN=led_on avr-gcc -c --RTS=rts/avr4 -gnatec=C:\avr-ada\lib\gnat\gnat.adc -gdwarf-2 -gnatwp -gnatwu gnatn -gnatp -gnatVn -Os -gnatef -fverbose-asm -frename-registers -mmcu=atmega8 gnateDMCU=atmega8 -fdata-sections -ffunction-sections -I- -gnatA C:\avr_test\led_on.adb
c:\avr_test\led_on.adb:3:06: warning: unit "task_bla" is not referenced
c:\avr_test\task_bla.ads:3:04: construct not allowed in configurable run-time mode
c:\avr_test\task_bla.ads:3:04: violation of restriction "no_tasking" at C:\avr-ada\lib    \gnat\gnat.adc:124
avr-gnatmake: "c:\avr_test\led_on.adb" compilation error
make: ** [led_on.elf] Erro 4

So, what can I do to enable the tasking features?

My package has just very simple test task: (I just wanted to check the task feature)

-- led_on.adb
with AVR; use AVR;
with AVR.MCU;
with task_bla;
procedure LED_On is
 LED : Boolean renames MCU.PortB_Bits (3);
begin
 MCU.DDRB_Bits := (others => DD_Output);
 LED := Low;
end LED_On;

-- task_bla.ads
package task_bla is
 task test;
end task_bla;

-- task_bla.adb
package task_bla is
 task body test is
  loop
   null;
  end loop;
 end test;
end task_bla;
like image 543
Rego Avatar asked Jan 19 '23 10:01

Rego


1 Answers

You would have to implement Tasking for the Runtime System of AVR-Ada.

I don't think the hardware supports tasking well, so this might be quite difficult.

like image 187
Rommudoh Avatar answered Feb 03 '23 23:02

Rommudoh