Raspberry Pi web pages (non embedded) location

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

Re: Raspberry Pi web pages (non embedded) location

Post by RGV250 »

Hi Ben,
Picking this up after Christmas and so far I have failed completely.
To save trouble programming the Pi every change and to try to at least prove it works I thought I would see if it works if I simulate it but so far no good there either.
Should the project simulate or do I need to change the components such as File_RPI & TCP_IP_Pi?. Also if the index.htm is in the project directory does the path in the project need to be changed.

Are you the same Ben Rowland from 001_Tech ages ago?

Bob

BenR
Matrix Staff
Posts: 1944
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 508 times
Been thanked: 690 times

Re: Raspberry Pi web pages (non embedded) location

Post by BenR »

Hi Bob,

Yes it should all simulate correctly, send me your project file and your .htm files and I'll investigate for you.

Also yes one in the same :D Did you buy one of my boards?

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

Re: Raspberry Pi web pages (non embedded) location

Post by RGV250 »

Hi Ben,
I bought 3 of the CAN PIC boards, I still have them somewhere but lost the information.

I have attached the files, it is basically the same as in this post. Both files are in the same directory, I run the flowcode file in debug and enter 192.168.1.67/index in the web browser, I get the index file but there is is no data showing.
RPI_Ext_Browser.zip
(4.03 KiB) Downloaded 342 times
Bob

BenR
Matrix Staff
Posts: 1944
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 508 times
Been thanked: 690 times

Re: Raspberry Pi web pages (non embedded) location

Post by BenR »

Hi Bob,

Aha yes the CAN boards, they were quite good, remember doing some good stuff with them such as reprogramming PICs via CAN, still got a load of them I beleive. If you ever need any details regarding them then let me know.

I've replicated the simulation problem you're having and managed to solve it for you, the fix is now available via the library updates. If you want me to test it on the Pi too then let me know.

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

Re: Raspberry Pi web pages (non embedded) location

Post by RGV250 »

Hi Ben,
That is fantastic, it works here. I did have a bit of a worry as it did not refresh and then I realised I had stripped that out of my web code when I stripped it down to the basics.

I appreciate you are very busy but if you do get the time could you test it on the Pi so i know that works as well. I think the main issue there is where the files should go, from what I have understood the index.htm has to go in the /var/www/html/ directory or it does not run when you access the device. Flowcode installs the project to a different directory.


Regards,
Bob

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

Re: Raspberry Pi web pages (non embedded) location

Post by RGV250 »

Hi,
I resurrected a project and had issues so i went back to basics. I am having issues with this file RPI_Ext_Browser_Test_2.fcfx
When I try to compile to target in FC9 I get errors which I am sure I did not get before
https://www.flowcode.co.uk
Errors when generating C source code:
RPI_Ext_Browser_Test_2.c : 1 : error : Unknown or missing component: File_RPI1::SetFileIndex
RPI_Ext_Browser_Test_2.c : 1 : error : Unknown or missing component: File_RPI1::SetFileIndex
RPI_Ext_Browser_Test_2.c : 11111 : error : Unknown or missing component: File_RPI1::SetFileIndex
RPI_Ext_Browser_Test_2.c : 11111 : error : Unknown or missing component: File_RPI1::SetFileIndex
Autoclose turned off
When I try to compile the same file in FC10 I get totally different errors. I can run it in a sim but it fails to download.
Target folder: C:\Users\Admin\Downloads
Source name: C:\Users\Admin\Downloads\RPI_Ext_Browser_Test_2.fcfx
Title:
Description:
Device: RPI.RPI.RPI3B
Generated by: Flowcode v10.0.2.21
Date: Thursday, May 18, 2023 12:41:38
Users: 1
Registered to:
Licence key:
NOT FOR COMMERCIAL USE
https://www.flowcode.co.uk
Using FCD settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\RPI\batch\rbuild.bat "RPI_Ext_Browser_Test_2" "C:\Users\Admin\Downloads\" "C:\Program Files (x86)\Flowcode\Common\Compilers\rpi\\"

C:\Users\Admin\Downloads>REM CRC: 9CBAA20B02874D61C96DAE4FEC699BE787136EA47F741E26D6F846B5ABB246D896FAD8FDCAFB245061760799B64DDB929A0D46BD3B6AACB92DE4D84759EBB5079CA9DA2D2BBCDAE2A4D1C56CD1580BF5BE7E6799B63525A0CDB45CEDDB365F77CD3D7A5AF14A2BAC6613EC2BBBE3D39CD44F5379E4735FA01C82F6AB22C785E150FECF807FB33A9FC815CE7CB1BA9E5AC2D21F03E16554B9EBDB51055D309C1279A8C5D3CA58E18F2C3050DA273BE4EE73F41640DE3922C5629C45A17498EDEC0A8B3D681AF234BBB0330AA6FB05B88105A68DA3CE9026E5

C:\Users\Admin\Downloads>REM REVISION: 1.0

C:\Users\Admin\Downloads>REM GUID: 8C0879FE-99B8-41F1-BDB0-70BBBFD4CAC2

C:\Users\Admin\Downloads>REM DATE: 08\08\2022

C:\Users\Admin\Downloads>REM DIR: FCD\RPI\batch\rbuild.bat
Building RPI_Ext_Browser_Test_2
RPI_Ext_Browser_Test_2.c: In function 'FCD_04651_File_RPI1__sim_delete_file':
RPI_Ext_Browser_Test_2.c:1030:28: error: missing terminating " character
FCI_SHEAD("$(srcdir)",10, "\",1, FCL_FILEPATH,200);
^~~~~~~~~~~~~~~~~~~~~~~~~
RPI_Ext_Browser_Test_2.c:1032:2: error: expected expression before 'switch'
switch (FCV_04651_File_RPI1__FILE_IDX)
^~~~~~
RPI_Ext_Browser_Test_2.c:1030:2: error: too few arguments to function 'FCI_SHEAD'
FCI_SHEAD("$(srcdir)",10, "\",1, FCL_FILEPATH,200);
^~~~~~~~~
In file included from C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\internals.c:139:0,
from RPI_Ext_Browser_Test_2.c:38:
C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\RPI\RPI_CAL_String.c:835:6: note: declared here
void FCI_SHEAD(MX_STRING sSrc1, MX_UINT16 iSrc1_len, MX_STRING sSrc2, MX_UINT16 iSrc2_len, MX_STRING sDst, MX_UINT16 iDst_len)
^~~~~~~~~
RPI_Ext_Browser_Test_2.c:1150:1: error: expected ';' before '}' token
}
^
RPI_Ext_Browser_Test_2.c: In function 'FCD_04651_File_RPI1__sim_create_file':
RPI_Ext_Browser_Test_2.c:1851:28: error: missing terminating " character
FCI_SHEAD("$(srcdir)",10, "\",1, FCL_FILEPATH,200);
^~~~~~~~~~~~~~~~~~~~~~~~~
RPI_Ext_Browser_Test_2.c:1853:2: error: expected expression before 'switch'
switch (FCV_04651_File_RPI1__FILE_IDX)
^~~~~~
RPI_Ext_Browser_Test_2.c:1851:2: error: too few arguments to function 'FCI_SHEAD'
FCI_SHEAD("$(srcdir)",10, "\",1, FCL_FILEPATH,200);
^~~~~~~~~
In file included from C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\internals.c:139:0,
from RPI_Ext_Browser_Test_2.c:38:
C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\RPI\RPI_CAL_String.c:835:6: note: declared here
void FCI_SHEAD(MX_STRING sSrc1, MX_UINT16 iSrc1_len, MX_STRING sSrc2, MX_UINT16 iSrc2_len, MX_STRING sDst, MX_UINT16 iDst_len)
^~~~~~~~~
RPI_Ext_Browser_Test_2.c:1973:1: error: expected ';' before '}' token
}
^
Error(s) in build!

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\RPI\batch\rbuild.bat reported error code 0x1

Autoclose turned off


FINISHED
Bob

Post Reply