ARM programming in ubuntu with C\C++

In summary: There are also some Arduino variants with ARM processors. They are more of a middle ground with most of the bring up done under the covers.Arduino is a popular choice for embedded programming. But there are other options as well.
  • #1
ShayanJ
Insights Author
Gold Member
2,810
604
I'm thinking about learning ARM programming with C\C++(I think C is a better choice though). But I don't know what tools I can use on linux(ubuntu). I prefer to use open source software. Is there any suggestion?

Thanks
 
Technology news on Phys.org
  • #3
  • #4
  • #5
What kind of applications are you thinking of? Arm processors range from tiny 8 pin devices with a few K of code space all the way up to mainframe level servers.

Something like the RPi is an easy start to embedded programming as it gives you a full operating system and all of the connectivity you could ask for. Conceptually it is identical to your PC. It could actually replace your PC if you don't need too much whiz-bang. You are not really doing "ARM" programming any more than you are doing "INTEL" or "AMD" programming on a full sized computer. You are doing LINUX programming. The CPU is only relevant as far as the compiler switches are concerned.

There are smaller boards form several manufacturers that cost $10-$20 with debug capability. NXP and Cypress are two I am familiar with. These are parts you can experience bare metal ARM programming if that is the direction you want to go. It is bit of a deeper plunge but you come out the other end with a less common valuable skill-set.

There are also some Arduino variants with ARM processors. They are more of a middle ground with most of the bring up done under the covers.

BoB
 
  • #6
rbelli1 said:
What kind of applications are you thinking of? Arm processors range from tiny 8 pin devices with a few K of code space all the way up to mainframe level servers.
One of my friends works in a lab and designs and makes circuits for using on sensors. I got the idea from him. I have such little devices in mind
rbelli1 said:
You are doing LINUX programming. The CPU is only relevant as far as the compiler switches are concerned.
As far as I know, those IDEs that let you write code for an embedded system use cross compilers to compile the code for a target platform. So you're not developing software for the machine you're using to develop the software.
 
  • #7
My point was that writing a program for a LINUX computer that happens to be an INTEL CPU or writing for one that happens to be an ARM CPU is not really different. The RPi will have some different drivers for the embedded parts but everything else will be the same. You could actually write software for a LINUX PC on the RPi just as easily as the other way around.

We are all making assumptions about what the OP wants. We can't really be any more helpful until Shayan.J clarifies.

BoB
 
  • #8
rbelli1 said:
My point was that writing a program for a LINUX computer that happens to be an INTEL CPU or writing for one that happens to be an ARM CPU is not really different. The RPi will have some different drivers for the embedded parts but everything else will be the same. You could actually write software for a LINUX PC on the RPi just as easily as the other way around.

We are all making assumptions about what the OP wants. We can't really be any more helpful until Shayan.J clarifies.

BoB

I'm Shayan.J, I'm the OP!

Anyway, what you say is correct, but only if we're using a linux systim running on an intel CPU to develop software for a linux system running on an ARM microprocessor(can I call this a CPU too?). But embedded systems are systems with limited resources that have no operating system installed on them. That's the thing that breaks the symmetry!
 
  • #9
So you are looking to do some bare metal ARM micro-controller programming. Check out Cypress' PSOC5LP boards. They have programmable digital and programmable analog included. The smallest one is only $10. You probably want a USB extension cord as well for ease of use.

NXP also has a super cheap line of all in one dev boards. They tend to be a bit more powerful but have no programmable logic.

I just checked and many of the micro-controller manufacturers have them now.

All of them can be used with open source software but limited versions of various closed source software is included with each board. It might be easiest to use that to learn the ARM part of the equation then move to the open source variation later.

BoB
 
  • #10
Shayan.J said:
I'm Shayan.J, I'm the OP!

Anyway, what you say is correct, but only if we're using a linux systim running on an intel CPU to develop software for a linux system running on an ARM microprocessor(can I call this a CPU too?). But embedded systems are systems with limited resources that have no operating system installed on them. That's the thing that breaks the symmetry!

That's not a proper definition of embedded systems. Embedded systems (even fairly old systems) often have Unix like Real-Time OS software today. Individual modules like a 8-bit micro-controller might be bare-metal programmed but usually now at the 32-bit level there are sufficient resources for full embedded OS systems and things like FreeRTOS or Harmony that are more of a Framework between a full OS and bare-metal programming.
 
Last edited:

1. What is ARM programming and how is it different from other types of programming?

ARM programming is a type of programming that involves writing code specifically for ARM (Advanced RISC Machine) processors. These processors are commonly used in mobile devices, such as smartphones and tablets. ARM programming is different from other types of programming because it utilizes a different instruction set architecture and requires a thorough understanding of the ARM processor's architecture and features.

2. Can I use C or C++ to program for ARM in Ubuntu?

Yes, you can use C or C++ to program for ARM in Ubuntu. In fact, C and C++ are the most commonly used languages for ARM programming. Ubuntu also has a wide range of tools and libraries available for ARM development, making it a popular choice for ARM programmers.

3. Is there a specific compiler or IDE for ARM programming in Ubuntu?

Yes, there are several compilers and IDEs available for ARM programming in Ubuntu. Some popular options include GNU Compiler Collection (GCC), ARM Development Studio (DS-5), and Eclipse with the GNU ARM Eclipse plugin. It is recommended to research and choose the best option based on your specific needs and preferences.

4. Are there any challenges or limitations when programming for ARM in Ubuntu?

One potential challenge when programming for ARM in Ubuntu is the need for cross-compilation. This means that the code must be compiled on a different platform than the one it will run on. Additionally, some libraries and tools may not be fully compatible with ARM in Ubuntu, so it is important to ensure compatibility before starting a project.

5. Are there any resources or tutorials available for learning ARM programming in Ubuntu with C/C++?

Yes, there are many resources and tutorials available for learning ARM programming in Ubuntu with C/C++. Some recommended resources include online tutorials, books, forums, and community groups dedicated to ARM development. It is also helpful to practice and experiment with sample code and projects to gain hands-on experience.

Similar threads

  • Programming and Computer Science
Replies
30
Views
2K
  • Programming and Computer Science
Replies
3
Views
2K
  • Programming and Computer Science
Replies
3
Views
2K
  • Programming and Computer Science
Replies
1
Views
982
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
27
Views
14K
  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
1
Views
718
Replies
6
Views
1K
  • Programming and Computer Science
2
Replies
49
Views
3K
Back
Top