Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What program should I use to program an ARM processors

Status
Not open for further replies.
ok, so in segger IDE, It says
  • Professional IDE solution for embedded C/C++ programming
does that mean I can write my code in C/C++ instructions?

Yes.

General for ARM core across compilers:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/BABEDCBC.html#

The rest I found by searching the project files in the project folder :
STM32F30x_Vectors.s (interrupt handler names)

STM32F3xx\CMSIS\Device\Include of the project folder (register definitions and access macros. I've run into errors in these BTW, straight from the chip manufacturer's supplied definition files so be aware if something doesn't seem to work no matter what you do. It's not difficult to fix if you compare against the manual but you do have to sort of understand how the register definition data structures are organized. I learned from skimming them a few times after using them bit. Note the defined types and the way they slot into multiple peripherals of the same type. Sometimes register or bit name definitions don't quite match up with the manual either so be vigilant with unfamiliar peripherals).

The worst was an error in the memory boundary definition of my chip so it would freeze after the program was large enough (rather than due to any specific line of code which worked fine as soon as the program was made smaller): STM32F303RC_MemoryMap.xml
 

Attachments

  • SEGGER Linker User Guide & Reference Manual.pdf
    489 KB · Views: 342
Last edited:
Yes.

General for ARM core across compilers:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/BABEDCBC.html#

The rest I found by searching the project files in the project folder :
STM32F30x_Vectors.s (interrupt handler names)

STM32F3xx\CMSIS\Device\Include of the project folder (register definitions and access macros. I've run into errors in these BTW, straight from the chip manufacturer's supplied definition files so be aware if something doesn't seem to work no matter what you do).

The worst was an error in the memory boundary definition of my chip so it would freeze after the program was large enough: STM32F303RC_MemoryMap.xml

Thanks a ton! one last question, if you dont mind, can I use Arduino IDE and ST Link v2 to program the Microcontroller?
 
ST Link has its own software for uploading standalone files independent of any IDE. Go get it.
 
The ST Link software will upload ANY file of appropriate format regardless of where it comes from. I don't know the name of the software anymore I just know it exists. Just search ST's website. It's probably on the same page, or very close to, the page about the ST Link V2. Don't forget that ST webpages have tabs at the top
 
The ST Link software will upload ANY file of appropriate format regardless of where it comes from. I don't know the name of the software anymore I just know it exists. Just search ST's website. It's probably on the same page, or very close to, the page about the ST Link V2. Don't forget that ST webpages have tabs at the top
Thanks a lot!
 
BTW, you may already know this but the register definitions and setup files are written in C, so if you code in C++, you must use extern "C" on your interrupt handlers or else C++ function name mangling will cause the compiler to not recognize the function namee as an interrupt handler and treat it as a normal function like any other. You will not know why your interrupts aren't working. No errors.They just won't run.

It's the type of problem that has no name you can search for about how to solve because once you know the name, you know the solution.
 
BTW, you may already know this but the register definitions and setup files are written in C, so if you code in C++, you must use extern "C" on your interrupt handlers or else C++ function name mangling will cause the compiler to not recognize the function namee as an interrupt handler and treat it as a normal function like any other. You will not know why your interrupts aren't working. No errors.They just won't run.

It's the type of problem that has no name because once you know the name, you know the solution.

Is this is in the ST Link Software your talking about?
 
No, that is for the compiler, any compiler.

I dont get one thing, now lets say I have the Arduino code ready for a specific use. I just upload this Arduino code to the ST Link software and will it dump to the code? Doesn't the Arduino IDE already come with a compiler?
 
Are we talking about C/C++ or Arduino here? Because Arduino code is not C/C++.

If you have compiled code (doesn't matter what language) you can upload it using the ST link software.

I don't understand what an IDE or compiler has anything to do with this. An IDE packages the compiler into a visual format that is easy to use. A compiler is what actually generates machine code and works behind the scenes. The Arduino IDE does have a compiler in it.
 
Are we talking about C/C++ or Arduino here? Because Arduino code is not C/C++.

If you have compiled code (doesn't matter what language) you can upload it using the ST link software.

I don't understand what an IDE or compiler has anything to do with this. An IDE packages the compiler into a visual format that is easy to use. A compiler is what actually generates machine code and works behind the scenes. The Arduino IDE does have a compiler in it.

I am talking about if I have an Arduino code and the segger IDE you talked. I find Arduino to be easier and gave you an example.

But where is C/C++ coming in this? is it the Segger IDE your talking about?
 
Are we talking about C/C++ or Arduino here? Because Arduino code is not C/C++.

If you have compiled code (doesn't matter what language) you can upload it using the ST link software.

I don't understand what an IDE or compiler has anything to do with this. An IDE packages the compiler into a visual format that is easy to use. A compiler is what actually generates machine code and works behind the scenes. The Arduino IDE does have a compiler in it.

Here they say Arduino code is C++ - https://arduino.stackexchange.com/questions/816/c-vs-the-arduino-language
 
I see the misunderstanding here.

Saying Arduino is C++ is a half-truth. If I can code in C++, I can code in Arduino. But just because you can code in ARduino does not mean you can code in C++. Arduino is C++, but it hidden beneath many layers to make things simple. You can't (without enough experience to code in C++) move Arduino code and the supporting Arduino libraries out of the Arduino IDE into another C/C++ compiler. Therefore, it is best just to think of Arduino has a language that LOOKS like C++, but isn't

C++. Arduino is technically C++, but in practice, Arduino is only C++ if you already know C++. If you only know Arduino then Arduino and C++ are two separate things.

It is a bit like thinking that you can drive a manual transmission just because you know how to drive an automatic transmission since they are both transissions and they are both cars. They are both transmission and they both are cars, but you should treat manual and automatic as as two different things since the skill set is not transferrable (rather, it's only transferrable one-way).

That means that you cannot use Arduino code in an IDE other than the Arduino IDE.

If you want to code C/C++, you can use an IDE like the Segger C/C++ IDE and compiler (a re-branded and re-packaged form of the Rowley Crossworks IDE and compiler).

If you have the file for compiled code already, you can use the ST Link standalone software to upload the code. It doesn't matter what language it was written in or what IDE it was made, as long as it's already compiled it's in machine code so it doesn't matter.

So if all you want is to upload already compiled Arduino code to something other than an Arduino board, you can just use the ST-Link and its standalone software. You don't need the Segger IDE (that's for writing and compiling C/C++ code).
 
Last edited:
I see the misunderstanding here.

Saying Arduino is C++ is a half-truth. If I can code in C++, I can code in Arduino. But just because you can code in ARduino does not mean you can code in C++. Arduino is C++, but it hidden beneath many layers to make things simple. You can't (without enough experience to code in C++) move Arduino code and the supporting Arduino libraries out of the Arduino IDE into another C/C++ compiler. Therefore, it is best just to think of Arduino has a language that LOOKS like C++, but isn't C++.

That means that you cannot use Arduino in an IDE other than the Arduino IDE.

If you want to code C/C++, you can use an IDE like the Segger C/C++ IDE and compiler (a re-branded and re-packaged form of the Rowley Crossworks IDE and compiler).

If you have the file for compiler code already, you can use the ST Link standalone software to upload the code. It doesn't matter what language it was written in or what IDE it was made, as long as it's already compiled it's in machine code so it doesn't matter.

So if all you want is to upload already compiled Arduino code to something other than an Arduino board, you can just use the ST-Link and its standalone software. You don't need the Segger IDE (that's for writing and compiling C/C++ code).


Ah finally understood. So Segger IDE is just purely C/C++ unlike Arduino which is half something and something else.

So even the segger IDE can just be dumped into that ST link software as it doesn't care about which IDE you're using. And with that ST link software I can directly upload that code I have made with the segger IDE to my STM ARM chip via a STM link V2. Correct?
 
Ah finally understood. So Segger IDE is just purely C/C++ unlike Arduino which is half something and something else.

So even the segger IDE can just be dumped into that ST link v2 as it doesn't care about which IDE you're using. And with that ST link software I can directly upload that code I have made with the segger IDE to my STM ARM chip via a STM link V2. Correct?
Yes. The ST Link V2 is stupid. It doesn't know what its uploading or where it came from. Every programmer should come with its own standalone software to let you do this. But some IDEs will have support for specific programmers so you can directly upload from within the IDE without using standalone software (or you can set it up in the IDE yourself).
 
Yes. The ST Link V2 is stupid. It doesn't know what its uploading or where it came from. Every programmer should come with its own standalone software to let you do this. But some IDEs will have support for specific programmers so you can directly upload from within the IDE without using standalone software (or you can set it up in the IDE yourself).

and that's why you were insisting on me using a J link EDU mini for the segger IDE? Because for the ST link V2 I need to download a special software to put code in to my Microcontroller, but for the J link EDU mini, I just need to setup the thing on Segger IDE and plug and play correct?
 
I misunderstood your original question because you had asked for an IDE and started talking about coocox and Keil when you weren't really looking for an IDE at all. What you were really looking for was a way to upload code, not an IDE. So all you need for that is an external programmer and its standalone uploading software.

You could still use the J-Link EDU and its standalone program to upload code though. You don't need the Segger IDE for that.
 
I misunderstood your original question because you had asked for an IDE and started talking about coocox and Keil when you weren't really looking for an IDE at all. What you were really looking for was a way to upload code, not an IDE. So all you need for that is an external programmer and its standalone uploading software.

You could still use the J-Link EDU and its standalone program to upload code though. You don't need the Segger IDE for that.

No actually, I wanted to know which software/application is the best to use to program an ARM micro controller. The reason I asked was because I saw some videos on youtube and they were all in fetch-decode-execute cycle code and had no clue why it was that. The reason why I asked for coocox and Keil was because the tutorials on them, weren't clear and didn't understand how to program a micro controller with these two IDE's. I want to know what are the other free IDE's used to program an ARM processor, like there's a whole wiki page on it here in development tool chains- https://en.wikipedia.org/wiki/List_of_ARM_Cortex-M_development_tools

In this list they say a list of IDE, compiler, linker, debugger, flashing (in alphabetical order), do I just blindly follow them and use the J link EDU mini for all these to upload code?

But the J link EDU mini can also be used for Arduino IDE right? and needs no additional things? And the J link EDU mini can also be used for segger IDE, but its not only restricted to Segger IDE and can be used on other IDE's?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top