Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
What exactly do you mean when you say "program" a microcontroller? Do you mean writing and compiling code? Or uploading the code?
That did not answer my question. You just described what you want the processor to do, which is not what I asked for.I mean, write/have a code to run a motor/turn an LED on/display some characters on a LCD display etc. This is what I mean when I say program a micro controller.
That did not answer my question. You just described what you want the processor to do, which is not what I asked for.
What if I put it this way:
ANY external hardware programmer can upload machine code from anywhere, written in anything, as long as it is already compiled as long as yo use the programmer's standalone software.
An IDE and the compiler and linker inside it in it is used to write code and compile it into machine code.
If the IDE is properly set up for the programmer, you can upload code directly inside the IDE without needing to use the programmer's standalone software.
The Segger IDE, specifically, seems to use the J-Link as a license dongle so you need it it plugged into to compile code.
"Uploading" and "flashing" mean the same thing.
Debugging requires a programmer(also called a debugger in this case) that has debugging capability. Debugging also requires the IDE to be set up properly for debugging with the specific programmer. This lets you observe memory inside the processor as the code is executing so you need the IDE.
You plug the computer straight into the Arduino right? There is no "box in between the PC and the Arduino? That "box" is the external programming hardware (also called the programmer or the debugger).ok, my thinking/assumption for every Microcontroller hardware programming is like using the Arduino Boards with Arduino IDE.
You plug the computer straight into the Arduino right? There is no "box in between the PC and the Arduino? That "box" is the external programming hardware (also called the programmer or the debugger).
If you can plug the computer straight into the Arduino, it either means that the Arduino has the circuitry for the programming hardware on the board already, or there is a bootloader inside the processor so the it can interpret the signals from the desktop computer and program itself.
The Arduino IDE is obviously made to work with the stuff in the above paragraph. So the Arduino IDE makes it seamless to write, compile, and upload code (there is also technically a linker step after you compile). In general, these are three different stages. Even writing code and compiling code might be separate stages (some people write their code in a text editor, use a command-line compiler to generate the machine code, and upload the code with a programmer and its standalone software).
The best and most convenient possible setup is where you can stay in the IDE for everything like you can in the Arduino IDE programming an Arduino board, or using the Segger IDE with the Segger J-Link. But if you are trying to use Arduino code with something other than an Arduino board, this is no longer the case so the different steps start becoming broken out.
Yes. It was always like that but things have gotten more integrated and convenient. But if you do something out or the ordinary those things becomes separated again.So to write code, one application is used, to compile it another one, to execute it/upload the code another one correct?
So when using the Segger IDE, what is the "box", the "writing code application", the "compiling code application" and "uploading code app"?
so the people at Arduino have made life simpler by putting all these three into one app and given us to download it on their webpage correct?Yes. It was always like that but things have gotten more integrated and convenient. But if you do something out or the ordinary those things becomes separated again.
so the people at Arduino have made life simpler by putting all these three into one app and given us to download it on their webpage correct?
Yes. It was always like that but things have gotten more integrated and convenient. But if you do something out or the ordinary those things becomes separated again.
The box would be something like the J-Link or the ST-Link V2. It's some piece of electronics that sits in between the processor and the desktop computer (though it might also be built onto the board in some cases).
IDE stands for Integrated Development Environment so it combines the writing and compiling code parts. It might also combine the uploading code part if it supports the "box" and is properly set up for it.
Yes, the Segger obviously wants you to use both their J-Link and their IDE so they have already set up the Segger IDE to work with the J-Link. It will not work out-of-the-box with the ST-Link (though you can configure the IDE to work with the ST-Link if you know what you are doing).So segger IDE has the writing and compiling code parts, and I need to setup the "box" for it to upload the code, which segger IDE does with the J link EDU mini and not with the ST link V2.
Yes, the Segger obviously wants you to use both their J-Link and their IDE so they have already set up the Segger IDE to work with the J-Link. It will not work out-of-the-box with the ST-Link (though you can configure the IDE to work with the ST-Link if you know what you are doing).
That means that if you want to use the Segger IDE to write and compile code but upload code with the ST-Link, you either have to configure the Segger IDE to work with the ST Link, or you have to compile the code in the Segger IDE into a file type that the ST-Link can upload (i.e. s-record, hex, binary, ELF etc.) and then go use the ST Link standalone software to upload the code.
The problem with that is that the Segger IDE won't compile code without a J-Link connected (not unless you buy a standalone software license). I think it has something like a trial period but that time limits disappears while you have a J-Link connected.
I remember when I was sitting there wondering how on Earth I get a desktop PC to connect to a bare chip. It didn't seem like the chip could do it on its own natively.
Expect to spend a lot of time reading line by line through the registers on datasheets when you start working with a new processor or peripheral. Once you have things set up though it's not so bad but it's a PITA to set up anything new so code cleanly and legibly the first time around so you can re-use it. The actual separation of uploading software and IDE is not so bad though.xD Same here, Arduino spoilt me with its easy to use IDE. I realised life is not easy now.
so the people at Arduino have made life simpler by putting all these three into one app and given us to download it on their webpage correct?