x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Tried out CeGCC (cross compiler) on Ubuntu 16.04

stingraze Page Icon Posted 2018-04-04 11:08 AM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Hi all,

I was figuring out how to run CeGCC (cross compiler that outputs ARM Windows CE program) on Ubuntu 16.04. It worked, after trying out the .rpm file.

Here's a text file explaining how to install (2 lines!)
http://www.superai.online/files/how-to-cegcc.txt

I mirrored the CeGCC just in case sourceforge gets offline.

I also took a picture of a modified hello world application.
This will get interesting, I hope to do some more on it.



(rsz_2dsc04788.jpg)



Attachments
----------------
Attachments rsz_2dsc04788.jpg (88KB - 0 downloads)
 Top of the page
smb_gaiden Page Icon Posted 2018-04-04 8:17 PM
#
Avatar image of smb_gaiden
Factorite (Elite)

Posts:
212
Status:
Nice work! I saw a lot of threads about that CeGCC product when I was digging into using TCC on Ubuntu to compile for ARM-based Windows CE. I should add a picture to my thread

My method still requires hex editing the binary after linking, but tcc is open source and adding some linker options to the command line is on my todo list.
 Top of the page
stingraze Page Icon Posted 2018-04-05 2:32 AM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Thank you for the comment.

I was going to try TCC, but it looked a bit daunting to me, so I went with CeGCC.
 Top of the page
smb_gaiden Page Icon Posted 2018-04-05 4:38 AM
#
Avatar image of smb_gaiden
Factorite (Elite)

Posts:
212
Status:
I'm happy you went with CeGcc and posted here. As mentioned, came across so many articles discussing it during my tcc adventure! Naturally that made me curious and added to the todo list with lower priority. Seeing your success on that front satisfied this curiosity and saved my future self much time!

Regarding TCC and daunting - stingraze-san nara dekiru yo!
 Top of the page
stingraze Page Icon Posted 2018-04-05 4:54 AM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Quote
smb_gaiden - 2018-04-05 1:38 PM
stingraze-san nara dekiru yo!


arigato!
 Top of the page
Sonikku Page Icon Posted 2018-04-12 11:28 AM
#
Avatar image of Sonikku
H/PC Newbie

Posts:
1
Location:
South Africa
Status:
Hi there
This is excellent work.

I have installed cegcc as per your instructions, the question I need to now ask is, how do I use it?
Do I need to create symlinks to it when compiling code or is it because I am also using normal gcc on my system?

so if I wanted to compile any hello_world program, how would I do this (because presently my system wants to invoke GCC when I try)
 Top of the page
stingraze Page Icon Posted 2018-04-12 1:13 PM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Hello,

Thank you.

You will have to run it from the cegcc folder that is created under /opt/

I will get back to you with detailed how-to instructions later on.

-stingraze
 Top of the page
C:Amie Page Icon Posted 2018-04-12 3:10 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
Stingraze,

Perhaps you would be willing to write a support guide on how to install it, setup the environment and create the hello world?
 Top of the page
stingraze Page Icon Posted 2018-04-13 11:45 AM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Hello,

Yes, I can write a support guide on how to install it, setup environment and create hello world.
Is there a specific way in how I should write it for hpcfactor?

It should open up a whole new world of development capabilities.

-stingraze
 Top of the page
C:Amie Page Icon Posted 2018-04-14 8:51 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
Terrific, thank-you.

I would suggest doing it as a document for the support section keeping it more formal. If you wanted to be informal you could do it as an editorial of course. Pictures/screenshots are good, but it shouldn't be a picture book, explanations (especially for those inexperienced) and code snippets are just as important. As ever, take a step back and think about who the reader is and what they need such as a few tips on which distros will work (apt vs. rpm), how to test, debug and get materials onto the H/PC.
 Top of the page
stingraze Page Icon Posted 2018-04-14 1:42 PM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Thank you for your advice in how to write it.
I will be scheduling to write it in the next 2-3 weeks.

-stingraze

Edited by stingraze 2018-04-14 1:42 PM
 Top of the page
stingraze Page Icon Posted 2018-05-23 12:53 AM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Quote
Sonikku - 2018-04-12 8:28 PM

Hi there
This is excellent work.

I have installed cegcc as per your instructions, the question I need to now ask is, how do I use it?
Do I need to create symlinks to it when compiling code or is it because I am also using normal gcc on my system?

so if I wanted to compile any hello_world program, how would I do this (because presently my system wants to invoke GCC when I try)


Sorry for late reply.

Here are more detailed steps.

1.
After downloading the rpm mentioned in the text file above from my server ( http://www.superai.online/files/how-to-cegcc.txt
), follow the steps required there, that will install mingw32ce.

Go to /opt/mingw32ce/bin in terminal

2. Use the following code as a test app source code. (taken from a site on the internet and modified) Save it as source.c somewhere on your machine.
 
#include <windows.h> 

int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
{
MessageBoxW(0, L"Hello HPCFactor! This is stingraze.", L"HELLO!", 0);
}


3. Type the following command in terminal:
 
sudo ./arm-mingw32ce-gcc -o test.exe /path/to/source/source.c


That will compile a exe compatible with Windows CE. So far I have confirmed the created .exe to work on Windows CE .NET 4.1 (Under Sigmarion 3)





Edited by stingraze 2018-05-23 1:11 AM
 Top of the page
Jump to forum:
Seconds to generate: 0.203 - Cached queries : 52 - Executed queries : 27