ARM programming in ubuntu with C\C++

Click For Summary

Discussion Overview

The discussion revolves around learning ARM programming using C/C++ on Ubuntu, focusing on tools, platforms, and approaches for both embedded and general programming. Participants explore options for software development environments, hardware platforms, and the nature of embedded systems.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests starting with the Raspberry Pi and using NetBeans for remote compilation, highlighting its accessibility.
  • Another participant inquires about simulators for testing code without hardware, noting the lack of full hardware simulators for the Raspberry Pi.
  • Discussion arises about the range of ARM processors, from simple microcontrollers to more complex systems, and the implications for programming.
  • Some participants argue that programming for ARM on a Linux system is conceptually similar to programming for Intel, with the CPU being relevant mainly for compiler settings.
  • One participant emphasizes the distinction between developing for full operating systems versus bare-metal programming for embedded systems, suggesting that the latter presents unique challenges.
  • Another participant recommends specific development boards from Cypress and NXP for bare-metal programming, noting their affordability and capabilities.
  • There is a discussion about the definitions of embedded systems, with some participants challenging the notion that they lack operating systems, citing modern examples that utilize real-time operating systems.

Areas of Agreement / Disagreement

Participants express differing views on the nature of embedded systems and the relevance of operating systems in their programming. While some agree on the similarities between ARM and Intel programming in a Linux context, others highlight the unique aspects of embedded programming that complicate this comparison. The discussion remains unresolved regarding the definitions and characteristics of embedded systems.

Contextual Notes

There are assumptions made about the OP's goals and the nature of embedded systems that may not be universally accepted. The discussion includes varying definitions of embedded systems and the resources available for programming them.

ShayanJ
Science Advisor
Insights Author
Messages
2,802
Reaction score
605
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
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
 
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.
 
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
 
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!
 
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:

Similar threads

  • · Replies 102 ·
4
Replies
102
Views
4K
  • · Replies 30 ·
2
Replies
30
Views
5K
  • · Replies 14 ·
Replies
14
Views
2K
Replies
86
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 27 ·
Replies
27
Views
17K
  • · Replies 25 ·
Replies
25
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
69
Views
11K