Shop Learn
Original ActivityBot possible project — Parallax Forums

Original ActivityBot possible project

I am using the original Activity Board on the Bot chassis, that I have. Below is a little test program, and it comes up with an error, when compiled. Are those libs corrupted, or is there something else that should be added to the program.

Thanks Ray

`/*
ab_test1.c

*/

include "simpletools.h"

include "abcalibrate.h"

include "abdrive.h"

int main()
{
// Add startup code here.

while(1)
{
// Add main loop code here.

}
}
`

Project Directory: F:/programs/ab_test1/ab_test1/

SimpleIDE Version 1.1.2
C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/
C:/Users/ray/Documents/SimpleIDE/ Updated on: 2020-12-19

propeller-elf-gcc.exe -v GCC 4.6.1 (propellergcc_v1_0_0_2408)
propeller-elf-gcc.exe -I . -L . -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Robotics/ActivityBot/libabcalibrate -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Robotics/ActivityBot/libabcalibrate/cmm/ -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Robotics/ActivityBot/libabdrive -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Robotics/ActivityBot/libabdrive/cmm/ -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/cmm/ -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext/cmm/ -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/cmm/ -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Motor/libservo -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Motor/libservo/cmm/ -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libfdserial -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libfdserial/cmm/ -o ab_test1.elf -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 ab_test1.c -lm -labcalibrate -labdrive -lrate -lsimpletools -lsimpletext -lsimplei2c -lservo -lfdserial -lm -labcalibrate -labdrive -lrate -lsimpletools -lsimpletext -lsimplei2c -lservo -lm -labcalibrate -labdrive -lrate -lsimpletools -lsimpletext -lsimplei2c -lm -labcalibrate -labdrive -lrate -lsimpletools -lsimpletext -lm -labcalibrate -labdrive -lrate -lsimpletools -lm -labcalibrate -labdrive -lrate -lm -labcalibrate -labdrive -lm -labcalibrate -lm
c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
collect2: ld returned 1 exit status
Done. Build Failed!

Comments

  • Ray, do this first https://learn.parallax.com/tutorials/language/propeller-c/propeller-c-set-simpleide/update-your-learn-folder and try again.

    Also, which tutorial are you working from in this series? Seems you might be in here https://learn.parallax.com/tutorials/robot/activitybot/activitybot/navigation-basics.

    Ken Gracey

  • Ken GraceyKen Gracey Posts: 7,246
    edited 2021-04-07 20:23

    Looking at this a bit more, usually the calibrate library is used with simpletools (but not with abdrive.h, concurrently):

    // ------ Libraries and Definitions ------

    include "simpletools.h"

    include "abcalibrate.h"

    // ------ Main Program ------
    int main() {
    cal_servoPins(12, 13);
    cal_encoderPins(14, 15);
    high(26);
    high(27);
    cal_activityBot();
    low(26);
    low(27);
    }

    I don't know why the above text is so BOLD, either. Something about the include word.

    In your code, I see it combined with other libraries abdrive too. You might be running out of memory, too. I think the first thing to do is make sure you've got the Simple IDE workspace updated. I may not be able to return to this thread until Thursday.

    Ken Gracey

  • dgatelydgately Posts: 1,441

    Firstly, your 'include" statements need to be '#include' :

    #include "simpletools.h"
    #include "abcalibrate.h"
    #include "abdrive.h"
    

    Fix that and it will either compile or give you a more informative error message. It appears that the "cannot find -lrate' error is because the include (and not #include) lines are being fragmented as the preprocessor tries to interpret them... The 'rate' in '-lrate' is part of 'abcalibrate'.

    dgately

  • @dgately said:
    Firstly, your 'include" statements need to be '#include' :

    #include "simpletools.h"
    #include "abcalibrate.h"
    #include "abdrive.h"
    

    Fix that and it will either compile or give you a more informative error message. It appears that the "cannot find -lrate' error is because the include (and not #include) lines are being fragmented as the preprocessor tries to interpret them... The 'rate' in '-lrate' is part of 'abcalibrate'.

    dgately

    @dgately notice my code has the same problem. This forum software is stripping out the # character in front of the include.

    Ken

  • Dennis, how do you format for code inclusion with this forum tool? I should know. . . .

    Ken Gracey

  • dgatelydgately Posts: 1,441

    @"Ken Gracey" said:
    Dennis, how do you format for code inclusion with this forum tool? I should know. . . .

    Ken Gracey

    Steps:
    1. type 3 backticks
    2. type return
    3. enter my code lines (type them in or copy paste them)
    4. type return
    5. type 3 backticks
    6. type return

    // C type comment
    #include "stdio.h"
    

    It will look like this until you type return after the last 3 backticks:

    ```
    // C type comment
    #include "stdio.h"
    ```

    I did a trick by preceding the backticks & hash with a backslash in the above example just to show how it looks...

  • RsadeikaRsadeika Posts: 3,537

    In my code it is "#include "simpletools.h", for some reason when I pasted the code to the post, it stripped away the "#".

    I just tried the four different Learn folders, and each one comes up with the same errors. I am using the latest SimpleIDE download, so, I am not sure what is going on.

    The SimpleIDE version that is installed, I use to program all my other programs, with no problems showing up. With that said, I think maybe the Libs are corrupted.

    Ray

  • dgatelydgately Posts: 1,441

    Back to Ray's problem...

    Yes, updating SimpleIDE's Learn folder should help... I'm able to compile, with just some warnings about __simple_printf...

    Project Directory: /myUser/Desktop/
    
    SimpleIDE Version 1.1.0
    /myUser/Documents/SimpleIDE/Learn/Simple Libraries/
    /myUser/Documents/SimpleIDE/ Updated on: 2020-03-10
    
    propeller-elf-gcc -v GCC 4.6.1 (propellergcc_v1_0_0-36-g4c46ecb)
    propeller-elf-gcc -I . -L . -I /myUser/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L /myUser/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/lmm/ -I /myUser/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext -L /myUser/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext/lmm/ -I /myUser/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L /myUser/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/lmm/ -I /myUser/Documents/SimpleIDE/Learn/Simple Libraries/Robotics/ActivityBot/libabcalibrate -L /myUser/Documents/SimpleIDE/Learn/Simple Libraries/Robotics/ActivityBot/libabcalibrate/lmm/ -I /myUser/Documents/SimpleIDE/Learn/Simple Libraries/Motor/libservo -L /myUser/Documents/SimpleIDE/Learn/Simple Libraries/Motor/libservo/lmm/ -I /myUser/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libfdserial -L /myUser/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libfdserial/lmm/ -I /myUser/Documents/SimpleIDE/Learn/Simple Libraries/Robotics/ActivityBot/libabdrive -L /myUser/Documents/SimpleIDE/Learn/Simple Libraries/Robotics/ActivityBot/libabdrive/lmm/ -o raysCode.elf -Os -mlmm -m32bit-doubles -fno-exceptions -Dprintf=__simple_printf raysCode.c -lsimpletools -lsimpletext -lsimplei2c -labcalibrate -lservo -lfdserial -labdrive -lsimpletools -lsimpletext -lsimplei2c -labcalibrate -lservo -lfdserial -lsimpletools -lsimpletext -lsimplei2c -labcalibrate -lservo -lsimpletools -lsimpletext -lsimplei2c -labcalibrate -lsimpletools -lsimpletext -lsimplei2c -lsimpletools -lsimpletext -lsimpletools
    In file included from /myUser/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/simpletools.h:118:0,
                     from raysCode.c:6:
    /myUser/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext/simpletext.h:309:1: warning: '__simple_printf' is an unrecognized format function type [-Wformat]
    
    propeller-load -s raysCode.elf
    propeller-elf-objdump -h raysCode.elf
    Done. Build Succeeded!
    
    
  • RsadeikaRsadeika Posts: 3,537

    I downloaded and installed the latest version of SimpleIDE:
    SimpleIDE Version 1.1.2
    C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/
    C:/Users/ray/Documents/SimpleIDE/ Updated on: 2021-04-07
    I noticed that you are using:
    SimpleIDE Version 1.1.0
    /myUser/Documents/SimpleIDE/Learn/Simple Libraries/
    /myUser/Documents/SimpleIDE/ Updated on: 2020-03-10
    Is their some kind of difference between 1.1.0 and 1.1.2 versions. Yes, with the latest download, I am still getting those errors.

    Ray

  • dgatelydgately Posts: 1,441
    edited 2021-04-07 21:58

    @Rsadeika said:
    I downloaded and installed the latest version of SimpleIDE:
    SimpleIDE Version 1.1.2
    I noticed that you are using:
    SimpleIDE Version 1.1.0
    Is their some kind of difference between 1.1.0 and 1.1.2 versions. Yes, with the latest download, I am still getting those errors.

    Ray

    Interesting... I actually have several versions of SimpleIDE ;)

    I just downloaded the latest SimpleIDE for macOS and it is: version 1.1.0...

    I actually use a 1.0.2rc version because it allows me to use the old non-project set up as well as spin-based projects rather than just C...

  • RsadeikaRsadeika Posts: 3,537

    Today I tried out the ..360 libs, I am getting the same errors. I am using a Windows 10 setup, so everything should be working as expected. It looks like the Libs are out of sync with SimpleIDE.

    I know that Parallax is pushing Blockly, but I was hoping that they would keep SimpleIDE around for a lot longer.

    Ray

    `/*
    ab_test1.c

    */

    include "simpletools.h"

    include "abcalibrate360.h"

    include "abdrive360.h"

    int main()
    {
    // Add startup code here.
    //calServoPins(12,13);
    high(26);
    high(27);
    //cal_activityBot();
    low(26);
    low(27);

    //while(1)
    //{
    // Add main loop code here.

    //}
    }
    `

    Project Directory: C:/Users/ray/Documents/SimpleIDE/My Projects/ab_test1/

    SimpleIDE Version 1.1.2
    C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/
    C:/Users/ray/Documents/SimpleIDE/ Updated on: 2021-04-07

    propeller-elf-gcc.exe -v GCC 4.6.1 (propellergcc_v1_0_0_2408)
    propeller-elf-gcc.exe -I . -L . -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Robotics/ActivityBot/libabcalibrate -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Robotics/ActivityBot/libabcalibrate/cmm/ -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Robotics/ActivityBot/libabdrive -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Robotics/ActivityBot/libabdrive/cmm/ -I ./../../Learn/Simple Libraries/Robotics/ActivityBot/libabcalibrate -L ./../../Learn/Simple Libraries/Robotics/ActivityBot/libabcalibrate/cmm/ -I ./../../Learn/Simple Libraries/Robotics/ActivityBot/libabdrive -L ./../../Learn/Simple Libraries/Robotics/ActivityBot/libabdrive/cmm/ -I ./../../Learn/Simple Libraries/Robotics/ActivityBot360/libabcalibrate360 -L ./../../Learn/Simple Libraries/Robotics/ActivityBot360/libabcalibrate360/cmm/ -I ./../../Learn/Simple Libraries/Robotics/ActivityBot360/libabdrive360 -L ./../../Learn/Simple Libraries/Robotics/ActivityBot360/libabdrive360/cmm/ -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/cmm/ -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext/cmm/ -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/cmm/ -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Motor/libservo360 -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/Motor/libservo360/cmm/ -I C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libfdserial -L C:/Users/ray/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libfdserial/cmm/ -o cmm/ab_test1.elf -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 ab_test1.c -lm -labcalibrate -labdrive -labcalibrate360 -labdrive360 -lrate -lrate360 -lsimpletools -lsimpletext -lsimplei2c -lservo360 -lfdserial -lm -labcalibrate -labdrive -labcalibrate360 -labdrive360 -lrate -lrate360 -lsimpletools -lsimpletext -lsimplei2c -lservo360 -lm -labcalibrate -labdrive -labcalibrate360 -labdrive360 -lrate -lrate360 -lsimpletools -lsimpletext -lsimplei2c -lm -labcalibrate -labdrive -labcalibrate360 -labdrive360 -lrate -lrate360 -lsimpletools -lsimpletext -lm -labcalibrate -labdrive -labcalibrate360 -labdrive360 -lrate -lrate360 -lsimpletools -lm -labcalibrate -labdrive -labcalibrate360 -labdrive360 -lrate -lrate360 -lm -labcalibrate -labdrive -labcalibrate360 -labdrive360 -lrate -lm -labcalibrate -labdrive -labcalibrate360 -labdrive360 -lm -labcalibrate -labdrive -labcalibrate360 -lm -labcalibrate -labdrive -lm -labcalibrate -lm
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate360
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate360
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate360
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate360
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate360
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate360
    c:/program files (x86)/simpleide/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld.exe: cannot find -lrate
    collect2: ld returned 1 exit status
    Done. Build Failed!

Sign In or Register to comment.