Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
koczis
Level 2
Level 2
10 replies posted First like given 5 sign-ins

Got the CYCKIT-059: https://www.cypress.com/documentation/development-kitsboards/cy8ckit-059-psoc-5lp-prototyping-kit-on...

with KitProg1 clung to it like terrified kitten to a pantleg ...or perhaps the other way.

PSoC Programmer GUI works great... now... I need to automate this process as simply as possible.

I dug into the CLI doc, but it's apparently extremely superficial even regarding command descriptions.

I'll express myself using a partial example.

Consider following script (I paragraphed it for clarity):

---

version

GetPorts

OpenPort KitProg/1625073A00087400 "C:\\Program Files (x86)\\Cypress\\Programmer"

GetProgrammerVersion

GetProgrammerRevID

GetProgrammerCapabilities

GetPowerVoltage

SetProtocol 8

DAP_AcquireChip

DAP_GetJtagID

PSoC3_GetFlashArrayInfo 0

PSoC3_GetFlashArrayInfo 1

PSoC3_GetFlashArrayInfo 2

PSoC3_GetFlashArrayInfo 3

PSoC3_GetFlashArrayInfo 4

PSoC3_GetEccStatus

HEX_ReadFile "C:\\Doc\\Cypress\\CY8CKIT-059\\CY8CKIT-059 PSoC 5LP Prototyping Kit Code Example\\Hex Files\\CE195352_Blinking_LED.hex"

HEX_ReadJtagID

HEX_ReadImageSizes

HEX_GetRowsCount

HEX_GetRowAddress 0

DAP_ReleaseChip

ClosePort

quit

---

and it's output:

---

version

<version 3.28.0

1 OK

GetPorts

<KitProg/1625073A00087400

0 OK

OpenPort KitProg/1625073A00087400 .

<

0 OK

GetProgrammerVersion

<KitProg Version 2.21

0 OK

GetProgrammerRevID

<0x00000011

0 OK

GetProgrammerCapabilities

<0x0001-0x0006-0x0001-0x0000-0x000c-0x0000

0 OK

GetPowerVoltage

<3.3

0 OK

SetProtocol 8

<

1 OK

DAP_AcquireChip

<

0 OK

DAP_GetJtagID

<2e 16 10 69

0 OK

PSoC3_GetFlashArrayInfo 0

<0x00000100

0x00000100

0x00000001

0 OK

PSoC3_GetFlashArrayInfo 1

<0x00000100

0x00000100

0x00000001

0 OK

PSoC3_GetFlashArrayInfo 2

<0x00000100

0x00000100

0x00000001

0 OK

PSoC3_GetFlashArrayInfo 3

<0x00000100

0x00000100

0x00000001

0 OK

PSoC3_GetFlashArrayInfo 4

E0x01051e2f

0x01305760

0x0105276d

ArrayID parameter is out Flash arrays' range

PSoC3_GetFlashArrayInfo 4 returned 80004005

80004005 OK

PSoC3_GetEccStatus

<0x00000000

0 OK

HEX_ReadFile "C:\\Doc\\Cypress\\CY8CKIT-059\\CY8CKIT-059 PSoC 5LP Prototyping Kit Code Example\\Hex Files\\CE195352_Blinking_LED.hex"

<0x00040000

0 OK

HEX_ReadJtagID

<2e 16 10 69

0 OK

HEX_ReadImageSizes

<0x00040000

0x00008000

0x00000000

0x00000004

0x00000004

0 OK

HEX_GetRowsCount

<0x00000000

0 OK

HEX_GetRowAddress 0

E0x01051e2f

RowID parameter is out of range for Flash Array

HEX_GetRowAddress 0 returned 80004005

80004005 OK

DAP_ReleaseChip

<

0 OK

ClosePort

<

0 OK

<

0 OK

<OK

---

I have following questions:

1. Why output from "SetProtocol 8" is "1 OK" indicating an error? When I don't issue it I'm getting protocol mismatch errors.

2. Is there any command to get FLASH arrays no. for "PSoC3_GetFlashArrayInfo", not to have to cross the max index?

3. Why after loading the proper default example HEX for this kit "HEX_GetRowsCount" returns 0 and "HEX_GetRowAddress" errors no matter for what arg?

AND the most important:

4. What to do after loading that HEX to actually program it into the target's FLASH??

Please notice, I don't want to overwrite the KitProg! I understand that I have to somehow ask the KitProg to update the target.

Thanks in advance for any tips.

0 Likes
7 Replies