Proper ECX 2.3.1 installation
  • Order of the Butterfly
    Order of the Butterfly
    r-tea
    Posts: 306 from 2005/3/27
    From: Poland, Zdzies...
    Can anyone help me in checkin whether I have proper ECX installed?
    I did all according the official ECX.guide:
    1. extracted the ECX archive into DH1:Development/ECX (this is the original MorphOS SDK drawer)
    2. extracted AmigaE 3.3a archive into DH1:Development/E
    3. renamed compiler executable ECX.mos to ECX
    4. added to user-startup:

    ;Amiga E, ECX
    Assign EMODULES: HD1:Development/E/Modules
    Assign ECX: HD1:Development/ECX
    Assign ECXMODULES: ECX:modules
    Setenv ecx-amigaos-dir emodules: ecxmodules: ecxmodules:amigaos/
    Setenv ecx-morphos-dir emodules: ecxmodules: ecxmodules:morphos/
    Setenv ecx-amigaos4-dir emodules: ecxmodules: ecxmodules:amigaos4/
    COPY env:ecx#? envarc:
    Path ECX:bin ADD

    Then I tried to compile official MUI-Demo.e for 68k first, and it went very well.
    I did it this way:
    Code:
    ecx ram:MUI-Demo.e amigaos ddir=ram:


    but when I tried to compile it for MorphOS I got an error message:
    Code:
    Ram Disk:> ecx ram:mui-demo.e morphos ddir=ram:
    ECX 2.3.1 WIP (MorphOS,PPC) by Leif Salomonsson (c) 2002-2013.
    ECX 2.3.1 WIP MorphOS,PPC.
    Lexical and syntax analysis..
    +Preprocessing..
    ERROR: unknown label "MOVEA"
    Procedure: doMethod
    Line 927: MOVEA.L h,A0


    Is it bacause of invalid installation or might be there another reason?
    Mac mini G4@1,5GHz silent upgrade + Xerox Phaser 3140 + EPSON Perfection 1240U
    Commodore C64C + 2 x 1541II + Datasette + SD-Box

    I miss draggable screens... and do you? I know I'm in a minority unfortunately.
  • »02.03.16 - 21:35
    Profile
  • pOS
  • Order of the Butterfly
    Order of the Butterfly
    pOS
    Posts: 217 from 2003/11/14
    From: Bavaria
    Even though E is one of my alltime favourite languages, i didn't use my E installation fpr quite some years.

    Your errors message contains 68K Assembler Code. It seems , the AmigaOS68K Modules are used instead the ones fpr MorphOS....
  • »02.03.16 - 22:08
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    r-tea
    Posts: 306 from 2005/3/27
    From: Poland, Zdzies...
    Quote:

    pOS wrote:
    Even though E is one of my alltime favourite languages, i didn't use my E installation fpr quite some years.

    It looks pretty cool for me as well. Recently I discovered an installhook,m module. It lets me the original, general MUI's while() loop left untouched.
    Now I can invoke my funcs / procedures without MUIM_Application_ReturnID ald lots of CASEs in SWITCH loop.

    I would like to play with time in AmigaE and I found a nice module softtimer_oo.m
    There is a ready to compile example:

    Code:
    MODULE 'softtimer_oo'

    PROC main() HANDLE
    DEF x, y, st:PTR TO softtimer
    NEW st.softtimer()

    st.startTimer(4,500000) -> 4.5 seconds
    st.waitForTimer() -> will wait the 4.5 secs

    st.delay(60) -> delay one minute

    FOR x:=0 TO 99
    st.waitAndRestart(0,150000) -> make the loop go in constant speed
    -> indemendent of the CPU!
    FOR y:=0 TO 10000 -> do someting slow..
    ENDFOR -> ..like texturemapping ;)
    ENDFOR

    st.startTimer(3)
    REPEAT
    ping() -> just something stupid for 3 seconds
    UNTIL st.getTimerMsg()=TRUE

    EXCEPT DO
    SELECT exception
    CASE ERR_DEV
    WriteF('Could not open timer.device!n')
    CASE ERR_TIMER
    WriteF('Could not create timerrequest!n')
    CASE ERR_MSGPORT
    WriteF('Could not create mesport!n')
    CASE ERR_NONE
    END st ->>> stop timer and delete msg-ports!
    DEFAULT
    WriteF('Out of memory or something!n')
    ENDSELECT
    ENDPROC

    PROC ping()
    ENDPROC


    I can't compile it, because I got an error message:
    Code:
    Ram Disk:> ecx HD1:Development/Examples/SoftTimerTest.e amigaos ddir=ram:
    ECX 2.3.1 WIP (MorphOS,PPC) by Leif Salomonsson (c) 2002-2013.
    ECX 2.3.1 WIP MorphOS,PPC.
    Lexical and syntax analysis..
    Targeting 'AmigaOS,68K' executable.
    Parsing and generating..
    ERROR: unknown method "softtimer"
    Procedure: main
    Line 5: NEW st.softtimer()


    I'm sure this is not about the module path. I do have it in emodules:softtimer_oo.m
    Why it don't recognize the softtimer object?
    Mac mini G4@1,5GHz silent upgrade + Xerox Phaser 3140 + EPSON Perfection 1240U
    Commodore C64C + 2 x 1541II + Datasette + SD-Box

    I miss draggable screens... and do you? I know I'm in a minority unfortunately.
  • »06.03.16 - 23:39
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Leif
    Posts: 111 from 2006/5/31
    From: Sweden
    Quote:

    r-tea wrote:

    I can't compile it, because I got an error message:
    Code:
    Ram Disk:> ecx HD1:Development/Examples/SoftTimerTest.e amigaos ddir=ram:
    ECX 2.3.1 WIP (MorphOS,PPC) by Leif Salomonsson (c) 2002-2013.
    ECX 2.3.1 WIP MorphOS,PPC.
    Lexical and syntax analysis..
    Targeting 'AmigaOS,68K' executable.
    Parsing and generating..
    ERROR: unknown method "softtimer"
    Procedure: main
    Line 5: NEW st.softtimer()


    I'm sure this is not about the module path. I do have it in emodules:softtimer_oo.m
    Why it don't recognize the softtimer object?



    The automatic glue code between PPC and 68k code only works for procedures, not methods. So in this case the module containing the method would need to be ompiled for MorphOS first. The module conversion code simply drops methods if they are not compiled for same target.
  • »07.03.16 - 20:03
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Leif
    Posts: 111 from 2006/5/31
    From: Sweden
    Quote:

    Leif wrote:
    Quote:

    r-tea wrote:

    I can't compile it, because I got an error message:
    Code:
    Ram Disk:> ecx HD1:Development/Examples/SoftTimerTest.e amigaos ddir=ram:
    ECX 2.3.1 WIP (MorphOS,PPC) by Leif Salomonsson (c) 2002-2013.
    ECX 2.3.1 WIP MorphOS,PPC.
    Lexical and syntax analysis..
    Targeting 'AmigaOS,68K' executable.
    Parsing and generating..
    ERROR: unknown method "softtimer"
    Procedure: main
    Line 5: NEW st.softtimer()


    I'm sure this is not about the module path. I do have it in emodules:softtimer_oo.m
    Why it don't recognize the softtimer object?



    The automatic glue code between PPC and 68k code only works for procedures, not methods. So in this case the module containing the method would need to be ompiled for MorphOS first. The module conversion code simply drops methods if they are not compiled for same target.

    Hmm.. I misread there. Seems all is compiled for 68k. Not sure then :)
    It really shoud work.


  • »07.03.16 - 20:06
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    r-tea
    Posts: 306 from 2005/3/27
    From: Poland, Zdzies...
    Quote:

    Leif wrote:

    The automatic glue code between PPC and 68k code only works for procedures, not methods. So in this case the module containing the method would need to be ompiled for MorphOS first. The module conversion code simply drops methods if they are not compiled for same target.

    Hmm.. I misread there. Seems all is compiled for 68k. Not sure then :)
    It really shoud work.




    Yes, the binary of softtimer module is 68k as well as the target parameter of my attempt.
    Maybe it's because I have AmigaE and ECX installed one next to other? Not sure I should have emodule assign made while I use only ecx compiler. Maybe I should put this module in another location?
    Mac mini G4@1,5GHz silent upgrade + Xerox Phaser 3140 + EPSON Perfection 1240U
    Commodore C64C + 2 x 1541II + Datasette + SD-Box

    I miss draggable screens... and do you? I know I'm in a minority unfortunately.
  • »08.03.16 - 15:37
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Leif
    Posts: 111 from 2006/5/31
    From: Sweden
    Quote:

    r-tea wrote:
    Quote:

    Leif wrote:

    The automatic glue code between PPC and 68k code only works for procedures, not methods. So in this case the module containing the method would need to be ompiled for MorphOS first. The module conversion code simply drops methods if they are not compiled for same target.

    Hmm.. I misread there. Seems all is compiled for 68k. Not sure then :)
    It really shoud work.




    Yes, the binary of softtimer module is 68k as well as the target parameter of my attempt.
    Maybe it's because I have AmigaE and ECX installed one next to other? Not sure I should have emodule assign made while I use only ecx compiler. Maybe I should put this module in another location?



    They coexist nicely. Try commenting out that line if you havent already, to see if all methods are unrecognized. Then try recompiling the module with ECX and place it in ECXMODULES:. Might need a "EmptyCache" in shell, dont remember now.
    Btw, The root of emodules: and ecxmodules: really are for library modules, /nitpick.
  • »08.03.16 - 20:43
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    r-tea
    Posts: 306 from 2005/3/27
    From: Poland, Zdzies...
    Quote:

    Leif wrote:
    Then try recompiling the module with ECX and place it in ECXMODULES:.



    How to recompile the module?

    Btw, I compiled it with the old E 3.3a just now, and it went smoothly :-)


    [ Edited by r-tea 11.03.2016 - 09:45 ]
    Mac mini G4@1,5GHz silent upgrade + Xerox Phaser 3140 + EPSON Perfection 1240U
    Commodore C64C + 2 x 1541II + Datasette + SD-Box

    I miss draggable screens... and do you? I know I'm in a minority unfortunately.
  • »11.03.16 - 07:30
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    igracki
    Posts: 416 from 2003/2/24
    From: Berlin
    Quote:

    r-tea wrote:
    Quote:

    Leif wrote:
    Then try recompiling the module with ECX and place it in ECXMODULES:.



    How to recompile the module?



    You need the source of the module;)
  • »12.03.16 - 11:59
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    r-tea
    Posts: 306 from 2005/3/27
    From: Poland, Zdzies...
    Quote:

    igracki wrote:
    Quote:

    r-tea wrote:
    Quote:

    Leif wrote:
    Then try recompiling the module with ECX and place it in ECXMODULES:.



    How to recompile the module?



    You need the source of the module;)



    Just compile it like that? Then rename it wit ".m" extension?
    Mac mini G4@1,5GHz silent upgrade + Xerox Phaser 3140 + EPSON Perfection 1240U
    Commodore C64C + 2 x 1541II + Datasette + SD-Box

    I miss draggable screens... and do you? I know I'm in a minority unfortunately.
  • »12.03.16 - 15:36
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    igracki
    Posts: 416 from 2003/2/24
    From: Berlin
    You need the source of "softtimer_oo.m" (softtimer_oo.e) and recompile that with ecx, I think thats what Leif meaned.
  • »13.03.16 - 13:30
    Profile Visit Website