Shop OBEX P1 Docs P2 Docs Learn Events
riscvp2: a C and C++ compiler for P2 - Page 8 — Parallax Forums

riscvp2: a C and C++ compiler for P2

1234568»

Comments

  • RaymanRayman Posts: 14,343
    edited 2024-09-18 22:21

    @ersmith I'll try that thanks.

    On another front, I'm having problem with loadp2 and the -HIMEM=flash .elf outputs.
    Seems above some size, it gives me:

    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...   
    

    On one computer, was able to fix it by adding the "-v" verbose option.
    Haven't found a solution yet on another...

    WAIT A SEC. Seems the binary on the working PC also works on this problem PC...
    Must be a problem in the code somewhere...

  • RaymanRayman Posts: 14,343
    edited 2024-09-19 13:39

    @ersmith Ok, does seem there is a problem with loadp2 and -himem=flash.
    One setup did not have "#define MICROPY_PY_SELECT (1)" in it and was just a hair smaller and that works.
    But, when that is added, it can no longer load.
    The difference in code size is tiny:

    text data bss dec
    294540 16936 217640 529116 --> Won't load
    292848 16904 217640 527392 --> Loads ok

    Here are two elf examples. Smaller one loads, bigger one won't...

  • RaymanRayman Posts: 14,343

    Added an extra delay in loadp2.c and seems to have fixed it:

    static int verify_chksum(unsigned chksum)
    {
        unsigned recv_chksum = 0;
        int num;
        wait_drain();
        //msleep(1+fifo_size*10*1000/loader_baud);
        //num = rx_timeout((uint8_t *)buffer, 3, 400);
        msleep(50);//RJA
    
Sign In or Register to comment.