I have installed Umbuntu, WSL2, Visual Studio downloaded all ardupilot files
and can see all ardupilot cpp / h files in the VS explorer.
In the directory TARGET_DIR I have extracted the compiler: gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux. So far all is fine.
The question is now: What do I have to do in Visual Studio to build the arducopter cpp files with the recomended compiler to obtain a binary file that I can flash on my Mateksys H743-Wing flightcontoller?
By the way: if I use the command: @DESKTOP-EAFPR3D:~/ardupilot$ ./waf configure --board MatekF405-Wing
I have the following error message:
Could not find the program [âarm-none-eabi-arâ]
but that is just in the directoy below: @DESKTOP-EAFPR3D:~/ardupilot/TARGET_DIR/gcc-arm-none-eabi-10-2020-q4-major
That worked fine. The result is: âconfigureâ finished successfully
Your question: what I am trying:
First of all: I try to set up a properly working IDE in umbuntu
Yes your are right. It is VS Code (not Visual Studio)
The IDEs that I am using now are âMicrochip Studioâ for my Atmega Projects and STM32CubeIDE for my STM32 projects.
Next I will start to examine the âschedulerâ in Copter.cpp
I assume that is the starting point of the ArduCopter software.
When I am more familiar with it I will try to study the âKalmann Filterâ part.
Long time ago that was my - you would call it today âmaster thesisâ
Another observation:
I modified the file Copter.cpp in a way that it cant pass the compiler without error,
but that command made it:
./waf configure --board MatekF405-Wing
it passed without error - why that ? because it took the source files from the git reosirory
Source is git repository : yes
That is not my intention. I want to see, which changes in the source have which kind of effect.in the real copter world
[quote=âYuri_Rage, post:4, topic:110561â]
building from source.
[quote=âYuri_Rage, post:4, topic:110561, full:trueâ]
You didnât compile anything. You just configured the compilation environment. Please read the entire documentation section on building from source.
All of your questions are answered there in reasonable detail (including a warning not to use Cygwin and Eclipse, which you tried anyway).
Thanks for your quick reply.
Will study the documentation building from source
Now the result of studying:
With the help of a family member (professionally involved in IT) we found it out a command that is working:
./waf --targets bin/arducopter --board=MatekF405-Wing
It takes some minutes. It is Checking for env.py
Creating build/MatekF405-Wing/hwdef.h**
[ 4/10] Creating build/MatekF405-Wing/modules/ChibiOS/include_dirs
[ 5/10] Compiling libraries/AP_Scripting/generator/src/main.c
[ 6/10] Processing modules/mavlink/message_definitions/v1.0/all.xml
[ 7/10] Creating build/MatekF405-Wing/ap_version.h
[ 8/10] Creating build/MatekF405-Wing/chibios_flags.h
[ 9/10] Linking build/MatekF405-Wing/modules/ChibiOS/libch.a
[10/10] Processing /home/bernhard/ardupilot/build/MatekF405-Wing/libraries/
then there is: ChibiOS: Compiling 111 files
i takes a while - then:
ChibiOS: Done!
arm-none-eabi-ar: creating modules/ChibiOS/libch.a
then it is compiling 922 cpp files !
that takes some minutes, but in the end it is:
Linking build/MatekF405-Wing/bin/arducopter
.Generating bin/arducopter.bin
Build directory: /home/bernhard/ardupilot/build/MatekF405-Wing
wow - I am impressed
and in the directory:
~/ardupilot/build/MatekF405-Wing/bin
I find those files: