Go Down

Topic: UECIDE: A New Fork of the IDE (Read 57 times) previous topic - next topic

pito

#450
Aug 19, 2013, 10:23 pm Last Edit: Aug 19, 2013, 10:35 pm by pito Reason: 1
This does not build on 0.7.3a

Code: [Select]
..
#include <TwiMaster.h>   // NilRtos lib
#include <Rtc_Pcf8563.h>
Rtc_Pcf8563 rtc;
..


Code: [Select]
D:\ProgramFiles\arduino\uecide73\hardware\cache\arduino\mighty1284p\libRtc_Pcf8563.a(Rtc_Pcf8563.o): In function `Rtc_Pcf8563::getTime()':
C:\MyCode\Arduino\libraries\Rtc_Pcf8563/Rtc_Pcf8563.cpp:333: undefined reference to `Wire'
C:\MyCode\Arduino\libraries\Rtc_Pcf8563/Rtc_Pcf8563.cpp:333: undefined reference to `Wire'
.....


Works fine on 1.5.2

majenko

TwiMaster is yet another badly formatted library.

It has no TwiMaster.cpp file, nor a TwiMaster.c file.  As such it isn't recognised as a legitimate library, and is just treated as a lone header file.

Yes, the .cpp files are compiled into the library .a file, but the sketch isn't linked against it as it doesn't think it's a real library.

Creating an empty TwiMaster.cpp file in the library makes it work.
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

pito

Nope, I can see now -lTwiMaster there

Code: [Select]
-LD:\ProgramFiles\arduino\uecide73\hardware\cache\arduino\mighty1284p -lTime -lNilTimer1 -lTwiMaster -lRtc_Pcf8563 -lNilAnalog -lNilRTOS -lcore -lm
D:\ProgramFiles\arduino\uecide73\hardware\cache\arduino\mighty1284p\libRtc_Pcf8563.a(Rtc_Pcf8563.o): In function `Rtc_Pcf8563::getTime()':
C:\MyCode\Arduino\libraries\Rtc_Pcf8563/Rtc_Pcf8563.cpp:333: undefined reference to `Wire'
C:\MyCode\Arduino\libraries\Rtc_Pcf8563/Rtc_Pcf8563.cpp:333: undefined reference to `Wire'

majenko

Can you point me to (or attach) the actual sketch and any extra libraries needed?
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

pito

#454
Aug 19, 2013, 10:56 pm Last Edit: Aug 19, 2013, 11:51 pm by pito Reason: 1
Enclosed the demo, compiles fine in 152 (mighty1284p board)
Code: [Select]
c:\MyCode\Arduino\ABuild/nilBlink_CLI2majen.cpp.elf c:\MyCode\Arduino\ABuild/nilBlink_CLI2majen.cpp.hex
Binary sketch size: 6,388 bytes (of a 130,048 byte maximum) - 4% used

majenko

Right, this appears to be the order in which the libraries are specified for linking.

Doesn't work: -lTime -lTwiMaster -lRtc_Pcf8563 -lNilRTOS -lcore -lm
Works: -lTime -lRtc_Pcf8563 -lTwiMaster -lNilRTOS -lcore -lm

Now... How can I get that order right...

I think at the moment it's in the order of the #include entries... maybe if I get that to reverse itself...?
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

majenko

Ok, I've got this sussed now.

I have re-written the library detection routine so it finds the library without the LibName.{c|cpp} file.

I have adjusted the compiler so it wraps the library list in -Wl,--start-group and -Wl,--end-group, so it no longer cares about the order.  Linking may take a moment or two longer as it does multiple passes through the libraries, but it now works.

Just compiling and uploading... check for the new version in a bit, and upgrade the avr-gcc compiler as well.
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

pito


majenko

This is the problem with a completely new style of compiling - what worked before with the old cludgy system (the system that did it all very wrong) doesn't always work now.  Still, these little bugs all serve to make the whole system better and more flexible.
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

pito

The upload works better now with the latest uecide, even I see an error message there:
Code: [Select]
Error grabbing serial port: uecide.plugin.AutoFormat.releasePort(java.lang.String)
Avrdude finds it and uploads..

majenko


The upload works better now with the latest uecide, even I see an error message there:
Code: [Select]
Error grabbing serial port: uecide.plugin.AutoFormat.releasePort(java.lang.String)
Avrdude finds it and uploads..

Yeah, you can ignore that error.  It's basically because the AutoFormat plugin doesn't have a releasePort function (since it doesn't do anything with serial ports).  I just need to catch that special case in the exception at some point.
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

pito

1. sometimes I have to restart uecide as it cannot find the com for upload..  :~
2. how can I save a new .h file with uecide?  ;)

majenko


1. sometimes I have to restart uecide as it cannot find the com for upload..  :~
2. how can I save a new .h file with uecide?  ;)

1. That's bluetooth for you.  I contacted the author of RXTX about it, and he admitted that he had only played briefly with Bluetooth, and had moderate success:
Quote from: Trent Jarvi

rxtx does a timed out read to test if a device is actually there.  I too messed with rxtx and bluetooth.  Some devices work well.  Some don't.

2. The whole file creation system needs a rewrite.  It's on my todo.  It's coupled in with the removal of that ghastly status wedge in the middle of the window.
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

pito

BT: it seems to me it has something to do with uecide. Something locks inside so I have to restart it. Frankly, never seen that with 1.5.2 IDE (or when then it was a few times in total)..

majenko


BT: it seems to me it has something to do with uecide. Something locks inside so I have to restart it. Frankly, never seen that with 1.5.2 IDE (or when then it was a few times in total)..

Yes, but 1.5.2 has a very very simplistic approach to serial.  There is only ever one serial port in existance at a time, and only one part of the code ever tries to do anything with it.  With the advent of plugins, and multiple concurrent serial ports I think we are seeing more and more failures in RXTX when working with Bluetooth.

I will try and see about adding more debugging to try and see what is actually happening with serial and bluetooth.
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Go Up