[DONE] Win32-MinGW demo

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Has thanked: 3 times
Been thanked: 3 times

[DONE] Win32-MinGW demo

Post by DeusExMachina »

I tried to work with windows simulator: first I used 2.6.1 version and had succesfully compiled ch.exe by mingw32 toolchain. But I can't see application output via putty, only blanc screen. Connection to both ports was sucessfull.
I tried to use 2.6.2 version, but demo compilation fails (unresolved msObjectInit in chprintf.c).
I inserted code after 75 line of makefile

Code: Select all

       ${CHIBIOS}/os/various/memstreams.c \

and was able to compile app. But the terminal issue remains. Also on closing putty ch.exe crashes.
How can I fix the problem?
User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Has thanked: 3 times
Been thanked: 3 times

Re: Win32-MinGW demo

Post by DeusExMachina »

gcc version is 4.8.1
User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Has thanked: 3 times
Been thanked: 3 times

Re: Win32-MinGW demo

Post by DeusExMachina »

It seems that connect events (SD1 or SD2) never take place. I used debugger, system waits infinitelly

Code: Select all

  /*
   * Events servicing loop.
   */
  while (!chThdShouldTerminate());
    chEvtDispatch(fhandlers, chEvtWaitOne(ALL_EVENTS));
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Win32-MinGW demo

Post by Giovanni »

I will verify it.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [TODO] Win32-MinGW demo

Post by Giovanni »

I fixed the makefiles but I cannot reproduce the other problem using my older MinGW, it is possible it is a stack overflow issue.

Giovanni
User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Has thanked: 3 times
Been thanked: 3 times

Re: [DONE] Win32-MinGW demo

Post by DeusExMachina »

Giovanni, what MinGW version you use? May be it is my Windows-related issue
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [DONE] Win32-MinGW demo

Post by Giovanni »

It is an old 3.2.4 or something like that.

Giovanni
User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Has thanked: 3 times
Been thanked: 3 times

Re: [DONE] Win32-MinGW demo

Post by DeusExMachina »

I tried to compile the demo on another pc. Everything was OK, demo worked. I think it is my windows problem.
User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Has thanked: 3 times
Been thanked: 3 times

Re: [DONE] Win32-MinGW demo

Post by DeusExMachina »

Also, what does this define mean?

Code: Select all

/**
 * @brief   Port-specific information string.
 */
#define CH_PORT_INFO                    "No preemption"

This port is cooperative-like OS?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [DONE] Win32-MinGW demo

Post by Giovanni »

Yes, the simulators are cooperative only, I've found no easy way to preempt a win32 process.

Giovanni
Post Reply