Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
As a hobby project, I'd like to learn development on "bare metal" with Ada. It seems GNAT compiler has support for various development boards and provides a few different runtimes - zfp, ravenscar-sfp, ravenscar-full.
I'm not quite sure which MCU has better support and nicer to work with. I've been looking at:
TI "TMS570LC43x Hercules Development Kit". This has Cortex-R5F CPU, which looks quite interesting for learning hardware features required for hard real-time applications. But the board is somewhat expensive and there aren't any tutorials on how to use GNAT with this board.
ST "STM32F7 discovery kit". This has Cortex-M7 CPU. The board is much cheaper and there are quite a few tutorials that use STM32F boards with GNAT.
Both of these boards seem to be supported by GNAT bb-runtimes. Has anyone worked with either of them and could provide recommendations? How well do they work with GNAT runtimes and which one has better debug support or development features?
Based on the comments to my question, it seems that MCUs from STMicroelectronics would be easier to work with and have better support from GNAT Ada compiler. Most of their MCUs are based on ARM Cortex-M cores, which are more common than Cortex-R cores. There are also more resources (books, tutorials) on how to work with Cortex-M cores. MCUs bases on Cortex-R cores are probably more suited to people working with safety-critical systems.
I also just started to do bare metal programming with Ada. My board will probably be the STM32F4 discovery, which are much cheeper than the F7 boards I have seen. Second reason is, that for the F3 Dicovery board there is very good tutorial for bare metal programming with Rust on the Rust homepage which I tried with my F3 board.
For Ada, I have only checked the tool chain from AdaCore for that board so far, cross compilation seems to work very well. Unfortunately, the Ada Drivers Library doesn"t support the F3...
I have been using GNAT Ada on ST ARM boards for the last 6 years and use it on about 40 different boards. They have excellent support for the boards they directly support and I have added many others over the years to my collection. I would say go with the 429, 469 or 769 discovery board. I prefer the small footprint (sfp) versions and have fun. I just finished doing some casino games that run on the 429 Discovery board. I mostly use the 2017 version of GNAT ARM because that was their last year of support for win32 which I needed for other things but their new Aug 2020 free download has very nice support for many boards in addition to the ST boards.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I need to compile C project for Attiny85 but not sure which compiler to use - free if possible. Is Atmel Studio a good choice?
Complier
Free and the best compiler for AVR is AVR-GCC (in Windows it's called WinAVR).
It supports ATTiny85 (here is the list of supported devices).
So you just need to pass this option to compiler:
-mmcu=attiny85
You can look here for Makefile example.
Flashing software
To upload your firmware to ATTiny85 chip, you can use AVRDude program. It's free and most popular application for flashing AVR chips. See this for usage example.
IDE
As for IDE, there are plenty of them out there, but IMHO two best choices would be:
Vim: if you prefer console applications. Especially good for Linux. I would recommend to use next plugins: cscope, CTags, OmniCompletion, NerdTree. Still, if you don't know vim yet, it would take a lot of time to learn it and configure it properly (I'm personally using vim).
Eclipse: if you prefer GUI applications. It's very flexible, free, cross-platform and extremely powerful. It's very easy to configure Eclipse for AVR development (to use AVR-GCC and AVRDude). There is Eclipse plugin for AVR. And you also can find a lot of tutorials in web about how to use Eclipse for AVR development.
If you are novice, I'd say -- go with Eclipse.
Debugger
For debugger I would recommend GDB. GDB is free and very powerful debugger software. It's easy to integrate GDB into Eclipse
Also you will need AVaRICE to connect GDB with JTAG.
Note
All software I mentioned is free, cross-platform and actually being used for professional embedded development, so you can use it without second thoughts. Actually, it's almost single choice you have out there, except for IDE (still, my colleagues at work use mostly Vim and Eclipse, 50/50, so I think there is not much choice here as well).
Another good thing is that it's very easy to migrate to another MCU (from AVR) if you stick to software I listed above. E.g., for MSP430 there is similar GCC toolchain and similar flash software, and GDB of course. So you can just configure Eclipse to use msp430-gcc instead of avr-gcc and develop for MSP430.
I googled a lot, and almost all users compile their codes with Atmel Studio, or they use Attiny along with Arduino. So I think Atmel studio is the best choice. It also includes gcc to compile c/c++
Atmel® Studio 6 includes the GCC C and C++ Compiler, assembler and a simulator, and interfaces seamlessly with in-system debuggers and programmers to make code development easier.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I have been looking into micro-controllers and was wondering if the majority of them are C/C++ based? I am quite proficient in java and want to ask you guys if anyone knows of a good cost efficient, java-based micro-controller I could look into.
All answers are appreciated!
The difference between a language like java (or c#) and a lower level language like c or c++ is the fact that they have a virtual machine.
This has many advantages, like making the application platform-independent. But it also means that each platform has to have the vm for it.
Now, microcontrollers are not uniform and vary in power, memory, and many other features. So adopting the JVM (java's virtual machine) for them is not easy even when possible.
Most of the time its just impossible - most of the uc have very low memory capacity (part of what makes them cheap) - this would make fitting any general-purpose JVM there impossible, not to mention also with the application code.
I am aware of some partial-implementations of java for microcontrollers. For example "java-based" sim cards (which have a very small controller inside) are there, but they have a very limited version of java.
So basically I think your best bet to write "embedded java" (especially if you're a novice) is to work on top of microcontrolers that are basically a small fully functioning computer, that runs a proper OS that already has a JVM. Just look into one of the new "micro computer" open source projects like raspberry pi or beaglebone. Both cost around 2x of an arduino and are much more powerful.
Hope I helped.
Have a look at the Java-ready STM32 microcontrollers or Renesas RX.
As an alternative, you can run a stripped-down JVM on AVR/Arduino using Haiku-VM, NanoVM or uJ.
You can also write Arduino sketches in Java and cross-compile them to C using VBB.
JArduino might be a good starting point for you, as it would allow you to write Java programs that interact with an Arduino board. The Java API provided by JArduino is fully aligned with the Arduino API. Then, once you get used to the Java API, it should be easy to switch to plain Arduino programming (as pointed out, the C/C++ -based Arduino is not that far from Java, anyway). Be aware that with JArduino you do not really program the micro-controller itself (your main logic would run on your PC and the Arduino would simply be "controlled" without any advanced logic running on the board).
There are Java alternatives, but I think they are costly. For example ST Microelectronics has this java IDE based on eclipse:
Java SDK
I have no experience with java on microcontrollers, but Java have many similarities (C based language) to C++ (which is more supported with microcontrollers), but it is still C that is dominating. It should be possible to learn this quite fast if you already know Java.
Arduino uses C++ and are easy to use for people inexperience with C/C++.
I suggest you also try the STM32 Java forum to see if there are users already sharing their experiences:
STM32 Java forum
You can look at Java on a Chip (JoC Module) is the java programmable controller-module
JoC have a reference Board Javaino for easy development
Also Demmel iLCD product have the Java VM on board, it's a smart display with JVM
Is there an existing ZigBee Library/Stack that is comaptible with MikroC? I am planning to use MRF24J40B from Microchip as the transceiver and PIC18F27J53 Microcontroller as ZigBee stack controller. I can't seem to find a ZigBee stack compatible with MikroC. Though Microchip has a ZigBee stack provided, it happened that MikroC is not a supported compiler.
Any help will be much appreciated.
Unless you think you can port Microchip's ZigBee stack from their compiler to mikroC, you should consider using their development environment for building your application.
In my experience with embedded development, you're better off using the hardware company's tools, especially if you intend to use their code libraries.
If you think there's benefit to using mikroC over Microchip's tools, then you should contact your sales rep there and ask about it. If you can present a strong argument for the benefits of using mikroC, and convince them that you'll be purchasing a large number of chips once you have a shipping product, they might be able to help you with getting it to work with that compiler.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
Probably a stupid question but I am in the following situation:
our development machines are currently all 64-bit Intel-based systems, where we produce 32-bit and 64-bit versions of our applications. We also recommend our customers to use Intel-based systems (as opposed to AMD-based systems).
Now our IT-manager wants to buy some new development systems and to cut the costs he is looking into buying (64-bit) AMD-based systems. Visual Studio (2010) probably doesn't care which processor it is running on, and the generated code is probably the same, but just to be sure: does it make any difference for the generated executable on which processor (AMD vs. Intel) it is built?
The .NET and Visual Studio compilers don't really care AFAIK since I have experimented with this before and the assembly that it spits out is the same no matter what. In the case of ICC and GCC there are certain callpaths that must be differentiated for AMD and for Intel (very specific things) which you probably shouldn't worry about to begin with. GCC not as much as ICC (Intel C Compiler) which will attempt to optimize with a lot of SSE and branch prediction hints on Intel but leave some out on AMD which may not support certain features.
There are also libraries out there that rely on specific architecture types such as Intel or AMD but they are very specialized (and I have only seen them used in research purposes) such as very complicated floating point parallel libraries and complex threading libraries.
It depends on how you configure it. I think by default, no it doesn't matter.
If you're using the Intel Compiler and you compile with /QxHost or /fast, then it will matter since it clearly looks at your system to see what it's capable of.
But if you specify /arch:XXX or whatever option, it will be independent of your machine. For GCC, I think by default it doesn't look at the host machine.
EDIT:
As as far as libraries like MKL go, the host machine will still have no effect on which version of the MKL is compiled. In general multiple code-paths of the MKL are put into the binary regardless and the CPU-dispatching is done at run-time.
It doesn't matter. From the software point of view AMD and Intel are the same chips: x86-based CPUs. Yes, they can have different extended instruction sets. But the same you can say about Intel CPUs belonging to the different generations. Visual Studio compiler will run on all of them and produce the same code.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am writing embedded applications for different hardware (avr, arm7, tms55xx…) and different rtoses (freeRTOS, rtx, dsp/bios). And every second of them needs to communicate with PC or another digital device. Sometimes interactions logic is very advanced. So I'm interesting in common methodology (like state-machine programming style), protocol specification or library, that could simplify developing such things.
I've been very happy with google's protocol buffers on embedded systems for both data passing and RPC mechanisms. They are quite a bit lighter than XML based systems since the data is transmitted is binary encoded and the decoding the data sent requires minimal processing which is a big plus on cpu usage on the embedded side of the link.
There are readily available libraries for various languages but most importantly C for embedded apps.
OpenJAUS.
It's reflective, composable and standardized (ish)
Works cross-language-cross-platform.
Provides a lot more framework than Protocol Buffers ( which is a neat messaging stack)
It's focussed on robotics, but works for control systems.
In theory a JAUS user interface can operate any JAUS-compliant device, and JAUS systems are intended to compose into a syste-of-systems.
If those things don't make sense then please ignore this suggestion.
Here is an article on Embedded.com on CORBA on embedded systems and 'lightweight' or minimal implementations. The commercial solutions mentioned are for QNX, VxWorks and LynxOS. And another article on RPC on Embedded.com (this one authored by a TI DSP trainer and specifically referencing DSP, so may be relevant to DSP/BIOS).
I strongly recommend that you use Embedded.com's article search, there are probably many similar articles that you will find useful.
VxWorks supports RPC, as does QNX Neutrino.
"Roll your own" has always been my solution where standards compliance and inter-system compatibility is not an issue (i.e. my systems talking to my systems). Doing only exactly what you need is the best way to achieve 'lightweight' perhaps at the expense of flexibility and maintainability.
Recently we developted: https://github.com/EmbeddedRPC/erpc
Give chance to it ;)
Protocols are a natural fit for state machines, so perhaps you could use the very lightweight, open source QP state machine frameworks (state-machine.com). Ready to use QP ports and examples for various compilers are available for AVR, MSP430, ARM7/ARM9, TMS320C28x, PSoC, HC08, M16C/R8C, H8, 8051, PIC18, PIC24/dsPIC, ARM Cortex-M3/M0, and many others.
Note: I work for http://state-machine.com