SVM for Raspberry PI 2

567 views
Skip to first unread message

Gilberto Villani

unread,
Mar 24, 2016, 3:18:05 PM3/24/16
to Sedona Framework
I am running svm in Raspberry Pi2 model B + Raspbian, but the GPIOs do not work.
I read the file sedona-rpi/src/rpiDigitalIo/native/rpiDigitalIo_Dio.c and I see the GPIOs list for Raspberry Pi1 (lines 32 and 33), so if I change those lines, I can use svm in Raspberry Pi2, but I do not know how recompile this file to svm.

Somebody know?

Andrey Skvortsov

unread,
Mar 25, 2016, 4:22:07 PM3/25/16
to sedo...@googlegroups.com
Hi,

all C-code is compiled in svm binary. Therefore you need to recompile
sedona virtual machine (svm).

Here are official instruction how to do this:
http://www.sedonadev.org/doc/setup.html

I recommend you to build svm on RPi2 to simplify the process and avoid
any cross-compilation issues.

During compilation you will need java compiler and SDK. Originally
jikes was used, but it's obsolete. Here are instruction what files
need to be changed to use Oracle java compiler instead of jikes.

http://www.shawnjacobson.com/2013/beaglebone-and-sedona

Use Java SE 7, not the 8.


--
Best regards,
Andrey Skvortsov

Secure e-mail with gnupg: See http://www.gnupg.org/
PGP Key ID: 0x57A3AEAD


signature.asc

Gilberto Villani

unread,
Mar 26, 2016, 3:20:33 AM3/26/16
to Sedona Framework
Andrey,
Now, I started the understand the process to compile.
I need first compile Sedona Framework, so after I can compile SVM, is that right?
Is the compilation of SVM uses sedonac with app and scode dirs?
I changed the file sedona-rpi/src/rpiDigitalIo/native/rpiDigitalIo_Dio.c (from tridium-rpi-sedona-io-min.zip), so what do I need to use this file to compile SVM ?

Thank you very much for help, the tutorial about Beaglebone helped a lot to clear my mind.

Andrey Skvortsov

unread,
Mar 26, 2016, 4:33:51 AM3/26/16
to sedo...@googlegroups.com
On 26 Mar, Gilberto Villani wrote:
> Andrey,
> Now, I started the understand the process to compile.
> I need first compile Sedona Framework, so after I can compile SVM, is that
> right?

IIRC, yes, you are right.

> Is the compilation of SVM uses sedonac with app and scode dirs?
No, compilation of SVM uses only C compiler, usually GNU gcc.

> I changed the file sedona-rpi/src/rpiDigitalIo/native/rpiDigitalIo_Dio.c
> (from tridium-rpi-sedona-io-min.zip
> <http://www.sedonadev.org/download/demo/tridium-rpi-sedona-io-min.zip>), so
> what do I need to use this file to compile SVM ?
Again, IIRC, if you have changed only C file without changing any
*.sedona files, then you can recompile *only* SVM without rebuilding
all kits, apps, scode and sedonac. So the only command you'll need after
you setup environment is 'makeunixvm.py'.

>
> Thank you very much for help, the tutorial about Beaglebone
> <http://www.shawnjacobson.com/2013/beaglebone-and-sedona> helped a lot to
> clear my mind.
>
>
> On Friday, March 25, 2016 at 5:22:07 PM UTC-3, Andrey Skvortsov wrote:
> >
> > On 24 Mar, Gilberto Villani wrote:
> > > I am running svm in Raspberry Pi2 model B + Raspbian, but the GPIOs do
> > not
> > > work.
> > > I read the file sedona-rpi/src/rpiDigitalIo/native/rpiDigitalIo_Dio.c
> > and I
> > > see the GPIOs list for Raspberry Pi1 (lines 32 and 33), so if I change
> > > those lines, I can use svm in Raspberry Pi2, but I do not know how
> > > recompile this file to svm.
> > >
> > > Somebody know?
> > Hi,
> >
> > all C-code is compiled in svm binary. Therefore you need to recompile
> > sedona virtual machine (svm).
> >
> > Here are official instruction how to do this:
> > http://www.sedonadev.org/doc/setup.html
> >
> > I recommend you to build svm on RPi2 to simplify the process and avoid
> > any cross-compilation issues.
> >
> > During compilation you will need java compiler and SDK. Originally
> > jikes was used, but it's obsolete. Here are instruction what files
> > need to be changed to use Oracle java compiler instead of jikes.
> >
> > http://www.shawnjacobson.com/2013/beaglebone-and-sedona
> > <http://www.google.com/url?q=http%3A%2F%2Fwww.shawnjacobson.com%2F2013%2Fbeaglebone-and-sedona&sa=D&sntz=1&usg=AFQjCNFdv4hDNE1C4L-6u7XF6yjInepIiQ>
> >
> > Use Java SE 7, not the 8.
> >
> >
> > --
> > Best regards,
> > Andrey Skvortsov
> >
> > Secure e-mail with gnupg: See http://www.gnupg.org/
> > PGP Key ID: 0x57A3AEAD
> >
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Sedona Framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sedonadev+...@googlegroups.com.
> To post to this group, send email to sedo...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sedonadev.
> For more options, visit https://groups.google.com/d/optout.
signature.asc

Gilberto Villani

unread,
Mar 28, 2016, 3:50:14 PM3/28/16
to Sedona Framework
Andrey,
I did.
My RPi2 is running Sedona Virtual Machine and it is accessing the GPIO.

Thanks you a lot.

Andrey Skvortsov

unread,
Mar 28, 2016, 4:41:12 PM3/28/16
to Sedona Framework

Good job! =)
> > an email to sedonadev+...@googlegroups.com <javascript:>.
> > > To post to this group, send email to sedo...@googlegroups.com
> > <javascript:>.
signature.asc

Виталий Григорович

unread,
Mar 29, 2016, 8:07:37 AM3/29/16
to Sedona Framework
Hello. I'm trying to run the SVM on the same system.
You can share your achievements.
I have this error when setting rpiDigitaIo::DioOut in Windows GUI


Sedona VM 1.2.29
buildDate: Mar 29 2016 00:24:00
endian:    little
blockSize: 4
refSize:   4

-- MESSAGE [sys::App] starting
-- MESSAGE [sox::SoxService] started port=1876
-- MESSAGE [sox::SoxService] DASP Discovery enabled
-- MESSAGE [web::WebService] started port=8080
-- MESSAGE [sys::App] running
-- MESSAGE [sox::SoxService] opened 6700
ERROR: missing  native method 4::2
Cannot run VM (12)


четверг, 24 марта 2016 г., 21:18:05 UTC+2 пользователь Gilberto Villani написал:

Виталий Григорович

unread,
Mar 30, 2016, 4:46:24 PM3/30/16
to Sedona Framework
GPIO works :)

вторник, 29 марта 2016 г., 15:07:37 UTC+3 пользователь Виталий Григорович написал:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages