Code:
whiteapple:arduino jan$ /Users/jan/haikuVM/bin/haikulink -v --Config arduino -o BlinkWithThread.hex /Users/jan/haikuVM/examples/src/main/java/arduino/tutorial/BlinkWithThread
#
#
#
#############################################################
# generating c files
#############################################################
included; haiku.avr.lib.arduino.HaikuMicroKernelEx.main([Ljava/lang/String;)V
included: haiku.avr.lib.arduino.ArduinoLib.init()V
included: haiku.avr.AVRDefines.sei()V
included# haiku.avr.AVRDefines.<clinit>()V
included: haiku.avr.AVRDefines._BV(I)I
included: haiku.vm.MicroKernel.clinitHaikuMagic()V
included: haiku.avr.lib.arduino.HaikuMicroKernelEx.init()V
included: arduino.tutorial.BlinkWithThread.main([Ljava/lang/String;)V
included: haiku.avr.lib.arduino.WProgram.pinMode(BB)V
included: arduino.tutorial.BlinkWithThread.<init>()V
virtual : start()V
included# arduino.tutorial.BlinkWithThread.<clinit>()V
included# java.lang.Thread.start()V
included: java.lang.Thread.fork()I
virtual : run()V
virtual : stop()V
included# java.lang.Thread.run()V
included# java.lang.Thread.stop()V
included: java.lang.Thread.setStateAndSwitch(I)I
virtual : toString()Ljava/lang/String;
included# java.lang.Throwable.toString()Ljava/lang/String;
virtual : println(Ljava/lang/String;)V
included# java.io.PrintStream.println(Ljava/lang/String;)V
virtual : print(Ljava/lang/String;)V
virtual : print(C)V
included# java.io.PrintStream.print(C)V
virtual : write(I)V
included: java.lang.Thread.currentThread()Ljava/lang/Thread;
included# java.lang.String.toString()Ljava/lang/String;
#### rescan because new virtuals where found
included: haiku.avr.lib.arduino.HaikuMicroKernelEx$1.<init>()V
included: java.io.OutputStream.<init>()V
included# haiku.avr.lib.arduino.HaikuMicroKernelEx$1.write(I)V
included: java.io.PrintStream.<init>(Ljava/io/OutputStream;)V
included: haiku.avr.lib.arduino.HaikuMicroKernelEx$2.<init>()V
included: java.io.InputStream.<init>()V
included: java.lang.Object.<init>()V
included# java.lang.Object.toString()Ljava/lang/String;
included: java.lang.System.identityHashCode(Ljava/lang/Object;)I
included: java.lang.System.getDataAddress(Ljava/lang/Object;)I
included: java.lang.StringBuilder.<init>(Ljava/lang/String;)V
included: java.lang.StringBuilder.<init>()V
virtual : append(Ljava/lang/String;)Ljava/lang/StringBuilder;
included# java.lang.StringBuilder.toString()Ljava/lang/String;
included: java.lang.String.<init>([C)V
included# java.lang.StringBuilder.append(Ljava/lang/String;)Ljava/lang/StringBuilder;
virtual : append(I)Ljava/lang/StringBuilder;
included: java.lang.Thread.<init>()V
included# arduino.tutorial.BlinkWithThread.run()V
included: haiku.avr.lib.arduino.WProgram.digitalWrite(BB)V
included: haiku.avr.lib.arduino.WProgram.delay(J)V
included: java.lang.Thread.nap(J)V
included: java.lang.System.currentTimeMillis()J
included# java.io.PrintStream.print(Ljava/lang/String;)V
virtual : charAt(I)C
virtual : length()I
included# java.lang.String.length()I
included# java.lang.String.charAt(I)C
#### rescan because new virtuals where found
included# java.lang.StringBuilder.append(I)Ljava/lang/StringBuilder;
included: java.lang.String.valueOf(I)Ljava/lang/String;
#### rescan because new virtuals where found
included: java.lang.String.valueOf(C)Ljava/lang/String;
#### rescan because new virtuals where found
included: java.lang.String.<init>(C)V
#### rescan because new virtuals where found
#################### closure complete!
Effective configuration for 'arduino':
Target = atmega328p
MemorySize = 1540
InitialMainThreadStackSize = 142
InitialOtherThreadStackSize = 45
Mode = HAIKU_16_32
Char = HAIKU_CHAR_8
InternalExceptionEnable = NullPointerException | NoSuchMethodError | OutOfMemoryError | ClassCastException | VirtualMachineError
InternalExceptionThrow = 0
Threads = 1
Extension = hex
Clock = 16000000
APP_NAME = BlinkWithThread
VM_BASE = ../../haikuVM
APP_BASE = /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/.
CC_OPT = $(HAIKU_CFLAGS) -Wall -Os -fpack-struct -fshort-enums -std=gnu99 -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -mmcu=$(HAIKU_TARGET) -DF_CPU=$(HAIKU_CLOCK)UL -MMD -MP
Upload = avrdude -pm328p -cstk500v1 -P$(HAIKU_PORT) -b115200 -F -Uflash:w:$(HAIKU_OUTPUT):a
MicroKernel = haiku.avr.lib.arduino.HaikuMicroKernelEx
Config = arduino
IncrementalGCSlice = 10
Extends = AVR
GC = HAIKU_StopTheWorldGC
Output = BlinkWithThread.hex
CFLAGS =
Port = /dev/tty.usbmodem1d171
CLIBS =
HAIKUVM4C = ./haikuVM
LDFLAGS =
link > haiku/avr/lib/arduino/HaikuMicroKernelEx from /Users/jan/haikuVM/bin/../lib/haikuvm/bootstrap.jar
getProperty('InvokeShort')returned null
const class_t haiku_avr_lib_arduino_HaikuMicroKernelEx__class PROGMEM = {
& haiku_vm_MicroKernel__class,
sizeof(haiku_avr_lib_arduino_HaikuMicroKernelEx),
0,
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/haiku/avr/lib/arduino/HaikuMicroKernelEx.c
link > haiku/vm/MicroKernel from /Users/jan/haikuVM/bin/../lib/haikuvm/bootstrap.jar
const class_t haiku_vm_MicroKernel__class PROGMEM = {
& java_lang_Object__class,
sizeof(haiku_vm_MicroKernel),
0,
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/haiku/vm/MicroKernel.c
link > java/lang/Object from /Users/jan/haikuVM/bin/../lib/haikuvm/haikuRT.jar
const class_t java_lang_Object__class PROGMEM = {
NULL,
sizeof(java_lang_Object),
1,
{
{MSG_toString___Ljava_lang_String, (ByteCode *)(&java_lang_Object_toString_Ljava_lang_String)},
}
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/lang/Object.c
link > java/lang/System from /Users/jan/haikuVM/bin/../lib/haikuvm/haikuRT.jar
const class_t java_lang_System__class PROGMEM = {
& java_lang_Object__class,
sizeof(java_lang_System),
0,
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/lang/System.c
link > java/io/PrintStream from /Users/jan/haikuVM/bin/../lib/haikuvm/haikuRT.jar
const class_t java_io_PrintStream__class PROGMEM = {
& java_lang_Object__class,
sizeof(java_io_PrintStream),
3,
{
{MSG_print__C_V, (ByteCode *)(&java_io_PrintStream_print_CV)},
{MSG_print__Ljava_lang_String__V, (ByteCode *)(&java_io_PrintStream_print_Ljava_lang_String_V)},
{MSG_println__Ljava_lang_String__V, (ByteCode *)(&java_io_PrintStream_println_Ljava_lang_String_V)},
}
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/io/PrintStream.c
link > java/lang/String from /Users/jan/haikuVM/bin/../lib/haikuvm/haikuRT.jar
const class_t java_lang_String__class PROGMEM = {
& java_lang_Object__class,
sizeof(java_lang_String),
3,
{
{MSG_charAt__I_C, (ByteCode *)(&java_lang_String_charAt_IC)},
{MSG_length___I, (ByteCode *)(&java_lang_String_length_I)},
{MSG_toString___Ljava_lang_String, (ByteCode *)(&java_lang_String_toString_Ljava_lang_String)},
}
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/lang/String.c
link > java/lang/StringBuilder from /Users/jan/haikuVM/bin/../lib/haikuvm/haikuRT.jar
const class_t java_lang_StringBuilder__class PROGMEM = {
& java_lang_Object__class,
sizeof(java_lang_StringBuilder),
3,
{
{MSG_append__I_Ljava_lang_StringBuilder, (ByteCode *)(&java_lang_StringBuilder_append_ILjava_lang_StringBuilder)},
{MSG_append__Ljava_lang_String__Ljava_lang_StringBuilder, (ByteCode *)(&java_lang_StringBuilder_append_Ljava_lang_String_Ljava_lang_StringBuilder)},
{MSG_toString___Ljava_lang_String, (ByteCode *)(&java_lang_StringBuilder_toString_Ljava_lang_String)},
}
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/lang/StringBuilder.c
link > java/io/OutputStream from /Users/jan/haikuVM/bin/../lib/nxt/classes.jar
const class_t java_io_OutputStream__class PROGMEM = {
& java_lang_Object__class,
sizeof(java_io_OutputStream),
0,
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/io/OutputStream.c
link > java/io/IOException from /Users/jan/haikuVM/bin/../lib/nxt/classes.jar
const class_t java_io_IOException__class PROGMEM = {
& java_lang_Exception__class,
sizeof(java_io_IOException),
0,
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/io/IOException.c
link > java/lang/Exception from /Users/jan/haikuVM/bin/../lib/nxt/classes.jar
const class_t java_lang_Exception__class PROGMEM = {
& java_lang_Throwable__class,
sizeof(java_lang_Exception),
0,
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/lang/Exception.c
link > java/lang/Throwable from /Users/jan/haikuVM/bin/../lib/haikuvm/haikuRT.jar
const class_t java_lang_Throwable__class PROGMEM = {
& java_lang_Object__class,
sizeof(java_lang_Throwable),
1,
{
{MSG_toString___Ljava_lang_String, (ByteCode *)(&java_lang_Throwable_toString_Ljava_lang_String)},
}
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/lang/Throwable.c
PREPROCESSING haikuReleaseLock: java.lang.Thread.haikuReleaseLock(Ljava/lang/Object;)V
link > java/lang/Thread from /Users/jan/haikuVM/bin/../lib/haikuvm/haikuRT.jar
const class_t java_lang_Thread__class PROGMEM = {
& java_lang_Object__class,
sizeof(java_lang_Thread),
3,
{
{MSG_run___V, (ByteCode *)(&java_lang_Thread_run_V)},
{MSG_start___V, (ByteCode *)(&java_lang_Thread_start_V)},
{MSG_stop___V, (ByteCode *)(&java_lang_Thread_stop_V)},
}
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/lang/Thread.c
link > java/lang/Runnable from /Users/jan/haikuVM/bin/../lib/nxt/classes.jar
const class_t java_lang_Runnable__class PROGMEM = {
& java_lang_Object__class,
sizeof(java_lang_Runnable),
0,
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/lang/Runnable.c
link > haiku/avr/lib/arduino/HaikuMicroKernelEx$1 from /Users/jan/haikuVM/bin/../lib/haikuvm/bootstrap.jar
const class_t haiku_avr_lib_arduino_HaikuMicroKernelEx_1__class PROGMEM = {
& java_io_OutputStream__class,
sizeof(haiku_avr_lib_arduino_HaikuMicroKernelEx_1),
1,
{
{MSG_write__I_V, (ByteCode *)(&haiku_avr_lib_arduino_HaikuMicroKernelEx_1_write_IV)},
}
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/haiku/avr/lib/arduino/HaikuMicroKernelEx$1.c
link > haiku/avr/lib/arduino/HaikuMicroKernelEx$2 from /Users/jan/haikuVM/bin/../lib/haikuvm/bootstrap.jar
const class_t haiku_avr_lib_arduino_HaikuMicroKernelEx_2__class PROGMEM = {
& java_io_InputStream__class,
sizeof(haiku_avr_lib_arduino_HaikuMicroKernelEx_2),
0,
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/haiku/avr/lib/arduino/HaikuMicroKernelEx$2.c
link > java/io/InputStream from /Users/jan/haikuVM/bin/../lib/haikuvm/haikuRT.jar
const class_t java_io_InputStream__class PROGMEM = {
& java_lang_Object__class,
sizeof(java_io_InputStream),
0,
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/io/InputStream.c
link > haiku/avr/lib/arduino/ArduinoLib from /Users/jan/haikuVM/bin/../lib/haikuvm/bootstrap.jar
const class_t haiku_avr_lib_arduino_ArduinoLib__class PROGMEM = {
& haiku_avr_AVRDefines__class,
sizeof(haiku_avr_lib_arduino_ArduinoLib),
0,
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/haiku/avr/lib/arduino/ArduinoLib.c
link > haiku/avr/AVRDefines from /Users/jan/haikuVM/bin/../lib/haikuvm/bootstrap.jar
const class_t haiku_avr_AVRDefines__class PROGMEM = {
& java_lang_Object__class,
sizeof(haiku_avr_AVRDefines),
0,
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/haiku/avr/AVRDefines.c
link > arduino/tutorial/BlinkWithThread from /Users/jan/haikuVM/examples/src/main/java//arduino/tutorial/BlinkWithThread.class
const class_t arduino_tutorial_BlinkWithThread__class PROGMEM = {
& java_lang_Thread__class,
sizeof(arduino_tutorial_BlinkWithThread),
1,
{
{MSG_run___V, (ByteCode *)(&arduino_tutorial_BlinkWithThread_run_V)},
}
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/arduino/tutorial/BlinkWithThread.c
link > haiku/avr/lib/arduino/WProgram from /Users/jan/haikuVM/bin/../lib/haikuvm/bootstrap.jar
const class_t haiku_avr_lib_arduino_WProgram__class PROGMEM = {
& haiku_avr_lib_arduino_ArduinoLib__class,
sizeof(haiku_avr_lib_arduino_WProgram),
0,
};
into /Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/haiku/avr/lib/arduino/WProgram.c
#### rescan because new virtuals where found
#################### closure complete!
#### rescan because new virtuals where found
#################### closure complete!
totalMethods= 49
totalBClength= 1050
totalConstLength= 260
totalClassesLength=216
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./bootloaders/atmega
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./bootloaders/atmega8
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./bootloaders/bt
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./bootloaders/caterina
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./bootloaders/lilypad/src
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./bootloaders/optiboot
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./bootloaders/stk500v2
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./cores/arduino
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./firmwares/arduino-usbdfu
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./firmwares/arduino-usbserial
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuC
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/arduino/tutorial
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/haiku/avr/lib/arduino
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/haiku/avr
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/haiku/vm
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/io
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuJava/java/lang
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuVM/native/haiku/vm
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuVM/native/java/lang
/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/./haikuVM
#############################################################
# generated c files
#############################################################
#
#
#
#############################################################
# cross compiling
#############################################################
#
#
#
Building file: ../../bootloaders/atmega/ATmegaBOOT_168.c
Invoking: AVR Compiler
avr-gcc -Wall -Os -fpack-struct -fshort-enums -std=gnu99 -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -I"/Applications/Development/Arduino.app/Contents/Resources/Java/hardware/arduino/." -I"../../haikuVM" -MF"bootloaders/atmega/ATmegaBOOT_168.d" -MT"bootloaders/atmega/ATmegaBOOT_168.d" -c -o"bootloaders/atmega/ATmegaBOOT_168.o" "../../bootloaders/atmega/ATmegaBOOT_168.c"
../../bootloaders/atmega/ATmegaBOOT_168.c: In function 'main':
../../bootloaders/atmega/ATmegaBOOT_168.c:425:12: error: 'NUM_LED_FLASHES' undeclared (first use in this function)
../../bootloaders/atmega/ATmegaBOOT_168.c:425:12: note: each undeclared identifier is reported only once for each function it appears in
../../bootloaders/atmega/ATmegaBOOT_168.c:586:11: error: 'EEWE' undeclared (first use in this function)
../../bootloaders/atmega/ATmegaBOOT_168.c: In function 'getch':
../../bootloaders/atmega/ATmegaBOOT_168.c:975:15: error: 'MAX_TIME_COUNT' undeclared (first use in this function)
make: *** [bootloaders/atmega/ATmegaBOOT_168.o] Error 1
#############################################################
# error while cross compiling
#############################################################
whiteapple:arduino jan$
Ich vermute mal, dass etwas mit "NUM_LED_FLASHES", "EEWE" und "MAX_TIME_COUNT" noch nicht ganz funktioniert.
Lesezeichen