Show Posts
Pages: [1] 2 3 ... 8
1  Products / Arduino Yún / Re: Jamvm help...please on: April 21, 2014, 12:31:45 pm
Having removed jamvm, 'opkg remove jamvm'

Then reinstalling, 'opkg install jamvm', it would seem that now it will fit, no complaints or error messages, that were displayed initially and I had to install it on microSD.

But now after a supposedly good install, I can't find any sign of glibj.zip

2  Products / Arduino Yún / Re: Jamvm help...please on: April 21, 2014, 11:28:31 am
Its looking and sounding like the actual package install was not completed successfully, some folders not present...also looks like my SD card may have some corruption, fixing these now, will probably download jamvm and install manually.
3  Products / Arduino Yún / Re: Jamvm help...please on: April 21, 2014, 10:31:40 am
Thanks for the replies, I'm also talking to the developer of jamvm, Rob, who is being extremely helpful.
4  Products / Arduino Yún / Re: Jamvm help...please on: April 21, 2014, 09:49:22 am
fdisk information on partition:

Disk /dev/sda: 7948 MB, 7948206080 bytes
255 heads, 63 sectors/track, 966 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

df -h:
Filesystem                Size      Used Available Use% Mounted on
rootfs                    7.5M      5.8M      1.7M  78% /
/dev/root                 7.0M      7.0M         0 100% /rom
tmpfs                    29.9M    104.0K     29.8M   0% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock3            7.5M      5.8M      1.7M  78% /overlay
overlayfs:/overlay        7.5M      5.8M      1.7M  78% /
/dev/sda1                68.3M     16.0E    110.2M 100% /opt
/dev/sda2                 3.2G    598.0M      2.5G  19% /mnt/sda2

mount:
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=30568k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/sda1 on /opt type ext4 (rw,noatime)
/dev/sda2 on /mnt/sda2 type ext4 (rw,sync,relatime,data=ordered)

Thank you,
5  Products / Arduino Yún / Re: Jamvm help...please on: April 21, 2014, 09:23:12 am
Thanks, but no change.

Applied settings then rebooted and tried again.
6  Products / Arduino Yún / Re: Jamvm help...please on: April 21, 2014, 08:43:10 am
Thanks for the reply.

I'm using putty and ssh to connect to the Yun, created script 'java' containing:
exec /opt/usr/bin/jamvm -Xbootclasspath:/opt/usr/share/jamvm/classes.zip:/opt/usr/share/classpath/glibj.zip $1 $2 $3 $4 $5 $6 $7 $8 $9

I installed jamvm on the microsd card.

classes.zip is in /opt/usr/share/jamvm/
glibj.zip is in /opt/usr/share/classpath/

Also tried launching with:
/opt/usr/bin/jamvm -Dgnu.classpath.boot.library.path=/opt/usr/lib/classpath -Xbootclasspath:/opt/usr/share/jamvm/classes.zip:/opt/usr/share/classpath/glibj.zip -jar DSgateway
.jar

But when I run either the script or the above, I get:

Exception occurred while VM initialising.
java/lang/NoClassDefFoundError: java/lang/Class

Still having problems, thanks for your help...
7  Products / Arduino Yún / Jamvm help...please on: April 21, 2014, 06:17:28 am
I just received an Arduino Yun, I have been writing a Java application on my development system using the Oracle JVM.  I would like to port this to the Yun, I've installed the jamvm, it is installed in:

/opt/usr/bin/

I've uploaded my jars onto the Yun, when I try to run it using:

/opt/usr/bin/jamvm -jar DSgateway.jar

I get:

Exception occurred while VM initialising.
java/lang/NoClassDefFoundError: jamvm/java/lang/VMClassLoaderData

I have all the required jars in the same folder as DSgateway.jar,  I've looked around for help and documentation and can't find anything...

Any help is very gratefully received.

Thank you,


8  Using Arduino / Programming Questions / Re: Function() vs Speed on: March 11, 2012, 01:00:39 pm
I give up....
9  Using Arduino / Programming Questions / Re: Function() vs Speed on: March 11, 2012, 12:44:10 pm
The evidence is in numerous books.  My experience working with assembler dates back to the early 80's with 6502 and Z80.  

You only have a limited number of registers, when you run out of registers, this doesn't mean you can't call any functions, it simply switches to the stack.  Go read some books or search online.

Like-wise, if you nest to many function calls you will run out of stack space and encounter a stack overflow.

Quote
If too many, those that don't fit are passed on the stack.

This might be useful: http://en.wikipedia.org/wiki/Calling_convention
10  Using Arduino / Programming Questions / Re: malloc(), realloc().. the dark side powerful it is on: March 11, 2012, 08:01:31 am
I'm not sure why, I always thought it was something odd about Microsofts C compiler on the PC...but I've since encountered the same problem with gcc on Linux and also with C compilers on QNX.
11  Using Arduino / Programming Questions / Re: Function() vs Speed on: March 11, 2012, 05:16:16 am
Registers are only used when available which depends entirely on what else the CPU is doing at the time, at all other times the stack is used, so you should not rely on the use of registers, but you should factor the stack into your operation as this is the worst case senario.

12  Using Arduino / Programming Questions / Re: Help with Ajax on Arduino on: March 11, 2012, 05:11:24 am
The MS ActiveX object is created on the client in script, your client would need to be running on a MS Windows host in order to create the ActiveX object...which is one very good reason for exploring the IFRAME method further, the second method isn't limited to MS Window clients and should world for other platforms.

13  Using Arduino / Programming Questions / Re: malloc(), realloc().. the dark side powerful it is on: March 11, 2012, 04:12:31 am
A common problem with dynamic memory allocation is fragmentation, for example when your application starts, the system has say 8K available....you then allocated 1K for your own uses, after your down you free that area of memory.  Unfortunately you don't get back the 8K you start with, but two areas 7K and 1K, both freely available but you can no longer allocate 8K of memory as it isn't available as a contiguous block.

Over time the memory becomes very fragmented, you still have 8K free, but in lots of small blocks that are not allocatable in one large block.  This was a common problem on PC's.  Not sure about Arduino, haven't tried it.

Years agao I wrote a control system that was used 24/7 and initially it suffered from this problem where eventually it would fail as it ran out of memory.  So I removed use of malloc, calloc and realloc and instead implement my own system.

This would allocate a large block of memory at application start-up then divide it up as required using my own versions of malloc and free.  The advantage of this was that I could get back entire blocks of memory without the fragmentation.

If fragmentation is a problem on Arduino then it should be quite straight forward to implement this kind of memory management.
14  Using Arduino / Programming Questions / Re: Function() vs Speed on: March 11, 2012, 03:45:31 am
Having an understanding of how things work at the assembly level is always useful.  Compilers can introduce problems, especially when optimizations are enabled.  

Also, when talking about the compiler, remember the job of the compiler is to produce native machine code that the processor understands.  The way a function is called and the way parameters are pushed and popped onto and off the stack are not compiler issues, it comes down to the way the processor works. 
15  Using Arduino / Programming Questions / Re: Function() vs Speed on: March 11, 2012, 03:33:13 am
The way the stack is used is pretty basic stuff, looking at the prototype for delay its simply:

void delay(unsigned long);

Which as I said would imply the parmeter delay is pushed onto the stack along with the program counter.  The context of the application has to be stored somewhere before it jumps into the function.  

http://en.wikipedia.org/wiki/Call_stack

This is a well documented fact.

I cannot speak for the code the Arduino compiler generates, however this is exactly how every other C compiler I've used works.
Pages: [1] 2 3 ... 8