Shop OBEX P1 Docs P2 Docs Learn Events
SimpleIde and PPDB — Parallax Forums

SimpleIde and PPDB

frank freedmanfrank freedman Posts: 1,974
edited 2017-07-02 19:33 in Propeller 1
Has anyone run into problems with the load of the PPDB using SimpleIde? Simple IDE (Linux 1.1.1) works with Bare chip on breadboard, Activity Board, but not the PPDB. BST will work on all of these. Also noted that there seemed to be no selection for the PPDB in Simple IDE.

Thanks,

FF

rescue me output

propeller-elf-gcc -v GCC 4.6.1 (propellergcc-alpha_v1_9_0_)
propeller-elf-gcc -I . -L . -I /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/cmm/ -I /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext -L /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext/cmm/ -I /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/cmm/ -o Welcome.elf -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 Welcome.c -lm -lsimpletools -lsimpletext -lsimplei2c -lm -lsimpletools -lsimpletext -lm -lsimpletools -lm
propeller-load -s Welcome.elf
propeller-elf-objdump -h Welcome.elf
Done. Build Succeeded!

proploader -e -r -I /opt/parallax/propeller-load/ -b eeprom -p /dev/ttyUSB0 Welcome.elf
Opening file 'Welcome.elf'
Downloading file to port /dev/ttyUSB0
5576 bytes remaining
ERROR: Download failed: -1

Opening file 'Welcome.elf'Downloading file to port /dev/ttyUSB0
5576 bytes remaining
ERROR: Download failed: -1

Comments

  • You could add a small loader delay, which 'might' work...

    delay.png

    Try a 1 or 2 and see if your load works.


    dgately
    520 x 409 - 77K
  • I've used SimpleIDE (windows) with my PPDB with no problem (except failing to remember that the PPDB doesn't get its power from the USB port).

    As far as which board to use, I believe I used the Activity Board setting. I might have used "other"? It's just important to use a board setting that has a 64kB EEPROM and 5mhz xtal.

    Tom
  • Did you get that SimpleIDE download from david.zemon.name:8111 or did you compile it yourself? I just ask because I don't have many reports of people using that successfully, so I'm interested to hear if I can add you to the list.
  • Got it from the DavidZemon link. All seems to work up to the point of download, then fail. Will try longer delay..
  • Seems like it'd be worth running the proploader command from the command line to see if that gives you some more meaningful diagnostic output. Try this from where Welcome.elf is:
    /opt/parallax/bin/proploader -e -r -I /opt/parallax/propeller-load/ -b eeprom -p /dev/ttyUSB0 Welcome.elf
    
  • First: /opt/parallax/bin/proploader gives file not found. proploader is found in /opt/simpleide/bin/

    Results with path correction:
    debtest@quantum:~/Prop_DEV/SimpleIDE/My Projects$ /opt/simpleide/bin/proploader -e -r -I /opt/parallax/propeller-load/ -b eeprom -p /dev/ttyUSB0 Welcome.elf
    Opening file 'Welcome.elf'
    Downloading file to port /dev/ttyUSB0
    7640 bytes remaining
    ERROR: Download failed: -1

  • Wow... that was unhelpful. David Betz can hopefully help more, he's the author.
  • DavidZemon wrote: »
    Wow... that was unhelpful. David Betz can hopefully help more, he's the author.
    I'm not sure what's going wrong but you could add a -v to the command line to get more verbose output.

  • frank freedmanfrank freedman Posts: 1,974
    edited 2017-07-03 04:57
    ok, startup:
    debtest@quantum:~$ simpleide
    "SimpleIDE" argument count 1
    Arguments:
    "/opt/simpleide/bin/SimpleIDE"
    Locale:
    "/opt/simpleide/translations/SimpleIDE_en_US.qm"
    Temp directory
    "/tmp"
    Mypath reassigned:
    "/opt/parallax/"
    Changed Line Edit for: SimpleIDE_Compiler
    "/opt/parallax/bin/propeller-elf-gcc"
    Value was:
    "/opt/parallax/bin/propeller-elf-gcc"
    My workspace reassigned:
    "/home/debtest/Prop_DEV/SimpleIDE/"
    My simple library path reassigned:
    "/home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/"
    Changed Line Edit for: SimpleIDE_Workspace
    "/home/debtest/Prop_DEV/SimpleIDE/"
    Value was:
    "/home/debtest/Prop_DEV/SimpleIDE/"
    Changed Line Edit for: SimpleIDE_Library
    "/home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/"
    Value was:
    "/home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/"
    Found Default Spin Compiler Path.
    "/opt/parallax/bin/"
    Default Spin Compiler:
    "/opt/parallax/"
    Default Spin Library:
    "/opt/parallax/"
    Changed Line Edit for: SimpleIDE_SpinCompiler
    "/opt/parallax/bin/openspin"
    Value was:
    "/opt/parallax/bin/openspin"
    Changed Line Edit for: SimpleIDE_SpinLibrary
    "/opt/parallax/spin/"
    Value was:
    "/opt/parallax/spin/"
    Changed Line Edit for: SimpleIDE_SpinWorkspace
    "/home/debtest/Prop_DEV/SimpleIDE/"
    Value was:
    "/home/debtest/Prop_DEV/SimpleIDE/"
    Found Default Loader Path.
    Changed Line Edit for: SimpleIDE_Loader
    "/opt/parallax/propeller-load/"
    Value was:
    "/opt/parallax/propeller-load/"
    setEditor 1
    clearTabHighlight Total Tabs 1 Total Editors 1 Current 0
    "/opt/parallax/bin/../Workspace/"
    Learn/Simple Libraries/
    pkwrk QDate("2017-07-01") QTime("23:50:08.155") 34621696
    mywrk QDate("2017-07-01") QTime("23:51:34.190") 34707696
    "/opt/parallax/bin/../Workspace/" is older
    Set Key Value SimpleIDE_Library
    "/home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/"
    Set Key Value SimpleIDE_Workspace
    "/home/debtest/Prop_DEV/SimpleIDE/"
    USB -1
    Added "/dev/ttyS0"
    enumerateports "/dev/ttyS0"
    USB -1
    Added "/dev/ttyS1"
    enumerateports "/dev/ttyS1"
    USB -1
    Added "/dev/ttyS2"
    enumerateports "/dev/ttyS2"
    USB -1
    Added "/dev/ttyS3"
    enumerateports "/dev/ttyS3"
    USB 8
    Added "/dev/ttyUSB0"
    enumerateports "/dev/ttyUSB0"
    USB 8
    Added "/dev/ttyUSB1"
    enumerateports "/dev/ttyUSB1"
    "/opt/simpleide/bin/proploader" ("-W")
    QTextCursor::setPosition: Position '1' out of range
    QTextCursor::setPosition: Position '1' out of range
    QTextCursor::setPosition: Position '1' out of range
    QTextCursor::setPosition: Position '1' out of range
    QTextCursor::setPosition: Position '1' out of range
    wxProcFinished "" 0 QProcess::ExitStatus(NormalExit)
    currentTabChanged "/home/debtest/Prop_DEV/SimpleIDE/My Projects/Welcome.c" true "/home/debtest/Prop_DEV/SimpleIDE/My Projects/Welcome"
    setEditorTab "/home/debtest/Prop_DEV/SimpleIDE/My Projects/Welcome.c" 0 Total Tabs 1 Total Editors 1
    QLayout: Attempting to add QLayout "" to RescueDialog "", which already has a layout

    Now for COG and Activity board FAILURE:
    startProgram 0 time 0
    "/opt/parallax/bin/propeller-elf-gcc -v"
    startProgram 1 time 2
    startProgram 2 time 3
    startProgram 3 time 110
    startProgram 0 time 0
    "/opt/parallax/bin/propeller-elf-gcc -I . -L . -I /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/cog/ -I /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext -L /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext/cog/ -I /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/cog/ -o Welcome.elf -O0 -mcog -m32bit-doubles -fno-exceptions -std=c99 Welcome.c -lm -lsimpletools -lsimpletext -lsimplei2c -lm -lsimpletools -lsimpletext -lm -lsimpletools -lm"
    startProgram 1 time 1
    startProgram 2 time 2

    Now LMM and Activity board, build looked good, load failure:
    startProgram 0 time 0
    "/opt/parallax/bin/propeller-elf-gcc -v"
    startProgram 1 time 3
    startProgram 2 time 4
    startProgram 3 time 112
    startProgram 0 time 0
    "/opt/parallax/bin/propeller-elf-gcc -I . -L . -I /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/lmm/ -I /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext -L /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext/lmm/ -I /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L /home/debtest/Prop_DEV/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/lmm/ -o cog/Welcome.elf -O0 -mlmm -m32bit-doubles -fno-exceptions -std=c99 Welcome.c -lm -lsimpletools -lsimpletext -lsimplei2c -lm -lsimpletools -lsimpletext -lm -lsimpletools -lm"
    startProgram 1 time 2
    startProgram 2 time 3
    startProgram 3 time 59
    startProgram 0 time 0
    "/opt/parallax/bin/propeller-load -s cog/Welcome.elf"
    startProgram 1 time 1
    startProgram 2 time 2
    startProgram 3 time 56
    startProgram 0 time 0
    "/opt/parallax/bin/propeller-elf-objdump -h cog/Welcome.elf"
    startProgram 1 time 1
    startProgram 2 time 3
    startProgram 3 time 107
    ("cog/Welcome.elf", "-e", "-r")
    "/opt/simpleide/bin/proploader -e -r -I /opt/parallax/propeller-load/ -b activityboard -p /dev/ttyUSB0 cog/Welcome.elf"
    "Opening file 'cog/Welcome.elf'\nDownloading file to port /dev/ttyUSB0\n7640 bytes remaining \nERROR: Download failed: -1\n"

    System info:
    Linux quantum 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u1 (2017-06-18) x86_64 GNU/Linux
  • retry propload again:

    debtest@quantum:~/Prop_DEV/SimpleIDE/My Projects/cog$ /opt/simpleide/bin/proploader -v -e -r -I /opt/parallax/propeller-load/ -b eeprom -p /dev/ttyUSB0 Welcome.elf
    Opening file 'Welcome.elf'
    Delivering second-stage loader
    Downloading file to port /dev/ttyUSB0
    7640 bytes remaining
    transmitPacket 8 failed - receiveDataExactTimeout
    transmitPacket 8 failed - retrying
    transmitPacket 8 failed - receiveDataExactTimeout
    transmitPacket 8 failed - retrying
    transmitPacket 8 failed - receiveDataExactTimeout
    transmitPacket 8 failed - retrying
    transmitPacket 8 failed - timeout
    ERROR: Download failed: -1
  • David BetzDavid Betz Posts: 14,511
    edited 2017-07-03 11:21
    proploader uses a two stage loading process. It looks like the first stage worked but the second stage failed. This is likely caused by the second stage not starting correctly. I'm not sure why that would have happened. Are you using one of the old grey PPDBs or one of the new blue ones? I have one of the old ones I could try.

    Edit: Do you have the 5mhz crystal installed? The second-stage loader depends on that.
  • retry propload again:

    debtest@quantum:~/Prop_DEV/SimpleIDE/My Projects/cog$ /opt/simpleide/bin/proploader -v -e -r -I /opt/parallax/propeller-load/ -b eeprom -p /dev/ttyUSB0 Welcome.elf
    Opening file 'Welcome.elf'
    Delivering second-stage loader
    Downloading file to port /dev/ttyUSB0
    7640 bytes remaining
    transmitPacket 8 failed - receiveDataExactTimeout
    transmitPacket 8 failed - retrying
    transmitPacket 8 failed - receiveDataExactTimeout
    transmitPacket 8 failed - retrying
    transmitPacket 8 failed - receiveDataExactTimeout
    transmitPacket 8 failed - retrying
    transmitPacket 8 failed - timeout
    ERROR: Download failed: -1

    Could be the default high-speed setting of the second-stage bootloader, try to slow it down to 115200 bps. To do so you need to edit with a text editor the .cfg file associated with the board you are using and specified with the -b parameter (in your case eeprom.cfg) and located in /opt/simpleide/parallax/propeller-load.

    Add or replace the following entries (some may already exist with different values, make sure to replace all):
    baudrate: 115200
    loader-baud-rate: 115200
    fast-loader-baud-rate: 115200
    

  • You can also do this on the command line with "-D fast-loader-baud-rate=115200".
  • frank freedmanfrank freedman Posts: 1,974
    edited 2017-07-03 18:46
    That seems to have done the trick for load.

    Now on to figure out why cog model can not find any of the simplex libraries..


    Thanks for the load fix!!!

    FF
  • That seems to have done the trick for load.

    Now on to figure out why cog model can not find any of the simplex libraries..


    Thanks for the load fix!!!

    FF

    Just so you know, that's in somewhat uncharted territories. I haven't tested any cog model programs with the Linux version of SimpleIDE. I would hope it works the same as everything else... but there's always a chance that it doesn't!
  • Ok, so I have gotten the basic install to work. No version I have tried will build with cog model. LMM and CMM will build and load. In the prop docs, (granted it is 0.9x) there are six models listed. In the lib directories, there are only two directories, one cmm and the other lmm. Their appears to be no directory for a cog memory model, likely why the build in cog model blows up and whines about not finding simple libs when compiling in COG mode. Now,to figure out what the cog memory lib should b called, how to build these libraries, and how to get all six models selectible in the Simpleide. uncharted territory indeed!!!
  • What program are you trying to compile in COG mode? There are severe restrictions on what will fit in the COG.
  • Morning, David.

    Tried welcome example. And couple others, random pick. Messages when choosing cog model appear unable to find any simple idea libraries. If I go into library directories, there are only libs for lmm and cmm. No other choices are selectable and no cog or other directories exist. Can I get the source to build them or a location of the compiled libs. Are they part of simpleide or propgcc? I am a bit rusty on C, and I have not found all of the workings of SimpleIde.

    Thx,

    FF
  • Tried welcome example. And couple others, random pick. Messages when choosing cog model appear unable to find any simple idea libraries. If I go into library directories, there are only libs for lmm and cmm. No other choices are selectable and no cog or other directories exist. Can I get the source to build them or a location of the compiled libs. Are they part of simpleide or propgcc? I am a bit rusty on C, and I have not found all of the workings of SimpleIde.

    There are some examples under "Propeller GCC Demos" that uses cog mode modules, cog_c_toggle for examples. Generally, search for files with .cogc extension to find other examples as this is the extension that needs to be used to correctly compile for cog model. Beware that in cog mode you have only 512 longs for your program, I don't think any library will fit into that small space, cog mode should be used for low level drivers or other fast calculation needs.
  • Morning, David.

    Tried welcome example. And couple others, random pick. Messages when choosing cog model appear unable to find any simple idea libraries. If I go into library directories, there are only libs for lmm and cmm. No other choices are selectable and no cog or other directories exist. Can I get the source to build them or a location of the compiled libs. Are they part of simpleide or propgcc? I am a bit rusty on C, and I have not found all of the workings of SimpleIde.

    Thx,

    FF
    I think that's to be expected. The SimpleIDE libraries won't work in COG mode as far as I know. I've only written very small COG mode programs. Surely, printf will not fit so that probably eliminates the welcome example. If you try something that only toggles pins that might work.

  • David's point about your test app being too large for cog mode is probably a good point. Parallax may have purposefully not included any cog version of the Simple libraries because of size constraints. If you'd like, though, the static library archives for the Simple libraries are all available in PropWare, compiled in all six memory models. You can either get the headers + library archives only via this download, or a .deb package of the entire PropWare install here. Having access to the static libraries of course won't magically give you enough space to invoke printf (or print or printi) in a cog, but at least it will throw a linker error telling you that's what the problem is :)
  • Propware installed after upping my Debian from stretch to sid. (WTH?!?! Windows like process infection, touch one thing in this case libfontconfig and a bunch of stuff wants to be removed, bigger pain than just going to SID). Command line example worked. simpleide crashes when I try to follow the add library option. there is no option in simpleide to add include path from the project menus. Keep running into broken (404) links trying to get enough info to set up or resolve problems.
  • Well, I tried reproducing your problem with SimpleIDE locally and ran into other problems.

    Needing to update Debian to sid does not sound normal. I'll boot stretch up in a VM and see if I can reproduce that issue.

    Now that you do have PropWare installed though, are you interested in just using its build system? It's reasonably solid on Linux since that's where I do my own work.
  • Hm... I see the problem with PropWare + Debian. Issue has been created here.
  • Yep, that is exactly what happened and why I took it up to SID. I actually have about 3 different distros on 1/4T partitions, just have been to lazy to sync the /etc/passwd, shadow, and groups files across them which presents a bit of a pain. Due to limits of free time, I just stick mostly to one more than the others unless a good reason comes along to play in one of the others. KInda the squirrel effect.

    Actually I am going to use it, but will have a bit of learning to do for C/C++. The links you had to Cmake and make tutorial is 404 at this point, as are a nmber of other items that seemed like they would be useful. Been a while since I fooled seriously with make, and not used cmake. Packaging is always fun. Way back, I used perl at the tail end of the project build to create a fully automated solaris jumpstart load of the whole, OS and app. Be a lot of deep remembering and relearning to do that level of perl again.

    I looked at Clion. Looks interesting enough, just not interesting enough to pay $80 a year for a license to tinker. Eclipse is free but cumbersome as /7734. A good IDE is nice to use, love BST, but no C in that one. gvim works well enough for me,though I am sure someone here will chime in about emacs...... Just need to remaster make/cmake.

    And yes, thank you for all the good work you and others have put in here. I greatly appreciate it.
  • Well David, just installed the Clion package. Just have to figure out the settings for the tools to get the correct ones found and used by Clion. Is there a way to export the settings you use for prop development for use as a starting point?

    Thx
  • Okay, I've spent much of today re-writing the CLion documentation from scratch and it should be much more helpful now. There still are no screenshots, and I know that would vastly improve it, but I'll get there. Take a look the updated page and let me know if that helps to answer some of your questions. And let me know if there is still more you'd like to know. I'd be happy to do a screen-sharing call with you sometime to walk you through the various features of CLion if you'd like.

    Btw, do a control + shift + R to refresh without cache if the page doesn't have "First-Time Setup of CLion" as one of the first headings.
Sign In or Register to comment.