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,632
    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,632
    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,632

    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
    
  • RaymanRayman Posts: 14,632

    @ersmith Watching this video about RISCV in FPGA...
    They are making a big deal about being able to create custom instructions.
    But, this is something that already exists in riscvp2, right?

    Know there are custom instructions available, but not sure if they are considered part of ALU or not...

    1460 x 745 - 698K
  • ersmithersmith Posts: 6,051

    @Rayman said:
    @ersmith Watching this video about RISCV in FPGA...
    They are making a big deal about being able to create custom instructions.
    But, this is something that already exists in riscvp2, right?

    Know there are custom instructions available, but not sure if they are considered part of ALU or not...

    Yes, riscvp2 has custom instructions for a bunch of P2 operations (such as pin manipulation). It uses the standard instruction space that RISC-V reserves for custom instructions.

    riscvp2 isn't an interpreter, so "considered part of the ALU" doesn't really apply.

Sign In or Register to comment.