<div dir="ltr">Hi Rick,<div><br></div><div>I've spent a lot of time barking up trees that turned out not to be trees.</div><div><br></div><div style>It is possible that avr-gcc has "moved on," and our use of prog_void is no longer acceptable to the compiler. </div>
<div style><br></div><div style>CFLAGS=-D__PROG_TYPES_COMPAT__ ../configure --prefix=$HOME/local/arduino --with-toolchain=tvm --target=avr<br></div><div style><br></div><div style>seemed to get me through the build, and it then failed at an attempt to compile the POSIX wrapper. (I think this is what it "should" do. That is, we don't block it from attempting to build the POSIX wrapper, and then it fails.)</div>
<div style><br></div><div style>"make install" puts the tools in the right place. </div><div style><br></div><div style>OK, that wasn't right. Or, it may have helped a bit, but it doesn't solve all of my problems. avr-gcc has moved on.</div>
<div style><br></div><div style><a href="https://code.google.com/p/arduino/issues/detail?id=795">https://code.google.com/p/arduino/issues/detail?id=795</a><br></div><div style><a href="http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=38003">http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=38003</a><br>
</div><div style><a href="http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=913910">http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=913910</a><br></div><div style><a href="http://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html#AVR%20Named%20Address%20Spaces">http://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html#AVR%20Named%20Address%20Spaces</a><br>
</div><div style><br></div><div style>and others will lead the way. I've changed "prog_char" to "const char," "prog_void" to "const void," and "prog_int16_t" to "const int6_t", all of which seemed to do the trick. I have a firmware built that I cannot test.</div>
<div style><br></div><div style>This was on Debian 7.</div><div style><div><br></div><div>reynoldsm@firefly:~/git/arduino/tvm/arduino$ avr-gcc --version</div><div>avr-gcc (GCC) 4.7.2</div><div>Copyright (C) 2012 Free Software Foundation, Inc.</div>
<div>This is free software; see the source for copying conditions. There is NO</div><div>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</div><div><br></div><div style>I will test this in the morning; if anyone else gets there before me, that's great.</div>
<div style><br></div><div style>The build doesn't seem happy on 64-bit machines, but I'll end up revisiting that at some point as well. For now, I've got things working on a 32-bit Debian 7, which is a step. I'm not sure how I'm going to put that on the VM that I have for serving up the compiler, though, because it's a 64-bit machine. I'll get there.</div>
<div style><br></div><div style>Cheers,</div><div style>M</div></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 18, 2013 at 6:49 PM, Matt Jadud <span dir="ltr"><<a href="mailto:matt@jadud.com" target="_blank">matt@jadud.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Rick,<div><br></div><div>The 64-bitness is, I suspect, tricky. It might be easier in the experimental compiler (tock), but the legacy compiler would take more work (I think). </div>
<div><br></div>
<div>I'm downloading a 64 bit ubutnu now, and will bring up a VM to try a cross build in and see if I can shed any light.</div><div><br></div><div>Cheers,</div><div>Matt</div></div><div class="HOEnZb"><div class="h5">
<div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Apr 17, 2013 at 4:39 PM, Rick Beton <span dir="ltr"><<a href="mailto:rick.beton@gmail.com" target="_blank">rick.beton@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Fred,<div><br></div><div>Thanks for the suggestion. I switched to the Git tip and moved on to two new failures. The first was that I couldn't build the normal Kroc on my 64bit Ubuntu. The instructions say that 64bit is not yet supported so this outcome is not a surprise. However, I'm wondering ... have you got a roadmap for adding 64bit support?<div>
<br></div><div>The second problem was with the Avr version (CrossBuilding). After successfully 'configure'-ing, the build feel over part-way through, ending with the following</div></div><div><br></div>
<div><div>make all-am</div><div>make[2]: Entering directory `/home/rick/pkg/kent-cs/KRoC-git-avr/obj-avr/runtime/libtvm'</div><div><div><div>avr-gcc -DHAVE_CONFIG_H -I. -I../../../runtime/libtvm -I../../../runtime/libtvm -DTVM_INTERNALS -Wall -g -O2 -MT interpreter.o -MD -MP -MF .deps/interpreter.Tpo -c -o interpreter.o ../../../runtime/libtvm/interpreter.c</div>
<div>In file included from ../../../runtime/libtvm/tvm_mem_intf.h:69:0,</div><div> from ../../../runtime/libtvm/tvm_mem.h:40,</div><div> from ../../../runtime/libtvm/tvm.h:32,</div><div> from ../../../runtime/libtvm/interpreter.c:21:</div>
<div>/usr/lib/gcc/avr/4.7.0/../../../avr/include/avr/io.h:428:6: warning: #warning "device type not defined" [-Wcpp]</div><div>In file included from ../../../runtime/libtvm/tvm_mem.h:40:0,</div><div> from ../../../runtime/libtvm/tvm.h:32,</div>
<div> from ../../../runtime/libtvm/interpreter.c:21:</div><div>../../../runtime/libtvm/tvm_mem_intf.h:73:38: error: unknown type name ‘prog_void’</div><div>In file included from ../../../runtime/libtvm/interpreter.c:32:0:</div>
<div>../../../runtime/libtvm/ins_mobile.c: In function ‘mt_io_update_array’:</div><div>../../../runtime/libtvm/ins_mobile.c:475:5: warning: passing argument 1 of ‘read_word’ from incompatible pointer type [enabled by default]</div>
<div>In file included from ../../../runtime/libtvm/tvm_mem.h:40:0,</div><div> from ../../../runtime/libtvm/tvm.h:32,</div><div> from ../../../runtime/libtvm/interpreter.c:21:</div><div>../../../runtime/libtvm/tvm_mem_intf.h:75:13: note: expected ‘WORDPTR’ but argument is of type ‘WORD **’</div>
<div>In file included from ../../../runtime/libtvm/interpreter.c:32:0:</div><div>../../../runtime/libtvm/ins_mobile.c: In function ‘mt_chan_io’:</div><div>../../../runtime/libtvm/ins_mobile.c:544:7: warning: variable ‘type’ set but not used [-Wunused-but-set-variable]</div>
<div>../../../runtime/libtvm/interpreter.c: In function ‘disconnect_channel’:</div><div>../../../runtime/libtvm/interpreter.c:372:5: warning: passing argument 1 of ‘read_word’ from incompatible pointer type [enabled by default]</div>
<div>In file included from ../../../runtime/libtvm/tvm_mem.h:40:0,</div><div> from ../../../runtime/libtvm/tvm.h:32,</div><div> from ../../../runtime/libtvm/interpreter.c:21:</div><div>../../../runtime/libtvm/tvm_mem_intf.h:75:13: note: expected ‘WORDPTR’ but argument is of type ‘BYTEPTR’</div>
<div>make[2]: *** [interpreter.o] Error 1</div></div></div><div>make[2]: Leaving directory `/home/rick/pkg/kent-cs/KRoC-git-avr/obj-avr/runtime/libtvm'</div><div><div>make[1]: *** [all] Error 2</div></div>
<div>make[1]: Leaving directory `/home/rick/pkg/kent-cs/KRoC-git-avr/obj-avr/runtime/libtvm'</div><div>
<div>make: *** [all-recursive] Error 1</div><div><br></div></div><div>Any ideas what cases this?</div><span><font color="#888888"><div><br></div><div>Rick</div><div><br></div><div><br></div><div><br></div>
</font></span></div></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On 8 April 2013 23:12, Fred Barnes <span dir="ltr"><<a href="mailto:F.R.M.Barnes@kent.ac.uk" target="_blank">F.R.M.Barnes@kent.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hi Rick,<br>
<div><br>
Rick Beton writes:<br>
> Small correction - I'm using Ubuntu 12.10, not 12.04 fwiw.<br>
><br>
</div><div>> On 8 April 2013 22:56, Rick Beton <<a href="mailto:rick.beton@gmail.com" target="_blank">rick.beton@gmail.com</a>> wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > I tried getting the AVR Kroc for my shiny new Arduino Mega (yes, I know,<br>
> > they've been around for years...). But alas there doesn't appear to be a<br>
> > working cross-compiler toolchain at the moment.<br>
> ><br>
> > * I tried getting the binaries but couldn't find them.<br>
> ><br>
> > * I tried building the sources (<br>
> > <a href="http://projects.cs.kent.ac.uk/projects/kroc/trac/wiki/CrossBuilding" target="_blank">http://projects.cs.kent.ac.uk/projects/kroc/trac/wiki/CrossBuilding</a>) but<br>
> > ended up with a compilation error during 'make' thusly:<br>
> ><br>
</div>> >[snip compile error]<br>
<br>
Without digging too deep, my first thought would be to try the trunk version<br>
of KRoC, which has [un]officially moved over to Github:<br>
<br>
git://<a href="http://github.com/concurrency/KRoC.git" target="_blank">github.com/concurrency/KRoC.git</a><br>
<br>
(we're slowly getting there with migration!) -- but the 'trunk' subversion<br>
copy should be just as recent.<br>
<br>
<br>
Cheers,<br>
<br>
-- Fred<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>