Recent

Author Topic: Compiled app doesn't run on device itself  (Read 19595 times)

ertank

  • Sr. Member
  • ****
  • Posts: 274
Compiled app doesn't run on device itself
« 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.

Code: [Select]
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.

Bart

  • Hero Member
  • *****
  • Posts: 5265
    • Bart en Mariska's Webstek
Re: Compiled app doesn't run on device itself
« Reply #1 on: August 28, 2015, 11:32:18 pm »
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

ertank

  • Sr. Member
  • ****
  • Posts: 274
Re: Compiled app doesn't run on device itself
« Reply #2 on: August 28, 2015, 11:39:08 pm »
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.

Bart

  • Hero Member
  • *****
  • Posts: 5265
    • Bart en Mariska's Webstek
Re: Compiled app doesn't run on device itself
« Reply #3 on: August 28, 2015, 11:41:49 pm »
The RTE suggests that the file (probably stdout) isn't open.

Bart

ertank

  • Sr. Member
  • ****
  • Posts: 274
Re: Compiled app doesn't run on device itself
« Reply #4 on: August 28, 2015, 11:50:57 pm »
Ok, seems I am getting somewhere.

Now, I changed code as follows and it run OK.

Code: [Select]
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.

Bart

  • Hero Member
  • *****
  • Posts: 5265
    • Bart en Mariska's Webstek
Re: Compiled app doesn't run on device itself
« Reply #5 on: August 28, 2015, 11:57:01 pm »
Does a simple TForm only project run?
B.t.w. AFAIK you need not set widgetset explicitely when building for WinCE.

Bart

ertank

  • Sr. Member
  • ****
  • Posts: 274
Re: Compiled app doesn't run on device itself
« Reply #6 on: August 29, 2015, 12:08:26 am »
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.

Bart

  • Hero Member
  • *****
  • Posts: 5265
    • Bart en Mariska's Webstek
Re: Compiled app doesn't run on device itself
« Reply #7 on: August 29, 2015, 12:10:49 am »
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

Bart

  • Hero Member
  • *****
  • Posts: 5265
    • Bart en Mariska's Webstek
Re: Compiled app doesn't run on device itself
« Reply #8 on: August 29, 2015, 12:12:31 am »
Only Project name displayed at the bottom. You can understand it at attached picture I hope.

What happens if youc lick on that?

Bart

ertank

  • Sr. Member
  • ****
  • Posts: 274
Re: Compiled app doesn't run on device itself
« Reply #9 on: August 29, 2015, 12:19:10 am »
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.

ertank

  • Sr. Member
  • ****
  • Posts: 274
Re: Compiled app doesn't run on device itself
« Reply #10 on: August 29, 2015, 12:30:22 am »
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.
« Last Edit: August 29, 2015, 12:47:03 am by ertank »

Bart

  • Hero Member
  • *****
  • Posts: 5265
    • Bart en Mariska's Webstek
Re: Compiled app doesn't run on device itself
« Reply #11 on: August 29, 2015, 12:40:53 am »
Sorry, I'm out of suggestions.
Your project settings seem OK to me.

Bart

ertank

  • Sr. Member
  • ****
  • Posts: 274
Re: Compiled app doesn't run on device itself
« Reply #12 on: August 29, 2015, 12:47:31 am »
Yes, that's where I am stuck at. Thanks for suggestions though.

ertank

  • Sr. Member
  • ****
  • Posts: 274
Re: Compiled app doesn't run on device itself
« Reply #13 on: August 29, 2015, 11:40:47 am »
I would like to have additional help if someone can, please.

vincococka

  • Full Member
  • ***
  • Posts: 101
Re: Compiled app doesn't run on device itself
« Reply #14 on: August 29, 2015, 04:15:31 pm »
Hi,

regarding console wince application - try adding following to the beginning of the code, hope it helps
Code: [Select]
{$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.

---
  Guide me God and I`ll find you

 

TinyPortal © 2005-2018