我想使用AVR-ADA實現任務功能,但是當我運行make,我得到這些錯誤消息:與AVR-ADA任務
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
所以,我能做些什麼來使任務特徵?
我的包剛很簡單的測試任務:(我只是想檢查任務功能)
-- 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;
是的,在8位微控制器上執行任務可能會非常棘手。 –