Hallo,
Ich versuche mit Hilfe der Anleitung bei GitHub (https://github.com/fischertechnik/txt_demo_c_download/) meinen TXT-Controller mit C/C++ zu programmieren.
Dabei verwende ich die TXT firmware (V4.6.6), FtTxtWorkspace.zip (V1.2.1), gcc-linaro-7.2.1-2017.11-i686-mingw32_arm-linux-gnueabihf und eclipse 2020-06 (4.16.0). Eclipse habe ich fertig eingerichtet und die Beispielprogramme lassen sich kompilieren und ausführen.
Da ich Programmieranfänger bin, sind mir viele Dinge noch unklar.
Was enthält das Linaro-Paket? Den Compiler?
Wo finde ich die C/C++-Befehle (mit Erklärung) für den TXT-Controller, z.B. für die Ein- und Ausgänge von den verschiedenen Sensoren.
Ich freue mich über jede Hilfe.
TXT C/C++ Programmierung
Forumsregeln
Bitte beachte die Forumsregeln!
Bitte beachte die Forumsregeln!
Re: TXT C/C++ Programmierung
Because the whole documentation of the txt-Demo_download, Eclipse, Linaro, C11++/C14++ etc. is in English, my reply is also in English.
(you can always make use of Goolgle translate)
Creating C/C++ suppose some basic knowledge about C/C++ programming and how compilers are operating.
It suppose also that you are able to search and filter information on the internet.
Hereby some hints .
The application development is with Eclipse on a MS-Windows system.
a)
This is a complete toolchain, containing a cross compiler, a linker a library manager, etc. A toolchain create the executable code or libry code for the ARM-system on the windows machine (X64). The TXT is a ARM system.
After creating the code, the code needs to be uploaded to the TXT.
for more background knowledge, see for example:
https://www.definitions.net/definition/toolchain
https://stackoverflow.com/questions/227 ... s-compiler,
https://en.wikipedia.org/wiki/Toolchain
https://en.wikipedia.org/wiki/Cross_compiler
b)
Your program is communicating with the sensors and actuators through the so called transfer area. A shared memory space between the user application and the thread that control directly the hardware.
The TA (transfer area) is the way that your program communicate with the hardware Input/Output section(thread).
Your application is reading the input sections of the TA and writing into the output sections.
TA the other hand the Input/Output section(thread) reads the output section and use that information to set the Motor/Output of the TXT it also reads the sensors Inputs and write this data into the TA.
The demo's 01, 02, 03, 05, 06 and 07 give examples of the use of the TA.
The TA has been describe in FtTxtWorkspace/TxtDeps/Txt_Includes/FtShmem.h.
The same TA is in use with the txt_demo_c_online programming.
In the main.cpp of TestProj02 you will find more example about the use of the TA.
https://github.com/fischertechnik/txt_d ... TestProj02
This year I already gave a online course TXT SLI programming.
When I have time I consider to do the same for local programming, on line or during the Ft-convention in October.
(you can always make use of Goolgle translate)
Creating C/C++ suppose some basic knowledge about C/C++ programming and how compilers are operating.
It suppose also that you are able to search and filter information on the internet.
Hereby some hints .
The application development is with Eclipse on a MS-Windows system.
a)
gcc-linaro-7.2.1-2017.11-i686-mingw32_arm-linux-gnueabihfWas enthält das Linaro-Paket? Den Compiler?
This is a complete toolchain, containing a cross compiler, a linker a library manager, etc. A toolchain create the executable code or libry code for the ARM-system on the windows machine (X64). The TXT is a ARM system.
After creating the code, the code needs to be uploaded to the TXT.
for more background knowledge, see for example:
https://www.definitions.net/definition/toolchain
https://stackoverflow.com/questions/227 ... s-compiler,
https://en.wikipedia.org/wiki/Toolchain
https://en.wikipedia.org/wiki/Cross_compiler
b)
There are no higher level commands as you are uses with for example: RoboPro, txt_demo_c_online extension02, FtRoboPy.Wo finde ich die C/C++-Befehle (mit Erklärung) für den TXT-Controller,
Your program is communicating with the sensors and actuators through the so called transfer area. A shared memory space between the user application and the thread that control directly the hardware.
The TA (transfer area) is the way that your program communicate with the hardware Input/Output section(thread).
Your application is reading the input sections of the TA and writing into the output sections.
TA the other hand the Input/Output section(thread) reads the output section and use that information to set the Motor/Output of the TXT it also reads the sensors Inputs and write this data into the TA.
The demo's 01, 02, 03, 05, 06 and 07 give examples of the use of the TA.
The TA has been describe in FtTxtWorkspace/TxtDeps/Txt_Includes/FtShmem.h.
The same TA is in use with the txt_demo_c_online programming.
In the main.cpp of TestProj02 you will find more example about the use of the TA.
https://github.com/fischertechnik/txt_d ... TestProj02
This year I already gave a online course TXT SLI programming.
When I have time I consider to do the same for local programming, on line or during the Ft-convention in October.
Re: TXT C/C++ Programmierung
@O.Smolarz
There is now a small overview (first beta version) of the transfer area available in the txt_demo_c_download repository.
I hope that this well help you for better understanding the communication between the application and the `MotorIOLib` controller on the TXT.
There is now a small overview (first beta version) of the transfer area available in the txt_demo_c_download repository.
I hope that this well help you for better understanding the communication between the application and the `MotorIOLib` controller on the TXT.