What pascal compilers can target embedded ARM with no OS? - embedded

Looks like available Pascal compilers can only produce binaries for ARM on Linux. Is there established version of compiler/bundle for just bare ARM cpu with zero extra software preinstalled ?
To clarify, I am looking for high quality, compact tool (alternative to commercial C, open source C) for kernel-less, plain embedded CPU with all software in one plain ROM ? IDE with debugging capabilities is nice to have, but not necessary. Dubugger could actually be some different 3rd party generic IDE. I hope that compilers can dump the debug/symbols info in some standard form.
Thank you

Free Pascal Compiler supports ARM without any OS. They call it TARGET EMBEDDED.
For ARM Linux take a look at this and this.
There is also Lazarus CT edition cross compiler which seams to target sysless ARM too.
UPDATE 1: mikroElektronika has also recently made Pascal compiler for ARM.
UPDATE 2: Ultibo framework for bare metal Raspberry Pi programming looks outstanding.

Related

Instruction set: how to test an external library

Depending on the CPU architecture, some computers can run software with some specific instruction set. Using these instructions can greatly improve the speed of the program, but can also lead to crashes when not supported.
But sometimes, when shipping a software that depends on external libraries (binaries), we may want to check what instruction set they rely on (like AVX2, SSE2, etc) and assess if we can use safely this library or executable (e.g.: on Windows, a .lib, .dll or an .exe). Mostly when the final executable has to be shipped to hardware that is out of our control, but should follow some specifications.
Most of the related questions seems to tackle the problem the other way around: from the software, to check if a set of instruction is supported on the current hardware:
how verify that operating system support avx2 instructions
Detecting SIMD instruction sets to be used with C++ Macros in Visual Studio 2015
How one can check, from the binary, what kind of instruction sets are required or used? Is there some OS tools for that?
The OSs of interest would be Windows, Linux and MacOS.

Mbed OS -> is it really open source?

If Mbed OS is open source then why do you have to use a cloud compiler to compile the software? Is the source code for Mbed OS open but the the cloud compiler is closed source?
Just looking for clarification amongst marketing jargon.
SW
There seems to be some confusion here between Mbed OS which is a open source project and the Mbed Compiler Service, which is a tool that makes getting started with Mbed OS super easy.
Mbed OS is open source, you can find it here : http://github.com/armmbed/mbed-os, i encourage you to contribute by submitting a Pull Request.
The online compiler service is run by the Arm Mbed team to provide an easy way to get started with compiling your programs (there are some assumptions and sensible defaults in place so everything 'just works'). You can export your programs to a 3rd party compiler like Keil, IAR, or GCC / Eclipse for debugging if you need it. You can also use Mbed CLI offline to compile your code using GCC. (Fun fact, Mbed CLI is the same set of command line tools the online compiler uses).
Additional fun fact, the online compiler is using armcc (the same one that comes with Keil) where as GCC is the default for Mbed CLI (though if you have a liscense for armcc or iarcc you can use those with Mbed CLI as well.
Mbed OS is completely open source. There are various options to compile. So far, there are 3 toolchains that are supported by ARM mbed:
GCC ARM
ARMCC
IAR
Out of these 3, only GCC ARM is free while others have free evaluation versions with limited features unless you buy them.
In short, you can download mbed OS and then compile it for a target using any of the toolchains which may or may not be open source.

What is a platform when we talk about embedded systems?

I am trying to learn linux porting, booting and other things and one thing that specially comes is platform. What is it
a cpu
a board
an overall term as board + cpu
like when we say platform specific code do we mean architecture(of cpu) specific code ?
The answer depends on context. If you are porting Linux, the platform from that point-of-view is the hardware you are porting it to. If you are writing applications to run on Linux on that hardware, then the platform is *both) the OS and the hardware.
Furthermore if you were targeting a GUI framework such as KDE or Gnome, that that would be "part of the "platform" too; or if you were running Java code, the platform would include the JVM.
Essentially it is the stuff that is already there that the code needs to pre-exist in order to run the code. Generally a platform might consist of layers; the "platform" as such comprises of whatever layers exist below that which you might be developing at that time.

Using OpenCL in linux and IDEs

For using OpenCL in linux should I have NVIDIA GPU?
In my computer I have an Intel GPU and i3 Intel CPU supported SSE3 and SSE4, I want program whith OpenCL in windows can I use an other IDE than "Visual Studio" for example "Code Blocks"?
Thank you
You can use OpenCL with any GPU, as it can run on a CPU as well (that's one of the strong points of OpenCL vs CUDA and the like).
But if you want OpenCL to actually use your GPU and not (or not only) your CPU, you will have to have a driver for your GPU which supports OpenCL, e.g. AMD or NVIDIA. Intel also lists Intel HD and Intel Iris graphic chips as supported through their OpenCL SDK, but you should probably check what you're actually running on if you want to make sure (e.g. check at the start of your program - see Appendix A).
Also, OpenCL has NOTHING to do with CPU extensions like SSE (specific implementations may use SSE/AVX/whatever CPU extension for better performance, but OpenCL does not require any of those per se), or with the IDE you use, and only very little with operating system. So you're free to use whichever IDE you want to (at the end, the IDE is only the editor you write your code with). In the case of Visual Studio people often tend to mix IDE with compiler, as Visual Studio uses it's own compiler per default, but afaik even there you're free to change it to e.g. the mingw or cygwin provided compiler, or use the icc. (Feel free to correct me on the Visual Studio part as I've only tested it once before completely wiping it forever)
Appendix A: How to check which devices can be used by OpenCL on a given system http://dhruba.name/2012/08/14/opencl-cookbook-listing-all-devices-and-their-critical-attributes/

How do I use the Silicon Laboratories IDE with SDCC?

I'm thinking about using a microcontroller with an 8051 core from Silicon Laboratories.
I hope that I can use C rather than assembly language, so I installed SDCC.
I installed the "Silicon Laboratories IDE" to download the executable binaries to the on-chip Flash program memory.
It also supposedly can be set up (under the Project > Tool Chain Integration menu)
to use "any" 8051 compiler.
I tried to set it up to use SDCC, but every time I hit the "Assemble/Compile File" button it tells me
"Compiler process did not sucessfully complete."
How do I get new C code I write onto the SiLabs C8051F310 chip?
Is there a web site with a step-by-step HOWTO?
(Would it be easier to use a MAKEFILE that calls SDCC, only using the "Silicon Laboratories IDE" for the very last step of downloading the executable binary to the chip?)
Start with Silicon Labs Application Note 198 - INTEGRATING SDCC 8051 TOOLS INTO THE SILICON LABS IDE*. It is written for an older version of the IDE, but the general configuration should remain the same. It is probably important to note that AN198 needs updating for SDCC 3.0.0. Additional information from the Silicon Labs MCU User Forum or Microcontrollers Knowledge Base may prove useful as well.
The SDCC Compiler User Guide* can be useful if additional command line options are desired.
The Silicon Labs USB Debug Adapter can be used with the Silicon Labs IDE and the on-chip debug/programming circuitry of the C8051F310* for programming the MCU and debugging your code.
* PDF Link