Small footprint (<24KB Flash and <2KB RAM).
You have asked a few questions. This is my take, Others may add to or dispute parts of it.Hi all
I have some question about concept of oo and vm
what is the advantage of virtual machine on embeded systems?
The idea is that one could write code that runs on many systems, these systems must run the VM to run the code.
mean how could it be easy when program a embeded system having a VM ?
what is the different of VM and Real time operating systems (RTOs)
Apples and oranges. A VM is one computer simulating another. The other is the virtual machine. A RTOS (Real Time Operating System) is an OS intended to deal with real time IO issues.
what is the advanteage of use of object oriant concept(over non oo language like assembly or c) in embede systems ?
The same as any other programming. In theory it is easier/faster to write bug free (mythical beast) code. Much embedded code is simple enough that OO does not provide much benifit. It is often not worth the overhead. As the system grows more complex the scales tip in favor of OO. Or at least that is the party line.
If you understand OO you do not need an OO language to write code that is OO. But an OO language tends to enforce the OO nature of the code. Along the same line you do not need an RTOS to do multitasking or real time IO.
NONEwhat is the advantage of virtual machine on embeded systems?
only if you are bed programmer. VM can only "limit" you, cannot give you anything else... look at modern C compilers now .. you can do "init_pwm(40000); pwm_dc(50);" and you will start pwm at 40KHz and 50% duty cycle .. and it will do so on any uC that compiler support. You can on the other hand directly set all registers in order to achieve the same thing. If you use compiler function it will work but if you do it manually the code will be smaller and you will usually be able to tweak few more things that you cannot from the library function. What will you do is up to you, but you have a choice, the VM just removes the choice and leaves you with single option (to use function)... so you cannot "mess up" anything "by mistake"mean how could it be easy when program a embeded system having a VM ?
the os/rtos/your application is running normally directly on the cpu so you are getting maximum benefit from hardware you are using. The VM is simulator, it simulates the "virtual computer" ... so it is few times slower then what the possible speed could be. Think amiga and PC... Amiga500 is in range with XT (4.77MHz)+VGA+SoundBlaster ... but you need several generations newer computer (486 @ 33MHz) to be able to simulate Amiga500 on PCwhat is the different of VM and Real time operating systems (RTOs)
In theory if compiler is good enough the OO will create as good the code as non OO language. The benefit of OO systems everywhere (including embedded systems) is code maintenance and re usability. Meaning, it is easy the make a set of classes that you can re use in your application, it is much easier to maintain those classes then "flat" libraries in non OO languages.what is the advanteage of use of object oriant concept(over non oo language like assembly or c) in embede systems ?
Hi all,It is a virtual machine. They use real hardware to emulate their B# machine. That could/will slow things down but has its advantages.
It is only for larger uC's
3v0
We have seen virtual machines in the past. Back in the days of the S100 bus we had the P machine. They even put together a computer that executed the instruction set in hardware.
The idea of "one size fits all" falls apart when it comes to IO. They are going to need unique IO modules to handle each vendors hardware. That may be a problem.
In spite of what I have said I do wish them the best.
3v0
NONE
In theory the VM can be used to prevent some poor coding errors like writing to pointers that point to wrong place, nothing else. Implementing the VM in hardware is another story but not really practical .. then you could invent few new benefits but .. it is not that simple
only if you are bed programmer. VM can only "limit" you...
in my book - removing the choice to everyone in order to prevent few morons to make the wrong one - is NOT good...
Here some advantages of a virtual machine (VM) on embedded systems.
The B# VM is written in full ANSI C and promotes:
• The reusability of software components expressed in binary
format on any architecture
• The writing of interrupts handlers and access device registers
in a uniform manner, independent of the underlying target
architecture (memory-mapped or port-mapped)
• No dedication to any specific microcontroller architecture
• The ease to test, debug, and maintain embedded applications
A VM provides additional levels of abstraction which isolate the developer from the idiosyncrasies of the underlying hardware architecture. But that's it. It is certainly not an easy ticket to enter in the embedded systems arena. Bad developers or those who underestimate and not objectively understand the constraints of embedded systems applications will always shoot themselves in their foot.
I perfectly agree with you that a VM is not a fence of protection neither a point and click solution for those who are used of unlimited cpu and memory resources. Embedded developers are very cautious about any waste, but a bit more flexibility and reuse will be a plus, if it is affordable.
Michel,
First thanks for posting your reply and I do wish you the best.
Industry is using the term "small footprint embedded systems". In the context of this forum these systems are not small. Perhaps we are out of touch.
I will be watching to see what discount if any you will be providing for classroom use.
3v0
3v0 ......Hi 3v0,
By out of touch, you mean that the main interests of this forum are microcontrollers 4-8 bits for "very small footprint ES" where C and assembly are a must, such as PICs and the like.
I have been active on the forum for about 2 1/2 years. I have not seen any 4 bit, mostly 8 and some 16 bit uC's A few members have expressed interest in 32 bit. In addition to asm and C some people are using the Swordfish Basic compiler.
Is my assumption on RAM available and stack levels on PICs are still true on the most recent generation?
It is in the small uC's: 10F, 12F, 16F, and 18F lines. One would have to know your requirements and check the Microchip uC lines above that.
PIC 12 14 16 (Midrange) 8 Level Stack (13-bit)
PIC 18F Enhanced MCU devices have an 31-level deep x 21-bit wide hardware stack.
Are you actually teaching a course on a specific platform?
Yes, I am finishing my 3rd year teaching at Boise City High School. The first year I taught C#. The past 2 years I have taught embedded systems using Microchip PIC18F uC's and C.
Next year I plan to teach OO again. Most possibly C#. Many educators prefer Java as a first language. I use C# because it allows a smoother transitiion between the classes.
The coverage is about the same as university classes but we move at a slower pace. I am retired and teach the class as a service to the community.
Best Regards,
Michel
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?