Not happy looking for examples

For general Flowcode discussion that does not belong in the other sections.
RGV250
Posts: 333
http://meble-kuchenne.info.pl
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 32 times
Been thanked: 33 times

Re: Not happy looking for examples

Post by RGV250 »

Hi,
I did have a quick look.
The Raspberry Pi HDMI component did work on hardware target, but didn't seem to simulate in Flowcode.
I used a simple Initialise and Hello World print.
Would it be possible to post your hello world example as I do not get anything at all on real hardware. It just stays on the Pi home screen or whatever it is called.
Do I need to change any settings?

Regards,
Bob

LeighM
Valued Contributor
Posts: 486
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 83 times
Been thanked: 260 times

Re: Not happy looking for examples

Post by LeighM »

My earlier tests were with a quick grab of a Raspberry Pi 2 (as it has the full size HDMI socket)
Now I've tested on Raspberry Pi 4 with latest operating system, I now see the problem.
It's a glibc version issue. The compiler isn't compatible with the latest Raspberry Pi OS.

There is a "simple" fix though.
Add -static to the compile batch file rbuild.bat found in C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\RPI\batch

Line 15

Code: Select all

@"%MX_COMPILER%gcc\bin\%MX_CC%" -w "%MX_PROJECT%.c" -lm -o "%MX_PROJECT%"
Becomes...

Code: Select all

@"%MX_COMPILER%gcc\bin\%MX_CC%" -static -w "%MX_PROJECT%.c" -lm -o "%MX_PROJECT%"
Created executables will now be larger, but will run on any versions of Raspbian/Raspberry Pi OS

RGV250
Posts: 333
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 32 times
Been thanked: 33 times

Re: Not happy looking for examples

Post by RGV250 »

Thanks, I will have a look over the weekend. Mine is a 3B but using the latest OS.

Just a thought, if it works I wonder if it will be overwritten if you update FC in the future?

Perhaps it could be written in so there is a "Use HDMI" option when compiling so if not needed the exe size would not be changed?

Regards,
Bob

chipfryer27
Valued Contributor
Posts: 1673
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 372 times
Been thanked: 580 times

Re: Not happy looking for examples

Post by chipfryer27 »

Hi Bob

Mine are mainly 3B too and like you have lastest OS installed.

Very helpful posts.

Regards

LeighM
Valued Contributor
Posts: 486
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 83 times
Been thanked: 260 times

Re: Not happy looking for examples

Post by LeighM »

Yes, it's a modification that Matrix need to implement. (Please guys :D
The issue will affect more than just this component.
The other option is to upgrade the compiler to match the glibc version of the operating system. But that's like aiming at moving goal posts.

LeighM
Valued Contributor
Posts: 486
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 83 times
Been thanked: 260 times

Re: Not happy looking for examples

Post by LeighM »

Another option would be to compile on the Raspberry Pi, rather than cross compile on the PC. That would be slower, but guarantee compatibility :lol:

RGV250
Posts: 333
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 32 times
Been thanked: 33 times

Re: Not happy looking for examples

Post by RGV250 »

Hi,
I made the change to rbuild and made a simple test but nothing happened. FC says it is running after download but the Pi display just shows the screen as it does after boot. I tried to run the file directly but still nothing.
Can someone test the program to see if I am doing something wrong.
HDMI_Test.fcfx
(9.55 KiB) Downloaded 18 times
Regards,
Bob

LeighM
Valued Contributor
Posts: 486
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 83 times
Been thanked: 260 times

Re: Not happy looking for examples

Post by LeighM »

Could you try running as root, or sudo ?
I'm away from PC at the moment.

LeighM
Valued Contributor
Posts: 486
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 83 times
Been thanked: 260 times

Re: Not happy looking for examples

Post by LeighM »

Works for me, without sudo (with obviously changed login credentials)
Although, I'm not running a desktop, just a console, but as I recall that shouldn't make any difference.
I think I've written notes previously, either on the wiki or the old forum, about disabling the desktop, and disabling the console.
This component simply writes to the frame buffer, as do console and desktop.

LeighM
Valued Contributor
Posts: 486
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 83 times
Been thanked: 260 times

Re: Not happy looking for examples

Post by LeighM »

When running the program directly (from a console) do you get any (error) messages?

Post Reply