Shop OBEX P1 Docs P2 Docs Learn Events
P2 Edge Rev B, FlexProp 7.3.0 Program not saving to flash — Parallax Forums

P2 Edge Rev B, FlexProp 7.3.0 Program not saving to flash

Been a while since I worked with this stuff but I remember that I could run a program, cycle the power and the program would still be there and would auto-start. Now it doesn't store to flash, or have I forgotten something?
The switches haven't changed (I have two of these modules).

Even when I select "Compile and flash" I get a message in the terminal:

ERROR: timeout waiting for checksum at end: got 1
Try increasing the FIFO setting if not large enough for your setup
Press enter to continue...

Can't find anything re: FIFO :|

Comments

  • MicksterMickster Posts: 2,855

    Maybe I'm mistaken. Used an older version and the terminal gives me:

    Invalid option -SPI
    loadp2 - a loader for the propeller 2 - version 0.060 Sep 23 2023
    usage: loadp2
    [ -p port ] serial port
    [ -b baud ] user baud rate (default is 115200)
    [ -l baud ] loader baud rate (default is 2000000)
    [ -f clkfreq ] clock frequency (default is 80000000)
    [ -m clkmode ] clock mode in hex (default is ffffffff)
    [ -s address ] starting address in hex (default is 0)
    [ -t ] enter terminal mode after running the program
    [ -T ] enter PST-compatible terminal mode
    [ -v ] enable verbose mode
    [ -k ] wait for user input before exit
    [ -q ] quiet mode: also checks for exit sequence
    [ -n ] no reset; skip any hardware reset
    [ -9 dir ] serve 9p remote filesystem from dir
    [ -FIFO bytes] modify serial FIFO size (default is 1024 byte
    s)
    [ -? ] display a usage message and exit
    [ -DTR ] use DTR for reset (default)
    [ -RTS ] use RTS for reset
    [ -xDEBUG ] enter ROM debug monitor
    [ -xTAQOZ ] enter ROM version of TAQOZ
    [ -xTERM ] enter terminal, avoid reset
    [ -CHIP ] set load mode for CHIP
    [ -FPGA ] set load mode for FPGA
    [ -PATCH ] patch in clock frequency and serial parms
    [ -NOZERO ] do not clear memory before download (default)
    [ -ZERO ] clear memory before download
    [ -SINGLE ] set load mode for single stage
    [ -NOEOF ] ignore EOF on input
    filespec file to load
    [ -e script ] send a sequence of characters after starting
    P2
    [ -a arg1 [arg2 ...] ] put arguments for program into memory

    In -CHIP mode, filespec may optionally be multiple files with address
    specifiers, such as:
    @ADDR=file1,@ADDR=file2,@ADDR+file3
    Here ADDR is a hex address at which to load the next file, followed by = or +
    If it is followed by + then the size of the file is put in memory followed by
    the file data. This feature is useful for loading data that a program wishes
    to act on. For example, a VGA program which displays data from $1000 may be
    loaded with:
    @0=vgacode.bin,@1000=picture.bmp
    The main executable code must always be specified first

  • VonSzarvasVonSzarvas Posts: 3,598
    edited 2025-07-28 10:23

    @Mickster said:
    The switches haven't changed (I have two of these modules).

    Make sure the FLASH switch is ON-upward (and the two arrow switches OFF). -- if FLASH is already on, then toggle it on/off a couple times; might just be a lazy connection from sitting/bashing around.
    Also ensure the SD card is removed (if you have one inserted :)

  • MicksterMickster Posts: 2,855

    Still the same with both Rev B modules. I get the same message as in OP. The binary is only 7KB :|

  • MicksterMickster Posts: 2,855

    Just realized that the #2 module fired-up blinking an LED so clearly that program was successfully stored, many moons ago.

  • RaymanRayman Posts: 15,400
    edited 2025-07-28 14:55

    I’d try with prop tool or spin tools

    Or -single

    Or maybe add fake data so program is bigger…

  • MicksterMickster Posts: 2,855

    @Rayman said:
    I’d try with prop tool or spin tools

    Or -single

    Or maybe add fake data so program is bigger…

    Cheers, Ray.
    Yeah I had the same idea re: prop tool. It doesn't complain when sending the binary but the progress indicator is done in the blink of an eye and the program doesn't execute. I don't believe spin tools directly handles binaries(???).
    Ya know what, I'll get back to my desk and try some regular SPIN programs to see if any different :+1:

  • MicksterMickster Posts: 2,855

    Sure enough :+1:

    Blink1.spin2 saves to flash and runs after a power cycle. :|

  • JonnyMacJonnyMac Posts: 9,392

    I don't believe spin tools directly handles binaries(???).

    It does. Use F11 just like in Propeller Tool. Note that it does use its own loader.

  • MicksterMickster Posts: 2,855

    @JonnyMac said:

    I don't believe spin tools directly handles binaries(???).

    It does. Use F11 just like in Propeller Tool. Note that it does use its own loader.

    Ah, forgot to correct myself; it was Propeller IDE that I tried. Really nice looking IDE, wish it supported FlexBasic B)

  • MicksterMickster Posts: 2,855

    So I found FlexProp 5.5.2 archived in my DropBox and now I have success :+1:

    What am I to deduce? Edge Rev B not compatible with newer FlexProp? I don't see that being the case. :|

    I guess I need to go grab my KISS modules.

    Craig

  • MicksterMickster Posts: 2,855

    @JonnyMac said:

    I don't believe spin tools directly handles binaries(???).

    It does. Use F11 just like in Propeller Tool. Note that it does use its own loader.

    Hi Jon,

    As far as I can tell, you can't load a binary (compiled with FlexProp) in order to use F11(??)

    Right now I am compiling with FlexProp 7.3.0 and then when I need to stick my program in flash I just use FlexProp 5.5.2 to Flash Binary.

  • JonnyMacJonnyMac Posts: 9,392

    As far as I can tell, you can't load a binary (compiled with FlexProp) in order to use F11(??)

    Sorry, I may have misunderstood; I thought you wanted to compile and load a binary which F11 will do.

    That said, @macca has another tool that is a GUI loader for precompiled modules. This was made to help developers help their customers. You can get it from Marco's web site: https://maccasoft.com/en/propeller-firmware-loader/

  • ersmithersmith Posts: 6,193

    It looks like something is broken in the flash programmer in loadp2 for Windows, which is weird: I don't know how we've missed that.

    Fortunately, proploader can also program flash, so on the command line you can do something like:

    bin/proploader.exe -2 -Dbaud-rate=230400 -e blink.binary -t
    

    to flash and run a program like "blink.binary".

    You can also use the FlexProp GUI to do this if you go to "Commands > Configure Commands" and change the "Flash command" string to:

    "%D/bin/proploader" -k -2 -Dbaud-rate=%r %P "%B" -e
    

    (which is very similar to the "Wifi run command" just above it, but with -e for "flash eeprom" instead of -r for "run serial", and without the %9 -q)

  • RaymanRayman Posts: 15,400

    There’s a thread about this we need to find….

    Another trick is to make a fake spin2 file with only the binary embedded in a dat section…

  • MicksterMickster Posts: 2,855

    @JonnyMac
    Oh wonderful, many thanks, worked straightaway :+1:

    @ersmith
    Darn it :D
    I knew that this "Commands" (or something) had to exist. How the heck did I miss it :+1:
    Many thanks.
    Also, the latest terminal "Hit enter to continue" simply does a CR/LF whereas the older terminal would close.

  • MicksterMickster Posts: 2,855

    @Rayman said:
    There’s a thread about this we need to find….

    Was it this one?

  • RaymanRayman Posts: 15,400

    Found it:
    https://forums.parallax.com/discussion/175848/is-there-a-recommendation-for-binary-distribution-of-p2-code/p1

    Think need to use -SPI option for loadp2
    Undocumented? been a while...

  • evanhevanh Posts: 16,624

    I'm guessing -SPI has since been changed to -FLASH

    loadp2 - a loader for the propeller 2 - version 0.076 Mar 30 2025
    usage: loadp2
             [ -p port ]               serial port
             [ -b baud ]               user baud rate (default is 115200)
             [ -l baud ]               loader baud rate (default is 2000000)
             [ -f clkfreq ]            clock frequency (default is 80000000)
             [ -m clkmode ]            clock mode in hex (default is ffffffff)
             [ -s address ]            starting address in hex (default is 0)
             [ -t ]                    enter terminal mode after running the program
             [ -T ]                    enter PST-compatible terminal mode
             [ -v ]                    enable verbose mode
             [ -k ]                    wait for user input before exit
             [ -q ]                    quiet mode: also checks for exit sequence
             [ -n ]                    no reset; skip any hardware reset
             [ -9 dir ]                serve 9p remote filesystem from dir
             [ -FIFO bytes]            modify serial FIFO size (default is 8192 bytes)
             [ -? ]                    display a usage message and exit
             [ -DTR ]                  use DTR for reset (default)
             [ -RTS ]                  use RTS for reset
             [ -xDEBUG ]               enter ROM debug monitor
             [ -xTAQOZ ]               enter ROM version of TAQOZ
             [ -xTERM ]                enter terminal, avoid reset
             [ -NOZERO ]               do not clear memory before download (default)
             [ -ZERO ]                 clear memory before download
             [ -PATCH ]                patch in clock frequency and serial parms
             [ -SINGLE ]               set load mode for single stage
             [ -FLASH ]                program application to SPI flash
             [ -NOEOF ]                ignore EOF on input
             [ -HIMEM=flash ]          addresses 0x8000000 and up refer to flash
             filespec                  file to load
             [ -e script ]             send a sequence of characters after starting P2
             [ -a arg1 [arg2 ...] ]    put arguments for program into memory
    
  • evanhevanh Posts: 16,624
    edited 2025-07-29 16:00

    PS: Tested with -FLASH, and -v to get any reporting ...

    trying /dev/serial/by-id/usb-Parallax_Inc._Propeller_P2-EVAL-ES_DN43WU6I-if00-port0...
    P2 version G found on serial port /dev/serial/by-id/usb-Parallax_Inc._Propeller_P2-EVAL-ES_DN43WU6I-if00-port0
    Setting load mode to CHIP
    Setting clock_mode to 12427f8
    Loading fast loader...
    address=0x000fc000 size=2ac
    device response to header: `s'
    chksum: 3a OK
    Loading eeprom_check.binary - 8372 bytes
    address=0x00000000 size=20b4
    device response to header: `s'
    chksum: e7 OK
    highest hub address: 0x20b4 chksum: 0xea4ce5e4
    address=0x80000000 size=400
    device response to header: `k'
    Sending blocks: .chksum: 8e OK
    sending F 0x000020b4 to device
    ( Entering terminal mode.  Press Ctrl-] or Ctrl-Z to exit. )
       clkfreq = 20000000   clkmode = 0x100094b
      Compiled with FlexC v7.4.1-beta-v7.4.0-3-gd3cadbe0
    ...
    

    And pressing reset button repeats the terminal prints, so successful test.

  • MicksterMickster Posts: 2,855

    @ersmith said:

    You can also use the FlexProp GUI to do this if you go to "Commands > Configure Commands" and change the "Flash command" string to:

    "%D/bin/proploader" -k -2 -Dbaud-rate=%r %P "%B" -e
    

    Bingo :):+1:

Sign In or Register to comment.