zceemja / psoc1_prog

Cypress PSoC1 Programmer using Arduino nano
4 stars 2 forks source link
arduino arduino-nano cypress programmer-tool psoc psoc1

Cypress PSoC® 1 Programmer

This allows to program PSoC1 devices using atmega168 (Arduino Nano) board.

Setup

Flash arduino nano with:

platformio run --target upload --environment atmega168

Connections:

Arduino Cypress Chip
+5V +5V
GND GND
D8 SCL
D11 XRES
D12 SDA

Programmer

Programmer options:

python programmer.py --help
usage: programmer.py [-h] [-i INPUT] [-o OUTPUT] [--offset OFFSET] [--count COUNT] [--read] [--reset] [--init INIT] port {flash,checksum,device,read,erase,reset}

positional arguments:
  port                  Serial port
  {flash,checksum,device,read,erase,reset}
                        Command to run
                        flash - write .hex to device
                        checksum - returns program checksum from device
                        device - returns device name or identification hex
                        read - dumps device program to file
                        erase - deletes all devices program memory
                        reset - restarts device

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        Input intel hex file for flashing
  -o OUTPUT, --output OUTPUT
                        Output binary for memory dump
  --offset OFFSET       Memory dump read address offset
  --count COUNT         Memory dump read count
  --read                Read back program when flashing to double check
  --reset               Reset device after command is complete
  --init INIT           Reinitialise programming mode on device

You can flash using .hex file made by PSoC Designer like so:

programmer.py {PORT} flash -i {hex file}

TODO

Supported devices

Project is based on https://www.cypress.com/file/42196/download