Shop OBEX P1 Docs P2 Docs Learn Events
Problem using loadp2 with edge modules — Parallax Forums

Problem using loadp2 with edge modules

I'm having trouble loading code into P2 edge modules, and I've narrowed it down to loadp2, I think. I've been happily using it on my P2 eval board (Rev B ) for a while, and I have a couple edge modules (Rev B, Rev D) that I figured I'd try out. But loading code with loadp2 on the edge modules doesn't work, and I can't for the life of me figure out what I'm missing. Here's what I've tried, all of the following works (using loadp2 -b230400 -xTERM for serial):

  • Serial is ok: Connect via serial to eval board and both edge modules with term program and issue > Prop_Chk 0 0 0 0, verify response of "Prop_Ver G"
  • Manual program loading ok: Load a simple program over serial (> Prop_Hex 0 0 0 0 FB F7 23 F6 FD FB 23 F6 25 26 80 FF 1F 80 66 FD F0 FF 9F FD ~ from the docs), verify blinking LEDs
  • loadp2 program loading to eval board ok: Write the asm for the program above, compile it with flexprop -p2, verify that it has the same hex content as the test program, load it into the eval board, verify blinking LEDs

What doesn't work is that last step, but loading it onto an edge module. So I know the modules work, I know loadp2 can connect and manually send data to them, and I know that loadp2 can send to the eval board. But something goes wrong loading to the edge modules with the exact same code and mechanism. Is there something about the fast loader I'm stumbling over, maybe?

I swear this is going to be something really trivial that I'm overlooking, but I've been tinkering with this for too long with no result so I figured it's time to run it by you all. Thanks in advance for any help.

Bart

Comments

  • RaymanRayman Posts: 14,754
    edited 2022-12-17 23:49

    That does sound strange... Can you try it from the Flexprop gui? Maybe your loadp2 is old or something?
    If you post your test program, I guess I could try it with my edge, but I'm guessing it would work...
    Hope you can figure it out!

  • Maybe your loadp2 is old or something?

    Right, I totally forgot to mention that I'm using loadp2 "version 0.057 Dec 6 2022" on macOS 13.0.1.

    Program is from the docs:

    DAT ORG
            not  dirb       'all outputs
    .lp     not  outb       'toggle states (blinks leds on Prop123 & P2 Eval boards)
            waitx  ##20_000_000/4  'wait ¼ second
            jmp  #.lp       'loop
    

    I'll try the Flexprop GUI in a little bit, thanks for the suggestion.

  • Mac OS X has had issues in the past which I worked on to alleviate in loadp2 by compensating more for delays in the protocol, and this was especially noticed in the Edge board. I was using OS 10.10 however, and yours is newer. There is a -FIFO parameter to loadp2 you might try to adjust (increase) to see if it helps...

  • Can you try it from the Flexprop gui?

    The Flexprop GUI worked, which led me to figuring out the problem, which is now obvious. I needed to add -t to keep loadp2 from immediately exiting and resetting the prop plug. So:

    NO: loadp2 test.binary

    YES: loadp2 test.binary -t

    Thanks again!

  • ke4pjwke4pjw Posts: 1,169
    edited 2022-12-19 03:53

    Do you have an SD card plugged in and have it mounted when programming the flash? For some reason that will prevent it from booting after programming the flash. You CAN program RAM and it boot properly.

    Ah, I see you got it. Good!

Sign In or Register to comment.