This allows to program PSoC1 devices using atmega168 (Arduino Nano) board.
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 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}
Project is based on https://www.cypress.com/file/42196/download