-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Difficulty in starting work #270
Comments
Thanks for your query @sami1369. Let's start with some basics. You can obtain the code by simply clicking on the green "Code" button and downloading the ZIP archive. See the picture below. |
Once you have downloaded the project, we can build one of the samples or the reference application. i can help you along those lines. What Operating System are you using? |
Hi Christopher,
I searched for your email, but unfortunately, I was not successful. I had
to send a message here to you.
My hardware is Arduino UNO, and I don't know what I should do to compile
and upload it on the board?
Kind regards,
Saeid
…On Sat, 16 Jul 2022 at 16:07, Christopher Kormanyos < ***@***.***> wrote:
Once you have downloaded the project, we can build one of the samples or
the reference application. i can help you along those lines.
What Operating System are you using?
—
Reply to this email directly, view it on GitHub
<#270 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHJCHM2HF7YQVA53SFNHSG3VUKNG7ANCNFSM53V7SZMQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes, I downloaded it and put it in a folder where Mingw-w64 is there |
OK. Good. There are several ways to build and use the companion code. Builds are supported on LINUX, Windows, using GNUmake or CMake. But you are right, the build possibilities can, in fact, be confusing when starting. A lot of folks have used LINUX systems. Others use Windows. A build system specifically targeting MinGW is not explicitly supported but probably would work with a bit of effort. It can be easiest to first build for the Windows/LINUX host (in a command shell). As a second step, you can go for an embedded target build. Of the following choices, how would you like to start?
Believe it or not, choice 5 can be extremely straightforward, requiring no added installations, just getting the toolchain, unpacking, moving it and executing the build command line. These exact instructions are shown here. But instead of building with MSBuild (as shown on line 589), a simple command line could be used. Please don't hesitate to ask questions here as you proceed. It's good to have this as a reference thread in the issues. |
If you diecde to go this way, that can be simple. When you've unpacked the toolchains, I can provide you with help regarding setting up the command line to build for Windows host. |
I downloaded it twice, but the file has a problem and cannot be unpacked. Since it has a large volume, let me download and unpack it again; maybe the problem will be solved. |
I just downloaded the I'm not sure what your favorite unpacker is, but I've had good results with 7-zip. It might not be a great idea to store such large archives at GitHub, but it is at the moment working and there is not at the present time an alternative storage location for these particular builds of the toolchains. |
Thanks, I downloaded 7-zip.
I could unzip toolchains
What is the next step?
Thank
…On Wed, 20 Jul 2022 at 18:22, Christopher Kormanyos < ***@***.***> wrote:
I just downloaded the real-time-cpp-toolchains repository as a ZIP
archive from GitHub and unpacked it with 7-zip. For me it works fine.
I'm not sure what your favorite unpacker is, but I've had good results
with 7-zip.
It might not be a great idea to store such large archives at GitHub, but
it is at the moment working and there is not at the present time an
alternative storage location for these particular builds of the toolchains.
—
Reply to this email directly, view it on GitHub
<#270 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHJCHMYERAMCSF4YZGNGGLLVVAAC3ANCNFSM53V7SZMQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
In your case, I recommend to build for the Windows host on the command line as a first step. The later steps get you building for the embedded AVR controller. But taking an intermediate step to build for a PC will hopefully boost your confidence and provide a much better feeling for how the build system and toolchains all fit together. So you need to move a directory, unpack a self extracting ZIP and issue a command line. You should set up a topology like this (where you simply have the unpacked repositories real-time-cpp (master) and real-time-cpp-toolchains (master). See the image below. Now you need to do a few manual steps.
Now we will build for Windows host.
I found an actual bug in the toolchain. So when building, just click OK on any DLL windows that pop up. I will correct this bug soon. |
As a second step, if you like this kind of build, we should get you set up with Visual Studio Community 2022, where you can enjoy the comfort of this build in that GUI. Cc: @sami1369 |
Issues with setting target build in MacOS. Created its own issue thread here |
Hi Jeff (@jvco98), I'll take a bit more time for this later. Could you please create another issue for this independent point? I would like to also take this opportunity to sue up some more target builds on MacOS in the Ci setup as we progress. |
OK. It looks mostly there. The build command is successfully finding GNUmake version 4.2.1. Good job @sami1369. The next issue is that the make system (within the calls executed in GNUmake) is not finding the x86_64 compiler. You also need to unpack the compiler, which has been cloned as a self-exctracting zip archive. Did you remember unpack the mingw x86_64 compiler? |
Yes. My apologies, but the Windows build is actually one of the more complicated ones. That actually looks good. I'm somewhat surprised the compiler can't be found. Have you tried to run the build again? |
You can also try to manually run the command shown in the failed run above that prints the GCC compiler version. That should at least tell us if the compiler is present and running without using any batch or shell complications. Try something like (within the tools\Util\msys64\usr\local\gcc-11.2.0-x86_64-w64-mingw32\bin\g++ -v |
Is there a different way to compile? |
There several ways to compile on Windows, LINUX and MacOS for each supported target. Each method is described briefly in the documentation at the GitHub page for real-time-cpp, starting around here. We use GNUmake, CMake, ATMEL Studio, Visual Studio, Bash or CMD line depending on the situation. |
My first compilation for standalone AVR years ago used ATMEL Studio available now from MICROCHIP. ATMEL Studio is supported in this repository for the reference application. Some developers use ARDUINO development environment to learn. This is different from the standalone approach used in this repository, but a great way to familiarize yourself with the AVR world. |
The Arduino development environment is an appropriate choice for me because I tackle with every day. I can use Arduino UNO or ESP32. I can even work with stm32F1xxx series if you have any suggestions. Even though Arduino is more accessible to me. Now, It is only important for me to be able to continue your book with exercise. |
Hi @sami1369 I think you are actually rather close to building the reference application either for AVR or for an ARM based core. Please note that all the book's example projects are actually tested for and developed for an AVR controller, often times using self-made boards in a DIY fashion. I would like to know how far you got when building the reference application. Where did things stop working? If you would like to simply install MICROCHIP's ATMEL Studio (available from internet), it can be very straightforward to build the reference application and all the book's examples. Also each target/example is built in the Continuous Integration script. If you could select one method, I'm pretty sure you are not that far from getting the reference application built and running on a board. In your opinion, how far did you get and what seems to be failing or breaking down for your build(s)? |
Hi Christopher,
I want to practice while reading the book and I think that Atmel Studio is
suitable so that I can compile the book's examples and upload them on AVR
boards like Arduino UNO that use an ATmega328. Could you please let me
know if this is your suggestion?
and can I use book libraries in Atmel Studio?
…On Tue, 23 Aug 2022 at 10:53, Christopher Kormanyos < ***@***.***> wrote:
Hi @sami1369 <https://github.com/sami1369> I think you are actually
rather close to building the reference application either for AVR or for an
ARM based core.
Please note that all the book's example projects are actually tested for
and developed for an AVR controller, often times using self-made boards in
a DIY fashion.
I would like to know how far you got when building the reference
application. Where did things stop working?
If you would like to simply install MICROCHIP's ATMEL Studio (available
from internet), it can be very straightforward to build the reference
application and all the book's examples. Also each target/example is built
in the Continuous Integration script.
If you could select one method, I'm pretty sure you are not that far from
getting the reference application built and running on a board.
In your opinion, how far did you get and what seems to be failing or
breaking down for your build(s)?
—
Reply to this email directly, view it on GitHub
<#270 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHJCHM2MIGFMVRXUIWCORH3V2RU6DANCNFSM53V7SZMQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes @sami1369. This is my suggestion based on our discussion up to this point. This is a very simple and good way to use the book's examples on the Windows platform. Both the reference application as well as each example project (from the book's chapters) have project workspaces for MICROCHIP's ATMEL Studio. So if you install ATMEL Studio, you can open any of the For example, if you would like to build the reference application (ref_app), you will find Each example has its corresponding |
Hi @sami1369, a bit more added informatioon in this post... If you decide to use ATMEL Studio, you should not need any other libraries for these projects other than those that are installed during the standard installation of ATMEL Studio. The first couple of projects can use the ARDUINO board directly. Later chapters in the book need additional components. Chapter4's examples, for instance, uses additional LEDs that need to be provided. I decided to make a custom board, as shown here. Other examples use even more customization. |
Hi Christopher,
I use this link to run book examples by the link attached.
https://www.instructables.com/How-to-Load-Programs-to-an-Arduino-UNO-From-Atmel-/
Thank you
…On Wed, 24 Aug 2022 at 10:47, Christopher Kormanyos < ***@***.***> wrote:
If you decide to use ATMEL Studio, you should not need any other libraries
for these projects other than those that are installed during the standard
installation of ATMEL Studio.
The first couple of projects can use the ARDUINO board directly. Later
chapters in the book need additional components. Chapter4's examples, for
instance, uses additional LEDs that need to be provided.
—
Reply to this email directly, view it on GitHub
<#270 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHJCHMZMZWLJHLCYZUQT4OTV2W467ANCNFSM53V7SZMQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thank you for providing this informative link. Does this mean that you can now use ATMEL Studio to build and successfully flash some of the examples into your ARDUINO device? Or do you need more assistance? |
Yes, it works.
I tested some examples
…On Wed, Aug 31, 2022, 5:09 PM Christopher Kormanyos < ***@***.***> wrote:
I use this link to run book examples by the link attached.
Thank you for providing this informative link.
Does this mean that you can now use ATMEL Studio to build and successfully
flash some of the examples into your ARDUINO device?
—
Reply to this email directly, view it on GitHub
<#270 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHJCHM7YGBRQ6C5FUT7FLH3V35HANANCNFSM53V7SZMQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Great! Good work keeping going to success. I'll close this issue now. If any other issues arise, please feel free to raise another issue any time. Kind regards, Chris |
The book and git don't have a proper tutorial to start with and the content is very confusing.
Please help me to upload the code in the right way
Regards
The text was updated successfully, but these errors were encountered: