Skip to content
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

Project Help #19

Open
Julspower opened this issue Oct 11, 2021 · 30 comments
Open

Project Help #19

Julspower opened this issue Oct 11, 2021 · 30 comments

Comments

@Julspower
Copy link

Hi
I coulnd't find your email and I don't know why homebuild forum doesn't work with me.
I do have a RV7A and electronic knowledged. I kinda have a similar project in work but im not completly to the efis point
im currently building hardware control and sensor for different part, like light and trim controller.
do you still work on your project? maybe we could converge to the same goal

@sam-itt
Copy link
Owner

sam-itt commented Oct 11, 2021

Hi,

My email is samuel.cuella@gmail.com. I didn't get any message notification from HBA in a while :).

I'm still working on the project although at a reduced pace. I've nearly finished putting together a menu system that will allow users to do a "go to" with the map. That is the next thing that will be integrated and pushed on github. I've just finished moved in a new home, a new hangar for the plane and I'm currently doing my annual inspection, thus time is scarce right now. I will make more progress on SoFIS as winter comes in.

I'll be glad to work/converge with someone that more into electronics. I'm pretty bad at it :).

@Julspower
Copy link
Author

That sound like a good news
I live in québec btw
where would you like to talk mostly here or email or somewhere else?
Im good with electronic design and pcb and not decent at programming. I also have a 3d printer if you want to test some enclosure.

currently I have a pi Zero w that I can remote debug my application (only artificial horizon yet) on it and a small 9 axis board a nice 10inch 1000nits lcd. I haven't touch that part for a year tho (too much project)

Currently im working on lights and lights controller for my father next plane.
tell me what you have as vision we'll see we could probably work together :D

@sam-itt
Copy link
Owner

sam-itt commented Oct 13, 2021

Just a quick answer to ack to your message. I'm really busy for next couple of days, I'll get you a real/full answer afterwise (this weekend hopefully).

@sam-itt
Copy link
Owner

sam-itt commented Oct 18, 2021

where would you like to talk mostly here or email or somewhere else?

For that kind of discussion who tend to get lengthy I prefer email

Im good with electronic design and pcb and not decent at programming. I also have a 3d printer if you want to test some enclosure.

That is exactly what I need. What I would like to see is to get data from sensors like engine temperature (water/oil), engine rpm, airspeed with a sensor like this one. I'm a thinking about having an arduino (or alike) talk with the sensors + do the ADC and send all the values to the RPI through a serial line.

currently I have a pi Zero w that I can remote debug my application (only artificial horizon yet) on it and a small 9 axis board a nice 10inch 1000nits lcd. I haven't touch that part for a year tho (too much project)

Nice! Is your code public? I have more features but nothing is on a real plane yet. I have a friend who is going to be an alpha tester, he is currently rebuilding his panel and I'm waiting for the screen etc to pre-assemble everything so he can mount it.

Currently im working on lights and lights controller for my father next plane.
tell me what you have as vision we'll see we could probably work together :D

For short I want to create something that anyone can build with off the shelf parts while providing similar functions than an uncertified glass cockpit. Open source so that the project can live on and get code/interest from others. I also think that you surely can help the project with your skills/equipment :)

@Julspower
Copy link
Author

you leave me with a cliffhanger like that... what do you prefer :D, btw my email is julien_gingras@hotmail.com

for communication between the sensor and the Pi or between them I thought to use uavcan, https://uavcan.org/
can is pretty robust low level hardware uavcan will be the layer above for protocol. The module I have designed yet all have a can transceiver. but unfortunately due the global semiconductor shortage I haven't test it yet.

the code isn't public but it isn't close either ill try to create a git for it to share (im using qt and there is probably code in french in there :D)

I think our goal are pretty much aligned, im used the the MGL efis (the one I have in my rv7) moving map may be complicated for me since the official vnc map are not free, there are source like skyvector that I could pick the map from but im not at that point im pretty sure youll get there before me. So I will focus on designing hardware and communication with my RPi (I also have a new cm4 with a mirko pc under it which can have a ssd, so pretty much unlimited storage space :D, thats the part im working while I wait for new pcb for a new power supply since there no part for the one I already designed...)
I also looked into "synthetic vision" like a view of the cockpit with the mountain, but working in 3d trying to show mountain and elevation warning is hard for me at the moment and would require some learning on my part but seem your project has already done a lot on that part.

So I will continue to work on module and sensor (now some light and the light controller, then the trim controller (which I already have a pcb), then probably on trying to do a decent ahrs (you can read that page for another great project here: https://www.pittnerovi.com/jiri/hobby/electronics/avionics/index.html)
then im thinking to a power supply virtual fuse, much like vpx system from vertical.
And of course all those will be highly experimental, you might be crazy to fly only with those (which I am I guess) but with dual everything and maybe an old airspeed dial you might feel safe :D.

So hit me up if you need anything might be you just want to talk about idea or you want me to tests something (ill try to run your code soon) and ill put up a git for my program I currently have

@Julspower
Copy link
Author

I did clone your git on my raspberry and tried to build it
no luck on my side due to depedency SDL_gpu.h: No such file or directory
trying to build sdl-gpu gave me more error

@Julspower
Copy link
Author

I was able to build sdl-gpu and install it but still have and sdl_gpu.h error when building sofis

@sam-itt
Copy link
Owner

sam-itt commented Oct 21, 2021

Can you please provide the full build log? I'll look into it. You can also use a pre-built image with everything from here.

@Julspower
Copy link
Author

https://pastebin.com/9qsSxWNt
here are the log while I follow the instruction to build sofis

@Julspower
Copy link
Author

I found out that if I include "SDL2/SDL_gpu.h" instead of just "SDL_gpu.h" at all the places in your code I get a little further but still doesn't compile
for that part im guessing its just an include missing because the sdl_gpu lib is inside a directory: "/usr/local/include/SDL2/"

@Julspower
Copy link
Author

Here is what I have yet
https://github.com/Julspower/JulsEfis
don't ask me how to compile it.
been more than a year im not sure I remember, I know im remote running and debugging it on my pi zero that is hooked to my lcd.

here is the code I was working on to get the right calibration on boot
https://github.com/Julspower/ReadEEprom

and the motion module I use for this is: https://github.com/kriswiner/EM7180_SENtral_sensor_hub
he did write some pretty interresting stuff on motion sensor and ahrs

@Julspower
Copy link
Author

@sam-itt
Copy link
Owner

sam-itt commented Oct 22, 2021

https://pastebin.com/9qsSxWNt here are the log while I follow the instruction to build sofis

The build system currently expects SDL_gpu to be installed alongside SDL2. As per your log it seems that SDL_gpu is in /usr/local/include while SDL2 is in /usr/include.

Try to re-install SDL_gpu into /usr/include by doing the following commands into SDL_gpu source directory

$ cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr
$ make
# make install

Here is what I have yet https://github.com/Julspower/JulsEfis don't ask me how to compile it. been more than a year im not sure I remember, I know im remote running and debugging it on my pi zero that is hooked to my lcd.

Empty repo here :)

@Julspower
Copy link
Author

I will try that soon with sdl_gpu

my git is updated I forgot to press commit :D

@Julspower
Copy link
Author

it get a little further
now I get:
/usr/bin/ld: cannot find -lbrcmGLESv2
collect2: error: ld returned 1 exit status
make: *** [Makefile:59: sofis] Error 1

im on buster
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"

@sam-itt
Copy link
Owner

sam-itt commented Oct 23, 2021

Nice to see some progress here. Can you tell me on which system your are building (RPi 1/2/3/4) ?.

@Julspower
Copy link
Author

RPi CM4 (8gb and emmc) on a MirkoPC MB

@sam-itt
Copy link
Owner

sam-itt commented Oct 24, 2021

Ok, that's why. The RPi4 does not use the same hardware as the previous versions. Remove the following line from switches.local:

GL_LIB=brcmGLESv2

then do a

$ make clean
$ make

If that still doesn't work try removing this line from switches.local:

USE_GLES=1

and rebuild

@Julspower
Copy link
Author

YAY
now it compile but when I try ./sofis --fgtape I get
Initialization Error: Could not create a renderer with proper feature support for this demo.

@Julspower
Copy link
Author

only had to remove GL_LIB=brcmGLESv2 btw

@sam-itt
Copy link
Owner

sam-itt commented Oct 25, 2021

Initialization Error: Could not create a renderer with proper feature support for this demo.

This means that GLES is not supported by your SDL_gpu build. Try to rebuild without

USE_GLES=1

@Julspower
Copy link
Author

same error is thrown
I did make clean
remove use_gles=1
make

@sam-itt
Copy link
Owner

sam-itt commented Oct 25, 2021

Something is wrong with your SDL_gpu build. Can you run the samples that come with SDL_gpu ? Unfortunately I don't have a RPi 4 so can't replicate here.

@Julspower
Copy link
Author

I do have trouble compiling the demos of sdl_gpu
it compile good but doesn't link can't find -lSDL_gpu
in /usr/lib I have libSDL2 but not libSDL (which is looking)
and SDL and SDL2 different library and sdl_gpu should compile and install both of them?

@sam-itt
Copy link
Owner

sam-itt commented Oct 27, 2021

Do you have a build log?

@Julspower
Copy link
Author

pi@raspberrypi:~/sdl-gpu/demos $ make
[ 9%] Linking C executable camera-demo
/usr/bin/ld: cannot find -lSDL_gpu
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/camera-demo.dir/build.make:84: camera-demo] Error 1
make[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/camera-demo.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

@Julspower
Copy link
Author

ld -lSDL_gpu --verbose
GNU ld (GNU Binutils for Raspbian) 2.31.1
Supported emulations:
armelf_linux_eabi
armelfb_linux_eabi
using internal linker script:

/* Script for -z combreloc: combine and sort reloc sections /
/
Copyright (C) 2014-2018 Free Software Foundation, Inc.
Copying and distribution of this script, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. /
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
"elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
SEARCH_DIR("=/usr/local/lib/arm-linux-gnueabihf"); SEARCH_DIR("=/lib/arm-linux-gnueabihf"); SEARCH_DIR("=/usr/lib/arm-linux-gnueabihf"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SEARCH_DIR("=/usr/arm-linux-gnueabihf/lib");
SECTIONS
{
/
Read-only sections, merged into text segment: /
PROVIDE (_executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS;
.interp : { *(.interp) }
.note.gnu.build-id : { *(.note.gnu.build-id) }
.hash : { *(.hash) }
.gnu.hash : { *(.gnu.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { (.dynstr) }
.gnu.version : { (.gnu.version) }
.gnu.version_d : { (.gnu.version_d) }
.gnu.version_r : { (.gnu.version_r) }
.rel.dyn :
{
(.rel.init)
(.rel.text .rel.text. .rel.gnu.linkonce.t.
)
(.rel.fini)
(.rel.rodata .rel.rodata. .rel.gnu.linkonce.r.
)
(.rel.data.rel.ro .rel.data.rel.ro. .rel.gnu.linkonce.d.rel.ro.
)
(.rel.data .rel.data. .rel.gnu.linkonce.d.
)
(.rel.tdata .rel.tdata. .rel.gnu.linkonce.td.
)
(.rel.tbss .rel.tbss. .rel.gnu.linkonce.tb.
)
(.rel.ctors)
(.rel.dtors)
(.rel.got)
(.rel.bss .rel.bss. .rel.gnu.linkonce.b.
)
PROVIDE_HIDDEN (__rel_iplt_start = .);
(.rel.iplt)
PROVIDE_HIDDEN (__rel_iplt_end = .);
}
.rela.dyn :
{
(.rela.init)
(.rela.text .rela.text. .rela.gnu.linkonce.t.
)
(.rela.fini)
(.rela.rodata .rela.rodata. .rela.gnu.linkonce.r.
)
(.rela.data .rela.data. .rela.gnu.linkonce.d.
)
(.rela.tdata .rela.tdata. .rela.gnu.linkonce.td.
)
(.rela.tbss .rela.tbss. .rela.gnu.linkonce.tb.
)
(.rela.ctors)
(.rela.dtors)
(.rela.got)
(.rela.bss .rela.bss. .rela.gnu.linkonce.b.
)
PROVIDE_HIDDEN (__rela_iplt_start = .);
(.rela.iplt)
PROVIDE_HIDDEN (__rela_iplt_end = .);
}
.rel.plt :
{
(.rel.plt)
}
.rela.plt :
{
(.rela.plt)
}
.init :
{
KEEP (
(SORT_NONE(.init)))
}
.plt : { (.plt) }
.iplt : { (.iplt) }
.text :
{
(.text.unlikely .text._unlikely .text.unlikely.
)
(.text.exit .text.exit.)
(.text.startup .text.startup.)
(.text.hot .text.hot.)
(.text .stub .text. .gnu.linkonce.t.
)
/
.gnu.warning sections are handled specially by elf32.em. /
(.gnu.warning)
(.glue_7t) (.glue_7) (.vfp11_veneer) (.v4_bx)
}
.fini :
{
KEEP (
(SORT_NONE(.fini)))
}
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
.rodata : { (.rodata .rodata. .gnu.linkonce.r.
) }
.rodata1 : { (.rodata1) }
.ARM.extab : { (.ARM.extab .gnu.linkonce.armextab.
) }
PROVIDE_HIDDEN (__exidx_start = .);
.ARM.exidx : { (.ARM.exidx .gnu.linkonce.armexidx.
) }
PROVIDE_HIDDEN (__exidx_end = .);
.eh_frame_hdr : { (.eh_frame_hdr) (.eh_frame_entry .eh_frame_entry.) }
.eh_frame : ONLY_IF_RO { KEEP (
(.eh_frame)) (.eh_frame.) }
.gcc_except_table : ONLY_IF_RO { (.gcc_except_table
.gcc_except_table.
) }
.gnu_extab : ONLY_IF_RO { (.gnu_extab) }
/
These sections are generated by the Sun/Oracle C++ compiler. /
.exception_ranges : ONLY_IF_RO { (.exception_ranges
.exception_ranges
) }
/
Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. /
. = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
/
Exception handling /
.eh_frame : ONLY_IF_RW { KEEP (
(.eh_frame)) (.eh_frame.) }
.gnu_extab : ONLY_IF_RW { (.gnu_extab) }
.gcc_except_table : ONLY_IF_RW { (.gcc_except_table .gcc_except_table.) }
.exception_ranges : ONLY_IF_RW { (.exception_ranges .exception_ranges) }
/
Thread Local Storage sections /
.tdata :
{
PROVIDE_HIDDEN (__tdata_start = .);
(.tdata .tdata. .gnu.linkonce.td.
)
}
.tbss : { (.tbss .tbss. .gnu.linkonce.tb.
) (.tcommon) }
.preinit_array :
{
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (
(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
}
.init_array :
{
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (
(SORT_BY_INIT_PRIORITY(.init_array.
) SORT_BY_INIT_PRIORITY(.ctors.
)))
KEEP (
(.init_array EXCLUDE_FILE (crtbegin.o crtbegin?.o crtend.o crtend?.o ) .ctors))
PROVIDE_HIDDEN (__init_array_end = .);
}
.fini_array :
{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (
(SORT_BY_INIT_PRIORITY(.fini_array.
) SORT_BY_INIT_PRIORITY(.dtors.
)))
KEEP (
(.fini_array EXCLUDE_FILE (*crtbegin.o crtbegin?.o crtend.o crtend?.o ) .dtors))
PROVIDE_HIDDEN (__fini_array_end = .);
}
.ctors :
{
/
gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn't matter if the user does not
actually link against crtbegin.o; the
linker won't look for a file to match a
wildcard. The wildcard also means that it
doesn't matter which directory crtbegin.o
is in. /
KEEP (crtbegin.o(.ctors))
KEEP (crtbegin?.o(.ctors))
/
We don't want to include the .ctor section from
the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last /
KEEP (
(EXCLUDE_FILE (crtend.o crtend?.o ) .ctors))
KEEP (
(SORT(.ctors.
)))
KEEP (
(.ctors))
}
.dtors :
{
KEEP (crtbegin.o(.dtors))
KEEP (crtbegin?.o(.dtors))
KEEP (
(EXCLUDE_FILE (crtend.o crtend?.o ) .dtors))
KEEP (
(SORT(.dtors.
)))
KEEP (
(.dtors))
}
.jcr : { KEEP (
(.jcr)) }
.data.rel.ro : { (.data.rel.ro.local .gnu.linkonce.d.rel.ro.local.
) (.data.rel.ro .data.rel.ro. .gnu.linkonce.d.rel.ro.
) }
.dynamic : { *(.dynamic) }
. = DATA_SEGMENT_RELRO_END (0, .);
.got : { *(.got.plt) *(.igot.plt) *(.got) (.igot) }
.data :
{
PROVIDE (__data_start = .);
(.data .data. .gnu.linkonce.d.
)
SORT(CONSTRUCTORS)
}
.data1 : { (.data1) }
_edata = .; PROVIDE (edata = .);
. = .;
__bss_start = .;
bss_start = .;
.bss :
{
(.dynbss)
(.bss .bss. .gnu.linkonce.b.
)
(COMMON)
/
Align here to ensure that the .bss section occupies space up to
end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections.
FIXME: Why do we need it? When there is no .bss section, we don't
pad the .data section. */
. = ALIGN(. != 0 ? 32 / 8 : 1);
}
bss_end
= .; bss_end = .;
. = ALIGN(32 / 8);
. = SEGMENT_START("ldata-segment", .);
. = ALIGN(32 / 8);
end = .;
_end = .; PROVIDE (end = .);
. = DATA_SEGMENT_END (.);
/
Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { (.comment) }
/
DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. /
/
DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { (.line) }
/
GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { (.debug_sfnames) }
/
DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { (.debug_pubnames) }
/
DWARF 2 */
.debug_info 0 : { (.debug_info .gnu.linkonce.wi.) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { (.debug_line .debug_line. .debug_line_end ) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { (.debug_macinfo) }
/
SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { (.debug_varnames) }
/
DWARF 3 */
.debug_pubtypes 0 : { *(.debug_pubtypes) }
.debug_ranges 0 : { (.debug_ranges) }
/
DWARF Extension. */
.debug_macro 0 : { (.debug_macro) }
.debug_addr 0 : { (.debug_addr) }
.gnu.attributes 0 : { KEEP (
(.gnu.attributes)) }
.note.gnu.arm.ident 0 : { KEEP (
(.note.gnu.arm.ident)) }
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto
) }
}

==================================================
attempt to open //usr/local/lib/arm-linux-gnueabihf/libSDL_gpu.so failed
attempt to open //usr/local/lib/arm-linux-gnueabihf/libSDL_gpu.a failed
attempt to open //lib/arm-linux-gnueabihf/libSDL_gpu.so failed
attempt to open //lib/arm-linux-gnueabihf/libSDL_gpu.a failed
attempt to open //usr/lib/arm-linux-gnueabihf/libSDL_gpu.so failed
attempt to open //usr/lib/arm-linux-gnueabihf/libSDL_gpu.a failed
attempt to open //usr/local/lib/libSDL_gpu.so failed
attempt to open //usr/local/lib/libSDL_gpu.a failed
attempt to open //lib/libSDL_gpu.so failed
attempt to open //lib/libSDL_gpu.a failed
attempt to open //usr/lib/libSDL_gpu.so failed
attempt to open //usr/lib/libSDL_gpu.a failed
attempt to open //usr/arm-linux-gnueabihf/lib/libSDL_gpu.so failed
attempt to open //usr/arm-linux-gnueabihf/lib/libSDL_gpu.a failed
ld: cannot find -lSDL_gpu

@sam-itt
Copy link
Owner

sam-itt commented Oct 29, 2021

Can you rebuild SDL_gpu and post the build log? Doesn't seem to be installed.

@sam-itt
Copy link
Owner

sam-itt commented Nov 11, 2021

Hi,

I finally got my hands on a Rpi4.

First, you need to install the deps, otherwise you'll get the SDL_gpu.h error:

# apt-get install libgpsd-dev
# apt-get install libcurl4-openssl-dev

Then, you need to build SDL_gpu as follows(here is a prebuilt version you can untar to /):

$ cd sdl-gpu-master/
$ cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DDISABLE_GLES=ON -DDISABLE_OPENGL=OFF
$ make

You can then try to run the demos, You should get something. If you don't, something is wrong, you can proceed further.

$ cd demos
$ ./3d-demo

If you get the demo running, the proceed with installing the lib:

$ cd ..
# make install

Then proceed with building SoFIS as if it wasn't a Rpi (Rpi4 has a different hardware when it comes to video), i.e follow steps from the "Building" section of the readme, ignoring the switches.local part.

That should work :)

@Julspower
Copy link
Author

cool ill try that soon
I did start a university class so Ive been busy reading alot :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants