Shop OBEX P1 Docs P2 Docs Learn Events
propgcc: Issue with libpropeller's serial.PutFormatted - Page 2 — Parallax Forums

propgcc: Issue with libpropeller's serial.PutFormatted

2»

Comments

  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-17 15:35
    Sorry - i must be asleep today. I should have given that to you first.

    you don't really need the Python script any more - you're on the last step of the installer at this point. Simply enter the bin directory and run "make VERBOSE=1"
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-17 15:38
    Make brings up an error message when building some cogc modules. Sorry that I always report errors and troubles :-/
    Here is the output of the make command:
    C:\Users\Christian\PropWare\bin>make VERBOSE=1
    C:/Users/Christian/cmake-3.1.1-win32-x86/bin/cmake.exe -HC:/Users/Christian/Prop
    Ware -BC:/Users/Christian/PropWare/bin --check-build-system CMakeFiles/Makefile.
    cmake 0
    C:/Users/Christian/cmake-3.1.1-win32-x86/bin/cmake.exe -E cmake_progress_start C
    :/Users/Christian/PropWare/bin/CMakeFiles C:/Users/Christian/PropWare/bin/CMakeF
    iles/progress.marks
    make -f CMakeFiles/Makefile2 all
    make[1]: Entering directory `/c/Users/Christian/PropWare/bin'
    make -f simple/cog/CMakeFiles/Simple_cog.dir/build.make simple/cog/CMakeFiles/Si
    mple_cog.dir/depend
    make[2]: Entering directory `/c/Users/Christian/PropWare/bin'
    C:/Users/Christian/cmake-3.1.1-win32-x86/bin/cmake.exe -E cmake_depends "Unix Ma
    kefiles" C:/Users/Christian/PropWare C:/Users/Christian/PropWare/simple/cog C:/U
    sers/Christian/PropWare/bin C:/Users/Christian/PropWare/bin/simple/cog C:/Users/
    Christian/PropWare/bin/simple/cog/CMakeFiles/Simple_cog.dir/DependInfo.cmake --c
    olor=
    make[2]: Leaving directory `/c/Users/Christian/PropWare/bin'
    make -f simple/cog/CMakeFiles/Simple_cog.dir/build.make simple/cog/CMakeFiles/Si
    mple_cog.dir/build
    make[2]: Entering directory `/c/Users/Christian/PropWare/bin'
    C:/Users/Christian/cmake-3.1.1-win32-x86/bin/cmake.exe -E cmake_progress_report
    C:/Users/Christian/PropWare/bin/CMakeFiles
    [  0%] Building C object simple/cog/CMakeFiles/Simple_cog.dir/__/abvolts.c.obj
    cd C:/Users/Christian/PropWare/bin/simple/cog && "C:/Program Files (x86)/SimpleI
    DE/propeller-gcc/bin/propeller-elf-gcc.exe"  -DENABLE_PROPWARE_PRINT_FLOAT  -sav
    e-temps -Os     -m32bit-doubles -Wall -std=c99   -mcog -IC:/Users/Christian/Prop
    Ware    -o CMakeFiles/Simple_cog.dir/__/abvolts.c.obj -c C:/Users/Christian/Prop
    Ware/simple/abvolts.c
    C:/Users/Christian/cmake-3.1.1-win32-x86/bin/cmake.exe -E cmake_progress_report
    C:/Users/Christian/PropWare/bin/CMakeFiles
    [  0%] Building C object simple/cog/CMakeFiles/Simple_cog.dir/__/abvoltsDA.c.obj
    
    cd C:/Users/Christian/PropWare/bin/simple/cog && "C:/Program Files (x86)/SimpleI
    DE/propeller-gcc/bin/propeller-elf-gcc.exe"  -DENABLE_PROPWARE_PRINT_FLOAT  -sav
    e-temps -Os     -m32bit-doubles -Wall -std=c99   -mcog -IC:/Users/Christian/Prop
    Ware    -o CMakeFiles/Simple_cog.dir/__/abvoltsDA.c.obj -c C:/Users/Christian/Pr
    opWare/simple/abvoltsDA.c
    C:/Users/Christian/cmake-3.1.1-win32-x86/bin/cmake.exe -E cmake_progress_report
    C:/Users/Christian/PropWare/bin/CMakeFiles
    [  0%] Building C object simple/cog/CMakeFiles/Simple_cog.dir/__/abvoltsF.c.obj
    cd C:/Users/Christian/PropWare/bin/simple/cog && "C:/Program Files (x86)/SimpleI
    DE/propeller-gcc/bin/propeller-elf-gcc.exe"  -DENABLE_PROPWARE_PRINT_FLOAT  -sav
    e-temps -Os     -m32bit-doubles -Wall -std=c99   -mcog -IC:/Users/Christian/Prop
    Ware    -o CMakeFiles/Simple_cog.dir/__/abvoltsF.c.obj -c C:/Users/Christian/Pro
    pWare/simple/abvoltsF.c
    C:/Users/Christian/cmake-3.1.1-win32-x86/bin/cmake.exe -E cmake_progress_report
    C:/Users/Christian/PropWare/bin/CMakeFiles 25
    [  1%] Building C object simple/cog/CMakeFiles/Simple_cog.dir/__/adcACpropab.c.o
    bj
    cd C:/Users/Christian/PropWare/bin/simple/cog && "C:/Program Files (x86)/SimpleI
    DE/propeller-gcc/bin/propeller-elf-gcc.exe"  -DENABLE_PROPWARE_PRINT_FLOAT  -sav
    e-temps -Os     -m32bit-doubles -Wall -std=c99   -mcog -IC:/Users/Christian/Prop
    Ware    -o CMakeFiles/Simple_cog.dir/__/adcACpropab.c.obj -c C:/Users/Christian/
    PropWare/simple/adcACpropab.c
    C:/Users/Christian/PropWare/simple/adcACpropab.c: In function 'adc_start':
    C:/Users/Christian/PropWare/simple/adcACpropab.c:22:23: warning: pointer targets
     in assignment differ in signedness [-Wpointer-sign]
    C:/Users/Christian/PropWare/simple/adcACpropab.c:42:7: warning: unused variable
    'temp' [-Wunused-variable]
    C:/Users/Christian/cmake-3.1.1-win32-x86/bin/cmake.exe -E cmake_progress_report
    C:/Users/Christian/PropWare/bin/CMakeFiles
    [  1%] Building COGC object simple/cog/CMakeFiles/Simple_cog.dir/__/adcACpropab.
    cogc.cog
    cd C:/Users/Christian/PropWare/bin/simple/cog && "C:/Program Files (x86)/SimpleI
    DE/propeller-gcc/bin/propeller-elf-gcc.exe"  -DENABLE_PROPWARE_PRINT_FLOAT  -mco
    g -xc -r -save-temps -Os     -m32bit-doubles -Wall -std=c99     -IC:/Users/Chris
    tian/PropWare    -o CMakeFiles/Simple_cog.dir/__/adcACpropab.cogc.cog -c C:/User
    s/Christian/PropWare/simple/adcACpropab.cogc
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:24:32: warning: type default
    s to 'int' in declaration of 'chNow' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:24:39: warning: type default
    s to 'int' in declaration of 'chThen' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:25:32: warning: type default
    s to 'int' in declaration of 'dout' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:25:38: warning: type default
    s to 'int' in declaration of 'din' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:25:43: warning: type default
    s to 'int' in declaration of 'clk' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:25:48: warning: type default
    s to 'int' in declaration of 'cs' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:25:52: warning: type default
    s to 'int' in declaration of 'mask' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:26:32: warning: type default
    s to 'int' in declaration of 'ndout' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:26:39: warning: type default
    s to 'int' in declaration of 'ndin' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:26:45: warning: type default
    s to 'int' in declaration of 'nclk' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:26:51: warning: type default
    s to 'int' in declaration of 'ncs' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:27:32: warning: type default
    s to 'int' in declaration of 'val' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:27:37: warning: type default
    s to 'int' in declaration of 'i' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:27:40: warning: type default
    s to 'int' in declaration of 'doutval' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:27:49: warning: type default
    s to 'int' in declaration of 'dinval' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:27:57: warning: type default
    s to 'int' in declaration of 'state' [enabled by default]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:30:6: warning: return type o
    f 'main' is not 'int' [-Wmain]
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc: In function 'main':
    C:/Users/Christian/PropWare/simple/adcACpropab.cogc:44:8: warning: pointer targe
    ts in assignment differ in signedness [-Wpointer-sign]
    cd C:/Users/Christian/PropWare/bin/simple/cog && C:/Program Files (x86)/SimpleID
    E/propeller-gcc/bin/propeller-elf-objcopy.exe --localize-text --rename-section .
    text=CMakeFiles/Simple_cog.dir/__/adcACpropab.cogc.cog CMakeFiles/Simple_cog.dir
    /__/adcACpropab.cogc.cog
    /bin/sh: -c: line 0: syntax error near unexpected token `('
    /bin/sh: -c: line 0: `cd C:/Users/Christian/PropWare/bin/simple/cog && C:/Progra
    m Files (x86)/SimpleIDE/propeller-gcc/bin/propeller-elf-objcopy.exe --localize-t
    ext --rename-section .text=CMakeFiles/Simple_cog.dir/__/adcACpropab.cogc.cog CMa
    keFiles/Simple_cog.dir/__/adcACpropab.cogc.cog'
    make[2]: *** [simple/cog/CMakeFiles/Simple_cog.dir/__/adcACpropab.cogc.cog] Erro
    r 2
    make[2]: Leaving directory `/c/Users/Christian/PropWare/bin'
    make[1]: *** [simple/cog/CMakeFiles/Simple_cog.dir/all] Error 2
    make[1]: Leaving directory `/c/Users/Christian/PropWare/bin'
    make: *** [all] Error 2
    
    C:\Users\Christian\PropWare\bin>
    

    Christian
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-17 16:30
    I'm wondering if this is a windows only issue... I'm checking on my virtual machine now.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-17 16:45
    To clarify, how did you go about acquiring PropWare? Source? Binary? What branch are you using? (release-2.0 or release-2.0-nightly)
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-17 16:48
    Hi David,

    I used the Download ZIP button on this page: https://github.com/DavidZemon/PropWare.
    I did not use the nightly branch.

    Regards,
    Christian

    PS: I'm going to bed now, I will give you answers tomorrow if you have any questions later on.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-17 18:10
    Alright, I've found three problems and fixed one of them. There was a compilation error in the release-2.0 branch, so that's gone now. I'm adding that branch to my continuous integration server after I post this, so it won't happen again.

    The second problem I found revolves around spaces in the paths. I hate windows. With a fiery burning passion. I'm tired of dealing with it for the evening... perhaps tomorrow night I'll have more patience for it.

    For the moment, one suggestion is to move PropGCC out of its current directory and into a directory without spaces. Also, remove Simple IDE's propgcc directory from the system path (if it exists).

    Again, I'll work on this more tomorrow. I'm pretty frustrated with Windows at the moment.
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-18 12:32
    Hi David,

    Ok, I'll wait until you could fix the issues, no problem :-)
    Btw: Do you think it makes sense to provide a binary build you did yourself? Would it work if you ZIP that one that I could use it? Sorry for the naive question if it makes no sense. ;-)

    Regards,
    Christian
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-18 12:34
    Binary builds are already available :)

    http://david.zemon.name/downloads/PropWare_Binaries/

    Take the one listed PropWare_current.zip
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-18 13:44
    Thanks very much for the link!!
    I'm going to play a bit, now :-D
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-18 14:04
    Make sure you delete your old copy of PropWare and place the new binary folder in the same location, with the exact same name. There's an environment variable (PROPWARE_PATH) that gets set by the install script, so that variable will be incorrect if that path changes.
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-18 14:17
    I replaced the PropWare directory with the Propware_current.zip contents so the paths are the same.
    Hmm... But I can't use CLion... CLion has by default the MinGW compiler set but I don't know if I can change the toolchain path just to the propeller bin directory or if I have to change something else, too. o_O
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-18 14:19
    Actually, you can leave CLion set to use MinGW. I'm not sure what the point of that setting is... it doens't matter. Mine is set to GCC, not propeller-elf-gcc lol. Just make sure that you don't try to create new projects in CLion - only open existing projects (aka, create the CMakeLists.txt file first and then open that, don't use CLion's project wizard)
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-18 15:05
    Whoooohooooo! :-)
    Just successfully built the MultiCogBlinky example. No errors, freaky :-)

    David, thanks very much for your help. I'm now trying if I can get along with CLion and CMake or if it is too complex for me :-)
    But I think PropWare with all the efforts you put into it, is really a great addon to prop-gcc!
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-18 15:15
    Congrats! Getting an example project running on your dev board is the hardest part. Once that's done, the rest is easy! Just write up a quick CMakeLists.txt file, create a "bin" directory, run "cmake .." from within bin followed by "make debug" and you're off!
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-18 15:26
    I have to understand CMake first, before I can get productive. Especially with cogc files because my project includes several cogc drivers (selfmade ones specific for the project). So I hope everything will work out ;-)
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-18 15:29
    I have to understand CMake first, before I can get productive. Especially with cogc files because my project includes several cogc drivers (selfmade ones specific for the project). So I hope everything will work out ;-)

    Ohhh.... well I'll work on a well-documented, cogc example project tonight then, how about that? :)
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-18 15:57
    David, thanks very much for your help!! I really, really appreciate that! That would help me absolutely a lot!! :-)
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-18 19:43
    There is clearly something wrong with the way PropWare is handling cogc files. I've spent all evening trying to figure it out and still haven't got it just yet. I will update here when it's working.
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-19 00:49
    Hi David,

    No problem, take your time! I know, good things take time to ripen :-)

    Regards,
    Christian
  • DavidZemonDavidZemon Posts: 2,973
    edited 2016-01-01 15:17
    I'm finally tackling the issue revolving around cogc files in libraries (specifically, adcACpropab.cogc in the Learn folder) and upon researching I found this thread. I forgot to update here when I had cogc files working correctly!

    You can now reliably use cogc, cogcpp, ecogc, and ecogcpp files in your project. Each one requires "enabling" a language in your project though. If your project has two files: main.c and my_driver.cogc, then your CMakeLists.txt file would look like this:
    cmake_minimum_required(VERSION 3.0)
    find_package(PropWare 2.0.0 REQUIRED)
    
    set(MODEL cmm)
    
    # If you're using anything other than C and C++, you'll need to explicitly provide all languages in use here
    project(MyCoolCogcProgram C COGC)
    
    create_simple_executable(${PROJECT_NAME}
        main.c
        my_driver.cogc)
    

    And if you want to give cogcpp a try (C++ in a cog rather than C), simply add "XX"
    cmake_minimum_required(VERSION 3.0)
    find_package(PropWare 2.0.0 REQUIRED)
    
    set(MODEL cmm)
    
    # Note that "CXX" is a common way to refer to C++, as is CPP
    project(MyCoolCogcProgram CXX COGCXX)
    
    create_simple_executable(${PROJECT_NAME}
        main.cpp
        my_driver.cogcpp)
    

    The demo is documented here.

    Note that the following only works for cogc files in your project. I am currently working on working with cogc files that are compiled into a library file.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2016-01-05 17:51
    Wrong thread
Sign In or Register to comment.