Задать вопрос
Nikiti4
@Nikiti4

Не компилируется прошивка для микроконтроллера, haikuVM. В чем проблема?

Пытаюсь скомпилировать пример из туториала.

import static haiku.avr.AVRConstants.*;  
public class BlinkSimple {  
    private static final int LED = 1 << 5;  
  
    private static void delay(int nounit) {  
        while(nounit>0) {  
            nounit--;  
        }  
    }  
  
    public static void main(String[] args) {  
        // Data direction of I/O-Port.  
        DDRB = LED;  
        while (true) {  
            PORTB |= LED; // on  
            delay(3000);  
            PORTB &= ~LED; // off  
            delay(30000);  
        }  
    }  
}


Потом запускаю haiku:
./haiku -v --Config avr -o BlinkSimple.hex /home/nikita/haikuVM/myCProject/BlinkSimple.java


А он мне целую простыню выдает и в конце ошибка.

Looking for 'HaikuVM.properties' in path: '/home/nikita/haikuVM/bin';'/home/nikita/haikuVM/config'
Loaded from '/home/nikita/haikuVM/config/HaikuVM.properties'

$Version 1.4.1 $ $Id: HaikuVM.java 729 2015-12-27 00:27:50Z genom2 $

/home/nikita/haikuVM/bin/../bin/haikuc /home/nikita/haikuVM/myCProject/BlinkSimple.java 
#
#
#
#############################################################
# generating class files
#############################################################
"javac" -source 1.6 -bootclasspath "/home/nikita/haikuVM/bin/../bin/../lib/nxt/classes.jar" -extdirs "" -classpath ':/home/nikita/haikuVM/bin/../bin/../haikuRT/src/main/java:/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java:/home/nikita/haikuVM/bin/../bin/../examples/src/main/java:/home/nikita/haikuVM/bin/../bin/../haikuBench/src/main/java:/home/nikita/haikuVM/bin/../bin/../gallerie/src/main/java:/home/nikita/haikuVM/bin/../bin/../incubator/src/main/java' -d '/tmp/haikuvm' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/vm/MicroKernel.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/pc/lib/HaikuMicroKernel.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/rcx/HaikuMicroKernel4JUnits.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/rcx/HaikuMicroKernel.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/rcx/retro/HaikuMicroKernel.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/avr/lib/arduino/HaikuMicroKernel4ArduinoIDEWithMain.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/avr/lib/arduino/HaikuMicroKernel4ArduinoIDE.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/avr/lib/arduino/HaikuMicroKernelProcessing.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/avr/lib/arduino/HaikuMicroKernelEx.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/avr/lib/arduino/HaikuMicroKernel4TinyArduinoIDE.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/avr/lib/arduino/HaikuMicroKernel.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/avr/lib/arduino/HaikuMicroKernelLib.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/avr/lib/asuro/nanovm/HaikuMicroKernel.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/avr/lib/asuro/lib2_8_0_rc1/HaikuMicroKernelEx.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/avr/lib/asuro/lib2_8_0_rc1/HaikuMicroKernel.java' '/home/nikita/haikuVM/bin/../bin/../bootstrap/src/main/java/haiku/avr/lib/simple010/HaikuMicroKernel.java'  '/home/nikita/haikuVM/myCProject/BlinkSimple.java'
Done with generating class file(s)
/home/nikita/haikuVM/bin/../bin/haikulink -v --Config avr -o BlinkSimple.hex 

.... <b>тут не поместилось все</b>

#
#
#############################################################
# cross compiling
#############################################################
#
#
#
Building file: ../../HaikuVM/utility/haikuConfig.c
Invoking: C Compiler
avr-gcc   -c -Wall -Os -fno-builtin -fomit-frame-pointer -fno-exceptions -fshort-enums -std=gnu99 -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -mmcu=atmega8 -DNEW_FOR_AVRGCC -DF_CPU=8000000UL -I'/home/nikita/haikuVM/bin/.' -I'../../HaikuVM' -I'../../HaikuVM/utility' -o'HaikuVM/utility/haikuConfig.o' '../../HaikuVM/utility/haikuConfig.c'
In file included from ../../HaikuVM/utility/haikuConfig.h:1:0,
                 from ../../HaikuVM/utility/haikuConfig.c:1:
../../HaikuVM/haikuJ2C.h:5:19: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
                   ^
compilation terminated.
make: *** [HaikuVM/utility/haikuConfig.o] Error 1
subdir.mk:31: recipe for target 'HaikuVM/utility/haikuConfig.o' failed
#############################################################
# error while cross compiling
#############################################################
java.lang.Exception: Script '/home/nikita/haikuVM/bin/../bin/haikulink' exited with errorcode=2
	at haikuvm.pc.tools.HaikuVM.executeBlocking(HaikuVM.java:593)
	at haikuvm.pc.tools.HaikuVM.call(HaikuVM.java:229)
	at haikuvm.pc.tools.HaikuVM.haikulink0(HaikuVM.java:217)
	at haikuvm.pc.tools.HaikuVM.haiku0(HaikuVM.java:153)
	at haikuvm.pc.tools.HaikuVM.main(HaikuVM.java:104)


Подскажите, пожалуйста, что делать и куда копать
  • Вопрос задан
  • 162 просмотра
Подписаться 1 Оценить Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы