Menu

OP Command Line compiled and running on a Raspberry Pi 3

Anonymous
2019-03-01
2019-03-01
  • Anonymous

    Anonymous - 2019-03-01

    Hi,
    just want to report that I did compile and run CLI OP on a Raspberry PI 3.
    IT WORKS!

    My PI3 requires to connect OP to a powered USB hub, it seems that the PI3 itself cannot supply the needed power to the Voltage Booster...

    Also, the PI3 (v1) seems to be a little bit slow for the OP Protocol to work properly... it fails in writing sometimes...
    Also, I had to shutdown the Raspbian Graphical Environment and run it from a Command Line...

    Will do more tests later, because this is one of the way I like to use OP, from a dedicated device... if possible...

    pi@raspberrypi:~/CLI/op-0.11.0 $ make
    gcc '-DVERSION="0.11.0"' -w -Os -s  -c op.c
    gcc '-DVERSION="0.11.0"' -w -Os -s  -c progP12.c
    gcc '-DVERSION="0.11.0"' -w -Os -s  -c progP16.c
    gcc '-DVERSION="0.11.0"' -w -Os -s  -c progP18.c
    gcc '-DVERSION="0.11.0"' -w -Os -s  -c progP24.c
    gcc '-DVERSION="0.11.0"' -w -Os -s  -c progEEPROM.c
    gcc '-DVERSION="0.11.0"' -w -Os -s  -c progAVR.c
    gcc '-DVERSION="0.11.0"' -w -Os -s  -c fileIO.c
    gcc '-DVERSION="0.11.0"' -w -Os -s  -c deviceRW.c
    gcc '-DVERSION="0.11.0"' -w -Os -s  -c I2CSPI.c
    gcc '-DVERSION="0.11.0"' -w -Os -s  -c strings.c
    gcc '-DVERSION="0.11.0"' -w -Os -s  op.o progP12.o progP16.o progP18.o progP24.o progEEPROM.o progAVR.o fileIO.o deviceRW.o I2CSPI.o strings.o -o op -lrt 
    
    
    pi@raspberrypi:~/CLI/op-0.11.0 $ ls op -alh
    -rwxr-xr-x 1 pi pi 299K Mar  1 12:27 op
    
    
    pi@raspberrypi:~/CLI/op-0.11.0 $ ./op
    op [options]
    -BKosccal                   load BKosccal from file
    -calib                      load calibration from file
    -command <message>          send <message> to the programmer and exit.
                                The message is composed of up to 64 hexadecimal bytes separated by a space;
                                those not specified are 0
    -cwX <cw>                   force config word X [1-7]
    -d, device <dev.>           device
    -ee                         use eeprom
    -err <max>                  max errors during writing
    -fuse <val>                 write fuse low byte (Atmel only)
    -fuseh <val>                write fuse high byte (Atmel only)
    -fusex <val>                write extended fuse byte (Atmel only)
    -fuse3k <val>               write fuse low byte at 3 kHz (Atmel only)
    -h, help                    help
    -HWtest                     hardware test
    -i, info                    informations about programmer
    -i2c_r <N Ctr Addr>         read N bytes from I2C bus
    -i2c_r2 <N Ctr Addr(2)>     read N bytes from I2C bus (16b address)
    -i2c_w <N Ctr Addr Data>    write N bytes to I2C bus
    -i2c_w2 <N Ctr Addr(2) D.>  write N bytes to I2C bus (16b address)
    -i2cspeed <s>               set I2C speed: 0=100k,1=200k,2=500k,3=800k
    -id                         use ID
    -icd <val>                  enable ICD (goto address)
    -l, log [=file]             save log
    -lang <language>            load <language> strings
    -langfile                   write all strings to file
    -lock <val>                 write lock byte (Atmel only)
    -mode <mode>                SPI mode: 00,01,10,11
    -nolvcheck                  skip 3.3V regulator check
    -osccal                     loads osccal from file instead of using the value saved before erase
    -p, path <path>             programmer path [/dev/usb/hiddev0]
    -pid <pid>                  programmer pid [0x100]
    -r, reserved                read reserved area
    -rep <n>                    report size [64]
    -s1, S1                     Multiple programming triggered by S1
    -s, save <file>             save Ihex file
    -se, saveEE <file>          save EEPROM on Ihex file (ATxxxx only)
    -spi_r <N>                  read N bytes from SPI bus
    -spi_w <N Data>             write N bytes to SPI bus
    -spispeed <s>               set SPI speed: 0=100k,1=200k,2=500k,3=800k
    -support                    supported devices
    -use_BKosccal               copy BKosccal to osccal
    -v, version                 version
    -vid <vid>                  programmer vid [0x4D8]
    -w, write <file>            write Ihex file
    -we, writeEE <file>         write EEPROM on Ihex file (ATxxxx only)
    
    ex.  op -d 12F683 -s test.hex
    
    
    pi@raspberrypi:~/CLI/op-0.11.0 $ ./op -d 12F1501 -nolvcheck -w xc8_12F1501_blink.X.production.hex
    Programmer detected on /dev/usb/hiddev0
    Programmer detected
    Firmware version 0.11.0
    Hardware ID: 0.0.1 (18F2550)
    
    xc8_12F1501_blink.X.production.hex :
    
    Code memory:
    0000: 2801 2BFE FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 
    03C0: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 3058 0021 0099 0008 3016 0021 
    03D0: 0097 0008 23D6 23CA 23CE 0008 0022 018C 303B 0021 008C 3013 0023 008C 303B 0024 
    03E0: 008C 0021 1395 0022 019D 0008 23D2 0020 150C 3041 00F1 30EE 00F0 0BF0 2BED 0BF1 
    03F0: 2BED 0000 0020 110C 3041 00F1 30EE 00F0 0BF0 2BF8 0BF1 2BF8 0000 2BE7 0020 2BE6 
    8000: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFE4 FFFF 
    
    USB voltage too low (VUSB<4.5V)
    Regulator up and running after 0ms VPP=8.5V
    
    DevID: 0x2CC3
    12F1501 rev3
    Calibration word 1: 0x333B
    Calibration word 2: 0x19FD
    Erasing ... completed
    Writing code ... completed
    Verifying code ... completed, 0 errors
    Writing CONFIG area ... completed, 0 errors
    
    End (0.16 s) 0 errors
    

    Regards,
    Valter

     
  • Alberto Maccioni

    Good job!
    Regarding those errors, I doubt your PI is too slow, there must be something else tied to the USB communication.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.