Lazarus
Programming => Operating Systems => Windows CE => Topic started by: ertank on August 28, 2015, 10:37:59 pm
-
Hi,
I'm on Lazarus 1.4.2 and fpc 2.6.4. I start a fresh application and do nothing but directly compile it for wince. (Target OS "WinCE", Target CPU Family "arm", Target processor is "default", and LCL widgetset "wince") That compiled application doesn't run on device itself.
When I try to run it I get no error messages. However, application form is not displayed either. I only see name of the project in the task bar below. That's all. No form is displayed. Clicking application on the taskbar does nothing.
If I try a simple console application (code is below), I get runtime error 103 at $0001128C, $0001128C, $00017F40
Console application is compiled only with -O1 parameter.
program project1;
begin
Write('Hello');
end.
Device I am testing is running on Windows CE 6.00, Samsung Processor, Cortex A-8-S5PV2 which seems to be claimed as ARMv7-A
Any help is appreciated.
-
Does WinCE have a console you can write to at all?
If yes, then inLazarus go to Project options -> Compiler options -> Config and target and uncheck the Win32 GUI application checkbox.
Bart
-
Hi Bart,
Device have a "Command Prompt" if that's what you are asking.
The second application, which crashes, is a console application. Win32 GUI is not checked for it. Yet, I'm getting above mentioned error.
-
The RTE suggests that the file (probably stdout) isn't open.
Bart
-
Ok, seems I am getting somewhere.
Now, I changed code as follows and it run OK.
program project1;
var
f: TEXT;
begin
AssignFile(f, '\test.txt');
Rewrite(f);
WriteLn(f, 'Hello WinCE');
Flush(f);
Close(f);
end.
Now, I am back to Win32 GUI application doesn't run problem.
-
Does a simple TForm only project run?
B.t.w. AFAIK you need not set widgetset explicitely when building for WinCE.
Bart
-
I have the device connected to my computer. I am making constant tests.
Problem is simple, empty form is not displayed.
I have set TargetOS as "wince", CPU family as "arm", processor is "default", LCL widgetset is manually set as "wince"
Still nothing displayed. Only Project name displayed at the bottom. You can understand it at attached picture I hope.
-
Does it make any difference if you remove the widgetset (in addidtions and overrides)?
Can you run the program on a device emulator (like WM 6.5 professional)?
Bart
-
Only Project name displayed at the bottom. You can understand it at attached picture I hope.
What happens if youc lick on that?
Bart
-
I didn't understand what you mean by "(in additions and overrides)" below. However, attached pictures shows current situation.
I don't know how I can setup a device emulator. I have visual studio 2008 installed. It has one emulator. However, I don't know how to get my exe run by it.
When I click on that bottom thing, nothing happens. It doesn't come up, it doesn't have focus on it. Nothing. I have to kill it using task manager in the OS.
-
Allright, I managed to run my test project in emulator. It is "USA Windows Mobile Pocket PC 5.0 R2 Emulator" It seems that Application is running OK on that device.
I added a TButton and a TEdit. They both run ok. However, real device I have is not running it.
-
Sorry, I'm out of suggestions.
Your project settings seem OK to me.
Bart
-
Yes, that's where I am stuck at. Thanks for suggestions though.
-
I would like to have additional help if someone can, please.
-
Hi,
regarding console wince application - try adding following to the beginning of the code, hope it helps
{$APPTYPE CONSOLE}
If you want we can organize some TeamViewer session to investigate whats going on.
In case you have some spare time send me PM.
V.
-
Hi vincocoka,
There is no problem with console applications. They run OK. I intend to run regular, graphical "form" application. They are the ones causing problem.
-
Have you tried to build debug version and run it via gdb?
-
I don't know how to do that. We might try this via TeamViewer. I'm on GMT+2 European timezone.
-
Device I am testing is running on Windows CE 6.00, Samsung Processor, Cortex A-8-S5PV2 which seems to be claimed as ARMv7-A.
According to http://wiki.lazarus.freepascal.org/WinCE_port last WinCE supported is 5.2.1 (Windows Mobile 6.5). However, you might want to check these links:
http://forum.lazarus.freepascal.org/index.php/topic,23237.msg138709.html#msg138709
http://forum.lazarus.freepascal.org/index.php/topic,23277.msg165343.html#msg165343
http://wiki.freepascal.org/WinCE_Programming_Tips#Platform_specific_Tips
-
Hi Avra,
I checked out these links. I suppose I will not be able to code for WinCE 6.0 with Lazarus, until it is supported (if ever) in the future.
Thanks for clarifying the problem.
-
I checked out these links. I suppose I will not be able to code for WinCE 6.0 with Lazarus, until it is supported (if ever) in the future.
Only maintainer can answer that...
-
I have finally found my problem.
First of all, anybody can use "fpc -Parm -i" to see what CPUs are supported. I see that ARM7 is supported.
Additionally, there are several people helping bug solve process on WinCE 6.5 versions. So, I can say WinCE version supported is at least 6.5.
Regarding my problem, it turned out that I need to use below code in the OnLoad event of main form to be able to see my form.
Self.Top := 0;
Self.Left := 0;
If need to see Title bar set Top to 25 or 26.
For some reason below properties are not working on WinCE platform:
BorderStyle
WindowSize
BorderStyle seems to be bsDialog or bsSingle with no sizing available. Linked to this, WindowSize := wsMaximized is not working.
Just my findings related with my problem. Putting here to support people that hit same problem as me.
Regards,
Ertan
-
Hi
I'm with the same problem on the device. Motorola MC2180 WinCE.
When I try to run it, I get no error messages. It does nothing.
Windows CE 6.0 and Lazarus 1.4.4 and fpc 2.6.4
I try everything but it d'nt work, did you solve this problem?
Best regards
-
Does it show up in the WinCE taskbar?
Did you set the forms left and top properties to zero?
Does a ShowMessage('test'); show a message dialog?
-
Hi
1-No it d'nt appear on the taskbar.
2-Yes I set the form1 letf and top to Zero
3-No it d'nt show the message dialog
He does nothing
I was program the pidion M-150 windows CE 5.0 and it works fine
But this device motorola MC2180 windows CE 6.0 d'nt work
-
Additionally, there are several people helping bug solve process on WinCE 6.5 versions. So, I can say WinCE version supported is at least 6.5.
You are confused a little. Windows Mobile 6.5 existed, but WinCE 6.5 never existed. There was WinCE 6.0 and after that WinCE 7.0 was next. Windows Mobile 6.5 was built on WinCE 5.2. Lazarus supports up to WinCE 5.2.1 (so not WinCE 6.0 and 7.0).
https://en.wikipedia.org/wiki/Windows_CE#History
https://en.wikipedia.org/wiki/Windows_Mobile#Windows_CE
http://stackoverflow.com/questions/474770/what-version-of-ce-is-window-mobile-6-5-built-on
http://forum.lazarus.freepascal.org/index.php/topic,29489.msg186580.html#msg186580
http://wiki.freepascal.org/WinCE_port
-
I'm confused again. I have attached screen capture. Is this a WinCE 6.0 or Windows Mobile 6.0 device I am using in my case? And, how can I understand the kernel version if I can?
Just want to clarify my own situation here.
-
Hi
Your device have the same OS (Windows CE Version 6.0) of mine motorola MC2180 but your processor is samsung and mine is processor Marvell PXA32X-P.
Is because the type of CPU Lazarus applications do not work?
The program sqliteviewer for sqlite db not work too on my device.
I think is something on the WinCE that block the applications, or memory is too Low,
i don't know.
Could you send a simple app compiled on lazarus that work on your device to test?
Best Regars
-
Is this a WinCE 6.0 or Windows Mobile 6.0 device I am using in my case?
The answer is on your screenshot. "Microsoft Windows CE Version 6.00" is WinCE 6.0, which is not officially supported by Lazarus.
-
Hi
Lazarus compile application for the windows embedded handheld 6.5, it works or not?
I want to develop an application to a device ( Dolphin 60s Scanphone) with windows embedded handheld 6.5.
Can anybody help
Thanks
-
Lazarus compile application for the windows embedded handheld 6.5, it works or not?
I want to develop an application to a device ( Dolphin 60s Scanphone) with windows embedded handheld 6.5.
This is the last time I do your homework.
According to http://www.microsoft.com/windowsembedded/en-us/windows-embedded-handheld-6-5.aspx "Windows Mobile 6.5" and "Windows Embedded Handheld 6.5" are compatible. On http://wiki.lazarus.freepascal.org/WinCE_port you can find that "The following platforms are supported: ...Windows Mobile 6.5 - WinCE version: 5.2.1", so Lazarus seams to be compatible with your Dolphin 60s Scanphone.
You should seach forum for info on setting your Lazarus for cross compiling for Windows CE / Windows Mobile. If you use CodeTyphon instead then there is a nice tutorial here: http://www.pilotlogic.com/sitejoom/index.php/wiki?id=221.
-
thanks avra and i ́m sorry, I didn't want to disturb
Best Regards
-
thanks avra and i ́m sorry, I didn't want to disturb
You are welcome. There are no hard feelings at all when someone is polite as you are. A newbie is just expected to value other people's time and do as much as he can on his own before asking for help. I have not seen any effort shown in last post - only questions that could be easily googled out. For example, if you have just searched the web for "windows embedded handheld 6.5" you would find the Microsoft (or some other) page with all the compatibility info you needed that I have quoted for you. If you show some research effort then no one could be disturbed even for a question like "Do I understand correctly this web page that <put here any compatibility question you like>".