Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Compiling SimulIDE under windows

5 posters

Go to page : 1, 2, 3  Next

Go down  Message [Page 1 of 3]

1Compiling SimulIDE under windows Empty Compiling SimulIDE under windows Thu Jan 14, 2021 4:36 pm

acebrian



Latest instructions to compile current trunk branch of SimulIDE under Windows:

----------------------------------------
# MSYS2
pacman -S make bzr patch

cd /c/
bzr branch lp:simulide
cd /c/simulide
bzr bind lp:simulide

cp -a /c/simulide/build_XX/ /c/simulide/build_release/

exit
----------------------------------------
# CMD
path=%PATH%;C:\msys64\usr\bin;C:\Qt\5.15.2\mingw81_64\bin;C:\Qt\Tools\mingw810_64\bin
cd C:\simulide\build_release
echo @C:\msys64\usr\bin\python.exe /usr/bin/bzr %* > ..\bzr.bat
qmake
make -j8

cd executables\SimulIDE_
windeployqt --debug --plugindir plugins --no-quick-import --no-translations --no-system-d3d-compiler --no-webkit2 -no-virtualkeyboard -no-angle -no-opengl-sw .
rmdir /s /q plugins\bearer
rmdir /s /q plugins\imageformats
rmdir /s /q plugins\playlistformats
rmdir /s /q plugins\styles

exit
----------------------------------------



Last edited by acebrian on Fri Dec 30, 2022 11:19 am; edited 3 times in total (Reason for editing : Make this discussion)

2Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Thu Jan 14, 2021 5:26 pm

arcachofo

arcachofo

Which toolchain should be used to compile SimulIDE under Windows?
There are several possible choices.
But simulide is written for Gcc, other compilers might work or not.

I cross-compile from Linux using mxe: https://mxe.cc/
I remember I could compile from Windows installing Qt Creator with Gcc, but this was many years ago and I don't remember the details.
As a general rule you need a Gcc enviroment with all the libraries needed, basically Qt libraries, and libelf.

You should also need to edit simulide.pro file to match you enviroment.
It is currently set to compile in my setup.

3Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Fri Jan 15, 2021 12:54 am

acebrian



I have successfully compiled SimulIDE under Windows with official Qt 5.12.10 (MinGW64 7.3.0) package and MSYS2.

The compiler doesn't recognize "libglibc_win.a" therefore I removed this dependency embedding the required "strsep" function. Solution patch attached.

The problem is that the Windows version seems too buggy:

- Unable to select the Arduino board -> Trying to open the editor context menu crash in CreatePropWidget.

- Unable to compile -> Doesn't found compiler (checks for "arduino" file but should check for "arduino.exe").
Attachments
Compiling SimulIDE under windows Attachmentpatch.zip
Patch
You don't have permission to download attachments.
(1 Kb) Downloaded 11 times

4Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Fri Jan 15, 2021 2:19 am

arcachofo

arcachofo

I have successfully compiled SimulIDE under Windows with official Qt 5.12.10 (MinGW64 7.3.0) package and MSYS2.
That's good news.

The compiler doesn't recognize "libglibc_win.a" therefore I removed this dependency embedding the required "strsep" function.
Nice to get rid of this dependency.

- Unable to select the Arduino board -> Trying to open the editor context menu crash in CreatePropWidget.
- Unable to compile -> Doesn't found compiler (checks for "arduino" file but should check for "arduino.exe").
I will have a look.
This is probably due to last changes in Arduino compiler.

5Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Fri Jan 15, 2021 10:57 pm

arcachofo

arcachofo

- Unable to compile -> Doesn't found compiler (checks for "arduino" file but should check for "arduino.exe").
This should be solved in rev 38.

- Unable to select the Arduino board -> Trying to open the editor context menu crash in CreatePropWidget.
This is weird...
Can you open properties of components in circuit?

6Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Sat Jan 16, 2021 2:01 am

acebrian



I have recompiled SimulIDE under Windows with Qt 5.15.2 and it doesn't happen, therefore it seems to be a Qt issue.


- Unable to select the Arduino board -> Trying to open the editor context menu crash in CreatePropWidget.
This is weird...
Can you open properties of components in circuit?

7Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Sat Jan 16, 2021 2:06 am

acebrian



I have solved some issues with Arduino debugger under Windows:

- Removed hard coded waits very platform dependent.
- Fixed quoted tool invocation.
- Fixed avr-addr2line output processing (taking care of first ":" following drive letter).

Patch attached.
Attachments
Compiling SimulIDE under windows Attachmentpatch.zip
Patch file
You don't have permission to download attachments.
(2 Kb) Downloaded 9 times

8Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Sat Jan 16, 2021 2:39 am

arcachofo

arcachofo


I have solved some issues with Arduino debugger under Windows:

- Removed hard coded waits very platform dependent.
- Fixed quoted tool invocation.
- Fixed avr-addr2line output processing (taking care of first ":" following drive letter).
Nice, much better now.

9Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Sat Jan 16, 2021 2:03 pm

acebrian



I have speed up avr-addr2line conversion in Arduino debugger because it is very slow under Windows.

Also, I have solved some crashes related to cursor in output panel text when debugging (step by step execution).

Patch attached.

10Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Sat Jan 16, 2021 5:27 pm

arcachofo

arcachofo

I have speed up avr-addr2line conversion in Arduino debugger because it is very slow under Windows.

Also, I have solved some crashes related to cursor in output panel text when debugging (step by step execution).

Patch attached.
Patch applied.

11Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Sat Jan 16, 2021 5:34 pm

acebrian



I have updated the patch. The last "moveCursor" call still crashes some times (on fast click over Step button or on Free Run/Pause toggle).

This is not the best solution (the drawback is that now the out panel doesn't scroll to the end) but now debugger seems stable in both Windows an Linux.


arcachofo wrote:
I have speed up avr-addr2line conversion in Arduino debugger because it is very slow under Windows.

Also, I have solved some crashes related to cursor in output panel text when debugging (step by step execution).

Patch attached.
Patch applied.
Attachments
Compiling SimulIDE under windows Attachmentpatch.zip
Patch file
You don't have permission to download attachments.
(2 Kb) Downloaded 7 times

12Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Sat Jan 16, 2021 5:41 pm

acebrian



Were you able to reproduce the crash related to cursor?

In my case without the last patch, it happens in both Windows and Linux.

acebrian wrote:I have updated the patch. The last "moveCursor" call still crashes some times (on fast click over Step button or on Free Run/Pause toggle).

This is not the best solution (the drawback is that now the out panel doesn't scroll to the end) but now debugger seems stable in both Windows an Linux.


arcachofo wrote:
I have speed up avr-addr2line conversion in Arduino debugger because it is very slow under Windows.

Also, I have solved some crashes related to cursor in output panel text when debugging (step by step execution).

Patch attached.
Patch applied.

arcachofo likes this post

13Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Mon Jan 18, 2021 11:43 pm

arcachofo

arcachofo

I have updated the patch. The last "moveCursor" call still crashes some times (on fast click over Step button or on Free Run/Pause toggle).

This is not the best solution (the drawback is that now the out panel doesn't scroll to the end) but now debugger seems stable in both Windows an Linux.
Were you able to reproduce the crash related to cursor?

In my case without the last patch, it happens in both Windows and Linux.
Sorry i missed these posts... scratch
I will have a look.

14Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Tue Jan 19, 2021 2:31 pm

acebrian



I don't know if this console messages have something to do with the moveCursor problem in the out panel:

QObject::connect: Cannot queue arguments of type 'QTextBlock'
(Make sure 'QTextBlock' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)

15Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Tue Jan 19, 2021 10:06 pm

arcachofo

arcachofo

I don't know if this console messages have something to do with the moveCursor problem in the out panel:

QObject::connect: Cannot queue arguments of type 'QTextBlock'
(Make sure 'QTextBlock' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
I think there is not problem there.
The fact that it only happens when debugging is a good clue.
Looks like a threading problem, i'm thinking how to solve it.

16Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Tue Jan 19, 2021 11:30 pm

arcachofo

arcachofo

Yes.. it was a threading problem.
When I updated debugger to new simulation core I didn't realize that it interferes with app event loop.

This should be solved in rev 44.

17Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Wed Jan 20, 2021 11:10 am

acebrian



Cannot compile rev 46, "editorprop.h" is still missing and it is included by "codeeditor.cpp".

Don't forget the "bzr add".

arcachofo wrote:Yes.. it was a threading problem.
When I updated debugger to new simulation core I didn't realize that it interferes with app event loop.

This should be solved in rev 44.

18Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Wed Jan 20, 2021 11:20 am

arcachofo

arcachofo

Embarassed

19Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Thu Jan 21, 2021 7:48 am

arcachofo

arcachofo

There was a problem from rev 21, solved in rev 53: Arduino hex file not overwritten after recompile.

When you click on upload firmware, the old firmware should be deleted from circuit folder (if exist) then the new firmware copied to circuit folder, then loaded to the MCU.

From rev 21, old firmware was not deleted, so it is not the new firmware what is actually loaded to MCU but the old one.
I have no idea how i did not notice this before...

20Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Thu Feb 11, 2021 1:30 pm

maikv



acebrian wrote:I have successfully compiled SimulIDE under Windows with official Qt 5.12.10 (MinGW64 7.3.0) package and MSYS2.

Could you explain how you managed to include the required libelf library under Windows in Qt Creator? I already tried compiling the library myself with MinGW64, but I gave up after fighting with missing dependencies and endless compiler errors.

Did you use a precompiled version of the libelf library? I found this line in the project file:
Code:
LIBS += deps/libelf.a
However I didn't find the corresponding library file or directory in the repository.

Best regards!

21Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Thu Feb 11, 2021 1:41 pm

acebrian



I have used the precompiled libelf.a from official package.

----------------------------------------
# MSYS2
pacman -S make mingw-w64-x86_64-libelf bzr patch

cd /c/
bzr branch lp:simulide
cd /c/simulide
bzr bind lp:simulide

mkdir /c/simulide/build_XX/deps/
cp -a /mingw64/include/libelf/ /c/simulide/build_XX/deps/
cp -a /mingw64/lib/libelf.a /c/simulide/build_XX/deps/

cp -a /c/simulide/build_XX/ /c/simulide/build_release/

exit
----------------------------------------
# CMD
path=%PATH%;C:\msys64\usr\bin;C:\Qt\5.15.2\mingw81_64\bin;C:\Qt\Tools\mingw810_64\bin
cd C:\simulide\build_release
qmake
make -j8

cd executables\SimulIDE_0.5.16-RC1\bin
windeployqt --debug --plugindir plugins --no-quick-import --no-translations --no-system-d3d-compiler --no-webkit2 -no-virtualkeyboard -no-angle -no-opengl-sw .

exit
----------------------------------------

Best regards.

arcachofo and maikv like this post

22Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Fri Feb 12, 2021 2:52 pm

acebrian



Today I have tried to compile latest SimulIDE trunk branch under Windows and I have got two compilation errors:

----------------------------------------
../src/simulator/e-element.h:74:14: error: 'vector' in namespace 'std' does not name a template type
        std::vector m_ePin;
             ^~~~~~
../src/simulator/e-element.h:74:9: note: 'std::vector' is defined in header ''; did you forget to '#include '?
../src/simulator/e-element.h:26:1:
+#include
----------------------------------------
../src/simulator/e-source.h:32:5: error: 'open' redeclared as different kind of symbol
    open,
    ^~~~
In file included from C:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/unistd.h:10,
                from ../src/gpsim/pic-processor.cc:24:
C:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/io.h:338:15: note: previous declaration 'int open(const char*, int, ...)'
  int __cdecl open(const char *_Filename,int _OpenFlag,...)  __MINGW_ATTRIB_DEPRECATED_MSVC2005;
----------------------------------------

Attached you have the patches to solve both problems and allow compilation under Windows:

- I have added the "vector" header.
- I have renamed open collector output pin type from "open" to "output_open" to avoid redeclaration error.

Best regards.
Attachments
Compiling SimulIDE under windows Attachmentpatches.zip
Patches
You don't have permission to download attachments.
(2 Kb) Downloaded 11 times

23Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Fri Feb 12, 2021 5:06 pm

arcachofo

arcachofo

Thanks.
Patches applied.

24Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Sat Feb 27, 2021 6:35 pm

maikv



acebrian wrote:I have used the precompiled libelf.a from official package.

Thank you very much! I tried some other precompiled version for MinGW64 before but the program crashed instantly. It worked without a problem with your instructions.

25Compiling SimulIDE under windows Empty Re: Compiling SimulIDE under windows Thu Sep 02, 2021 10:37 am

kellneka



Hi there,

I'm trying to compile SimulIDE under Windows using QT-Creator with gcc.
I always run into one Error:

"g++: fatal error: cannot specify -o with -c, -S or -E with multiple files
compilation terminated."

I was wondering if anyone had this Error before?

Sponsored content



Back to top  Message [Page 1 of 3]

Go to page : 1, 2, 3  Next

Permissions in this forum:
You cannot reply to topics in this forum