embedded Java VM for Cortex M3 - jvm

I'm currently searching for a Java VM which is portable (or already ported) to an ARM Cortex M3 (LPC1768 from NXP, 512kB ROM ). I have already some experience with simple Real Time Java (www.rtjcom.com) which has a small footprint and is well documented. Do you know some more embedded JVMs for Cortex M3? Ideally with a real Byte Code interpreter and a ClassLoader?
Thanks for your suggenstions.

The following a Java VMs target embedded systems:
JamaicaVm (Commercial)
MicroJVM (Comercial)
Aonix Perc (Commercial)
PreonVm (Commercial)
AvianVM (Open source)
Open Mika (Open source)
Squawk (Open source)
SimplRJT (Open source needs no RTOS for threading support - seems to have disappeared)
Kaffe (Open source).
This article by Michael Barr and Jason Steinhorn may also be helpful.
Note that on a Cortex M3 it may be very slow. An ARM part with Jazelle or ThumbEE may be more appropriate.

Take a look at IS2T JVM as well, as the other JVM simply do not run on Cortex M devices.

Related

Simulating target on PC

I'm doing a project in C language that runs on a target with vxWorks operating system.
I would like to run my code on PC also for two reasons:
The HW of the target is not available yet, and i want to start testing my SW.
Even when the target will be ready it will be easier for me perform testing and simulations on a PC.
Is there some interesting way to do it?
Thanks.
You have three choices:
Use the VxWorks Simulator (vxsim) - it's part of the Workbench and can be accessed like a real target
Pros:
Easy to to use
Integrated into workbench
Debug functionality and good control of the system
Doesn't need any further hardware
Documentation (check Wind River VxWorks Simulator User's Guide)
Cons:
Not the real target system (but this is a con for all points here)
Use a x86 machine and boot eg. through ftp
Pros:
You can test booting via network and network
Cons:
The system may lack of drivers
Possible you have to change kernel
Debug is not as good as vxsim
The difference to your target may be realy big
Use a Virtual Maschine
Pros:
Runs on same pc - no further hardware required
Possible to test several bootloaders
Cons:
Not possible to simulate the target cpu etc.
A VM is not the best way for VxWorks testing
As Archie, I recommend you the VxWorks Simulator too.
A third way is to abstract the HW and OS in a separate layer in your application architecture, and provide both a PC and VxWorks versions of this layer.
This is rather costly, of course, but will have other advantages, i.e. insulation from vendor instability (like when pSos support was stopped years ago...) It might also nudge you in the direction of a nice, layered architecture.

ARM TrustZone development

I am wondering if anyone have any information on development boards where you can utilize ARM TrustZone? I have the BeagleBoard XM which uses TI's OMAP3530 with Cortex-A8 processor that supports trust zone, however TI confirmed that they have disabled the function on the board as it is a general purpose device.
Further research got me to the panda board which uses OMAP4430 but there is no response from TI and very little information on the internet. How do you learn how to use trust zone?
Best Regards
Mr Gigu
As far as I know, all the OMAP processors you can get off-the-shelf are GP devices, i.e. with the TrustZone functions disabled (or else they're processors in production devices such as off-the-shelf mobile phones, for which you don't get the keys). The situation is similar with other SoC manufacturers. Apart from ARM's limited publications (which only cover the common ARM features anyway, and not the chip-specific features such as memory management details, booting and loading trusted code), all documentation about TrustZone features comes under NDA. This is a pity because it precludes independent analysis of these security features or leverage by open-source software.
I'm afraid that if you want to program for a TrustZone device, you'll have to contact a representative of TI or one of their competitors, convince them that your application is something they want to happen, and obtain HS devices, the keys to sign code for your development boards, and the documentation without which you'll have a very hard time.
As of today OP-TEE runs on quite a few devices (see OP-TEE platforms supported) and several of them are development boards readily available. To name a few HiKey, Raspberry Pi3, ARM Juno Board, Freescale i.MX6 variants etc. Either you could pick up one of those or you could simply try it all using QEMU which is very well supported in OP-TEE.
You can get 45 days trial version for ARM fastmodels. RaspberyPI is supposed to support TrustZone too. www.openvirtualization.org has full open source implementation of ARM TrustZone. ARM is moving away from its proprietary TrustZone APIs to globalplatform API. GlobalPlatform also defines the APIs for Inter process communication etc.
There are a few select boards at this time that do allow development with TrustZone. As far as general purpose board, the FriendlyARM board is a good start (http://www.friendlyarm.net). Also, any board with a Cortex A15 processor must have TrustZone available due to the fact that the virtualization extensions can only be utilized from the Normal world. There may still be a question of whether or not the manufacturer has their own code running in the Secure world, but you can always try. The Arndale is a good development board, but unfortunately Samsung already has code running in the Secure world, so by the time you get access, you're running in the Normal world. So if you need Secure world access, look for non-Samsung, Cortex A15 processors. That'd be your best bet.
It's also worth noting the TI did not technically disable TrustZone. Instead, the bootrom code transitions the processor into the Normal world prior to switching execution to U-boot. So it's actually using TrustZone to move to the Normal world, but then doesn't provide a mechanism for moving back to the Secure world. To prove this, just try to read the SCR and you'll get an undefined exception, which is what will typically happen from the Normal world. However, if you perform a SMC call, it will execute just as expected (i.e., it switches to the Secure world, but then just switches right back to the Normal world), so it looks like nothing happened.
regarding openvirtualization, it can be ported to arm development board like the samsung exynos 4XXX.
you will have access to all source code including the secure os if you use openvirtualization.
but if you just want to develop programs that use the trustzone, I wonder if it is necessary. maybe there are standard driver or api that allow you to do it without worrying about compiling your own secure os?
the best thing you can do is contact parties like Gemalto and the people that brought Mobicore. Note that they will indeed ask you to sign an NDA.
Secondly, you can buy the ARM DS5 development suite. This comes with a lot of documentation including some on trustzone.
You should really take a look at the USB armory from Inverse Path: http://www.inversepath.com/usbarmory.html
It's built on open hardware and open source with full access to Trustzone (you can blow in die fuse to enable secure boot): https://github.com/inversepath/usbarmory
They successfully ran Genode within TZ and Linux in the normal world.

Device driver development

Whether Objective C is used for any Device driver developments?
now I am working as a ios developer.Is it possible to work in any other domains with this experience
Since you’ve tagged your question as mac, I’m assuming you mean device drivers for Mac OS X. In that case, they’re developed in C++ and use I/O Kit. More information here and here.
I comes from kernel level programming and now working on iphone and android developement..And I will tell you from my experience that going opposite (application programming to system level.) is like climbing everest..There is nothing to compare between two..
99 percent of system level coding happens in C, and for kernel programming purest form of C is used..Debugging is very difficult there, a segmentation fault in application programming is a kernel panic (only solution to it is reboot) in kernel programming..It is not about having to reboot, but on a reboot we loss entire information (crash information about our failed project)so that it is very difficult to debug..Surely kernel programming and device driver development is more challenging..
Device driver development is very specific domain. If you have been a application developer and even though you know a programming language which support driver development it would not be just an easy switch to driver development as it will be all together different concepts, APIs etc that you need to learn and get a good hold of because when a driver (kernel mode) crashes it brings down the whole system. I don't think Objective-C is used for driver development. This area is for C or in some cases C++. I have done some driver development and felt application development is much more fun then driver development as in driver development you would be writing code that talk to hardware and thats it, just pass data back and froth between hardware and OS, where as in application development you can do a whole lot of amazing things, your imagination is the only limit :)

Is it possible to program Microblaze without EDK, on any Xilinx FPGA?

Is it possible to program Microblaze without EDK, on any Xilinx FPGA device ?
I am developping under Linux.
Is there advisable tutos/books about that ? Is there a stable open-source clone ?
For spartan 3, spartan 6, virtex 5, and virtex 6 family FPGAs you can use the simple microblaze design in xapp1141 from Xilinx without needing EDK.
http://www.xilinx.com/support/documentation/application_notes/xapp1141.pdf
https://secure.xilinx.com/webreg/clickthrough.do?cid=132893&license=RefDesLicense
It includes a netlist for a simple microblaze design. If you use this you do not need EDK at all.
You can instantiate the netlist in your FPGA design and build it using the normal ISE flow. Then you use the Xilinx SDK to write and compile software for it. You are very limited in the peripherals that the microblaze will have built in: simple data address bus, debug interface, and UART.
Any other peripherals you want (ie SPI, I2C, etc) you would have to write in HDL and connect to the simple address and data bus implemented by the simple microblaze. Your software also has to fit in and run out of the internal block ram (8KB) allocated by this microblaze netlist.
UPDATE:
In ISE 13.4 there is now a Microblaze MCS coregen core that allows you to instantiate a mircroblaze without EDK.
http://www.xilinx.com/support/documentation/sw_manuals/xilinx13_4/ds865_microblaze_mcs.pdf
By the datasheet it appears to support everything from Spartan 3 to the new 7 series parts.
I you want to instantiate a Microblaze core in your design, then you need ISE EDK.
If you already have a design with Microblaze. Then you can program it (i.e. write software for it) without ISE EDK.

mono for emdedded

I'm a C# developer, I'm interested in embedded development for chips like MSP430. Please suggest some tools and tutorials.
Mono framework is very powerful and customizable, mono specific examples will be more helpful.
Mono requires a 32 bit system, it is not going to work on 16-bit systems.
There is currently no full mono support for the MSP430.
Mono doesn't run in a vacuum - you will need to make a program that exposes the microcontroller functionality to Mono, then link to Mono and program the entire thing on the microcontroller. This program will have to provide some functionality to Mono that is normally provided by an operating system.
The paged igorgue linked to gives you a good starting point for this process: http://www.mono-project.com/Embedding%5FMono
I don't know what the requirements of the Mono VM are, though. It may be easy to compile and use, or you may have to write a lot of supporting code, or dig deep into mono to disable code you won't be using, or can't support on the chosen microcontroller.
Further, Mono isn't gargantuan, but it's complex and designed with larger 32 bit processors in mind. It may or may not fit onto the relatively limited 16 bit MSP430.
However, the MSP430 does have a GCC port, so you don't have to port the mono code to a new compiler, which should make your job easier.
Good luck, and please let us know what you decide to do, and how it works out!
-Adam
The tools to use Mono on an MSP430 just aren't available. Drop all the C# and use C/C++ instead.
MSP devices usually have 8 to 256KB Flash and 256 bytes (!) to 16kBytes of RAM.
Using C# or even c++ is really not an option. Also, complex frameworks are a no-go.
If you really want to start with MSP430 (which are powerful, fast and extremely low-power processors for their area of use), you should look for the MSPGCC toolchain.
http://mspgcc.sourceforge.net/
It contains compiler (GCC3.22 based) along with all necessary tools (make, JTAG programmer etc.). Most MSP processors are supported with code optimisation and support of internal hardware such as the hardware multiplier.
All you need is an editor (yopu can use Eclipse, UltraEdit or even the normal Notepad) and some knowledge about writing a simple makefile.
And you should prepare to write tight code (especially in terms of ram usage).
I think that Netduino can be of some interest for you.
Visit their web site at http://netduino.com/.
It's opensource hardware (like Arduino, http://www.arduino.cc/).
It runs .NET Micro Framework (http://www.microsoft.com/en-us/netmf/default.aspx), the breed oriented to embedded development.
Regards,
Giacomo