- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to program PSoC 5LP from python.
I am on Windows 10 Pro, 64 bit. I am using python 3.4.4, and PSoC 5LP kit, connected via kit prog to PC. I am able to program the device using PSoC creator 4.0, update 1.
I tried to program the device using "C:\Program Files (x86)\Cypress\Programmer\Examples\Programming\PSoC3_5\SWD\Python_Ex\Python_Ex.py"
I modified this script to point to my hex file.
However, I am getting this error below:
-------------------------------------------
C:\Program Files (x86)\Cypress\Programmer\Examples\Programming\PSoC3_5\SWD\Python_Ex>python Python_Ex.py
File "Python_Ex.py", line 418
print "Mismatch of Checksum: Expected 0x%x, Got 0x%x" %(flashChecksum, hexChecksum)
^
SyntaxError: invalid syntax
-------------------------------------------
Also, if multiple PSoCs are connected to the same PC (via kit prog), how will I program them all, one by one?
Regards,
Vishnu
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also want to program my PSoC 5LP with python, but I have no idea how.
With that said, and taking into account what you wrote:
"I am using python 3.4.4"
line 418
print "Mismatch of Checksum: Expected 0x%x, Got 0x%x" %(flashChecksum, hexChecksum)
^
SyntaxError: invalid syntax
I think it's because, in python 3, the syntax for print is something like
- print("Mismatch of Checksum: Expected 0x%x, Got 0x%x" %(flashChecksum, hexChecksum))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes,you have to program one by one each PSoC by KitProg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also want to program my PSoC 5LP with python, but I have no idea how.
With that said, and taking into account what you wrote:
"I am using python 3.4.4"
line 418
print "Mismatch of Checksum: Expected 0x%x, Got 0x%x" %(flashChecksum, hexChecksum)
^
SyntaxError: invalid syntax
I think it's because, in python 3, the syntax for print is something like
- print("Mismatch of Checksum: Expected 0x%x, Got 0x%x" %(flashChecksum, hexChecksum))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content