Unable to run program

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

cross mob
BoBr_4596421
Level 3
Level 3
First like received

Hi there - new user query.

As my first experience with the PSoC 6 chip and the CY8CPROTO-063-BLE prototyping board, I have been working through the PSoC 6 101 set of video tutorials.

Sadly I have come to an early halt in attempting to run DEBUG/PROGRAM in PSoC Creator v4.2 for the first time.

I am expecting the IDE to ask me to select a target processor, but...

a) No targets are offered, and

b) The IDE is complaining that the KitProg utility is the wrong version (but I have run Update Manager several times and have not been offered an update to this program).

To explain where I'm at, I have been following the videos by Alan Hawse, and have got to time 5:30 on video PSoC6_101 Tutorial 1-3.

Any ideas on what's going wrong here?

PSoC6_101_Lesson_1-3_failed_to_program.png

Many thanks,

Bob

0 Likes
1 Solution

Hi Bob,

Please check KitProg2 Mode on CY8CPROTO-063-BLE prototyping board. It should be KitProg2 Program/Debug. So Status Led  (LED2)Should be ON:

pastedImage_0.png

Regarding  to Cy_SysPM_Sleep, It should be Cy_SysPm_Sleep(CY_SYSPM_WAIT_FOR_INTERRUPT). I corrected my answer in previous post.

Thanks,
Nazar

View solution in original post

0 Likes
20 Replies
BoBr_4596421
Level 3
Level 3
First like received

UPDATE:

I found the PSoC Programmer (v3.28.5) and by updating this from within that utility, it has upgraded to 'KitProg3'.  In turn this has removed the error from running Debug/Program in PSoC Creator, but there is still no target showing that can be selected.

Hence no progress and I'm still stuck trying to get to 'Hello World'......

Any suggestions please?

Latest window is as below

PSoC6_101_Lesson_1-3_failed_to_program_B.png

0 Likes

FURTHER UPDATE:

OK I am now chasing my tail!

The problem seems to be coming down to getting the correct target selected somewhere/somehow.

The PSoC Creator Debug/Program is telling me there's an incompatibility in the settings and that I must select the correct part - being CY8C6347BZI-BLD53 (although why this cannot be detected automatically I do not know).

I have attempted to select this part both in the PSoC Programmer and in the Creator in Project/Device Selector but am still getting the inconsistency when I run Debug/Program.

Still looking for assistance please?

regards

Bob

target selected in PSoC Programmer.PNGDevice selected in Project Device Selector.PNGIncompatible target.PNG

0 Likes

Hi Bob,
The CY8CPROTO-063-BLE Prototyping Board includes the CYBLE-416045-02 EZ-BLE Module. So you need select CYBLE-416045-02 device in the Device selector (not CY8C6347BZI-BLD53).

Regards,
Nazar

Hi Nazar,

Thanks for coming back to me with some advice. I presume that you mean to use the Creator 'Project/Device Selector' menu option to make this setting. I am concerned that making this selection is not 'sticky', since when I go back and check, it seems to become unselected?

Anyway, having tried this on a fresh project, the 'Build' phase runs without obvious error, apart from when I enter 'main_cm0p.c' which has a red circle and a cross next to line 12 which is: #include "project.h".    Hovering over that indicates that 'cy_device_headers.h' file is not found.

When I go ahead and attempt a Debug/Program, there are no targets indicated at all, and so I am no further forward.

On the other hand when I go into the PSoC Programmer, it seems quite happy for me to select  CYBLE-416045-02 as the device and shows a pass if I 'update firmware'.

This leaves me still with no way forward and starting to become disillusioned as I see nothing in the start-up notes that covers this fairly basic part of the setup. Ah well, it's one in the morning here and I'm signing off and hoping for a fresh day tomorrow.

PS I now have a new option appear which offers me an upgrade to Creator 4.3 Beta. Is that worth doing?

Regards

Bob

0 Likes

Hi Bob,


You need to update Devices in PSoC Creator:
-  press Tool->Find new devices in PSoC Creator
-  press install, in new window "Device Update Installer".

After this, CYBLE-416045-02 should appear in PSoC Creator ( 'Project/Device Selector' menu ).

pastedImage_0.png

Regards,
Nazar

0 Likes

Hello Nazar,

Thanks for coming back to me - but that doesn't help either. Selecting 'Tools/Find New Devices' produces no results - see below.

Tools_Find-New-Devices.PNG

So, back to my two issues so far:-

1) Cannot follow along with Alan Hawes video (PSoC6_101 Tutorial 1-3 at 5mins 30 seconds) where Debug/Program shows no targets to select.

2) The Build is apparently producing an error on line 12 of 'main_cm0p.c' in relation to 'projects.h'.

On issue 1), please see this diagram of the module (the cydwr file) which is showing the correct module selection?

cydwr file showing selected device.PNG

On issue 2) and unsure of relevance, please see detail of the error as below.

project.h.png

As before, any assistance greatly appreciated in order to allow progress. This seems to be such a basic problem that I'm tempted to delete the entire environment and start again.

Regards

Bob

0 Likes

Hi Bob,


What version of PDL do you use? For CYBLE-416045-02 you should use PDL 3.0.4 or newer.
Could you please attach your project for review?


NOTE: the diagram of the module (the cydwr file) in your project looks good. So you are using correct devise and after build you should able to program.

Thanks,
Nazar

0 Likes

Hi Nazar,

PDL version is 3.1.0.

I am unsure on the best way to 'attach' my project, and so I just zipped up the folder.

However there is no apparent way of attaching a file as the options appear to be an image, a video or a link.

Please advise.

Thank you

Bob

0 Likes

Hi Nazar,

Hopefully you can access this?

PSoC6 Development - Google Drive

Regards

Bob

0 Likes

Hi Bob,

How to attach file here:

1. press "Use advanced editor" (top right corner)

2. in advanced editor, press "Attach" (bottom right corner)
NOTE: Google Drive also is good

Regarding to your project
In some reason the PDL in Generated_Source does not have full needed content, so you have build error.
Please delete Generated Source (in Project workspace), and rebuild the project again.

So PDL should include:
- cmsis

- devices

- drivers

- middleware

pastedImage_5.png

Also you have typo in "Cy_SysPM_Sleep(CY_SYSPM_STATUS);", please replace to  "Cy_SysPm_Sleep(CY_SYSPM_WAIT_FOR_INTERRUPT);"

Thanks,
Nazar

0 Likes
lock attach
Attachments are accessible only for community members.

Hello Nazar,

Thanks so much for trying to help, but no success with that suggestion.

Firstly, simply deleting the 'Generated Source' and then requesting a new build did not work. PSoC Creator goes through the process but ends by stating "Build skipped" and I do not know why.

So, I started a new project and created the design diagram again. This time the Build was successful.

However, as you can see in attached screenshot, the files you are looking for in folder PDL are still missing.

Build content missing.PNG

I have attached the Project files as before. Note that this time, I executed the Build only and made no change to the generated files.

All help appreciated!  Thank you.

Regards

Bob

0 Likes

I wonder if this could be my problem??

When I look in the Creator Update Manager, I see multiple versions of the PDL. Might it help to uninstall all but the latest versions?

Regards

Bob

Update Manager - PDL versions.PNG

0 Likes

Hi Bob,

A coule post above, I noted that for CYBLE-416045-02 you should use PDL 3.0.4 or newer.

I checked Generated Sources again and it looks like as PDL version 3.0.1 ( not 3.1.0).

So please double check twhat do you have in PSoC Crator settings (Tools->Options) and ..:pastedImage_1.png

Regards,
Nazar

0 Likes

Yes, you have installed many PDL version. But in PSoC Creator defined the old one. Please change by instruction above.

0 Likes
lock attach
Attachments are accessible only for community members.

OK Nazar - latest status is that we have progressed slightly but we still have failure to program.

I confirmed that despite installing the later PDL files, the Creator was still set to PDL v3.0.1, so I uninstalled the three old versions of the library using Update Manager, and then corrected the version showing in the Tools/Options setting to v 3.1.0.

GOOD NEWS: The build was successful and all four folders are now showing under 'Generated Source/PDL'. In addition, the error showing for 'include projects.h' has now disappeared.

BAD NEWS: The 'Debug/Program' command can still not be executed as there is still no target showing to be selected.

Status with PDL_3_1_0.PNG

In addition, one of the two lines of code that I added in the mp0.c code is now throwing an error - both in the format used by Alan Hawes in his video, and in the format suggested by yourself as above (Cy_SysPM).

Files are again attached.

Regards

Bob

0 Likes

Hi Bob,

Please check KitProg2 Mode on CY8CPROTO-063-BLE prototyping board. It should be KitProg2 Program/Debug. So Status Led  (LED2)Should be ON:

pastedImage_0.png

Regarding  to Cy_SysPM_Sleep, It should be Cy_SysPm_Sleep(CY_SYSPM_WAIT_FOR_INTERRUPT). I corrected my answer in previous post.

Thanks,
Nazar

0 Likes

Successful Program with errors.PNG

Nazar - Some progress achieved - by accident!

First to confirm that both LEDs on the program part of the prototype board are lit - both LED 1 PWR and LED 2 Status. I tried pressing the MODE button (SW3) a few times to see if it made any difference to the list of targets in 'Debug/Program', but it did not.

What DID make a difference was that I then selected 'Port Acquire' in the 'Debug/Program' window and that came up with m0 and m4 processors for the first time. I have tried that before but there have been several changes made since then - perhaps I always need to do this, or perhaps it was pressing SW3?  I shall find out in due course.

So - my first run of Debug/Program has now happened - HOORAY!

Sadly, the program process has thrown two errors - one in relation to the "Cy_SYSPM" code in 'main_cm0p.c', and a Build error - Build error: The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

The code being used came from Alan Hawes PSoC6-101 Tutorial 1-3 at 5 minutes 30 seconds in. The intention I think was to show the blinking of the on-board LED with both processors out of the loop, so I'm unsure why this code is not working (see above for the two variations that I tried - neither works without error).

The second error (Build) I have no idea about.

Hopefully you can assist some more - I feel that there may be some light at the end of the tunnel now...

Also worthy of note is that my environment is running KitProg3 (not version 2).

Regards

Bob

0 Likes

Regarding  to Cy_SysPM_Sleep, It should be Cy_SysPm_Sleep(CY_SYSPM_WAIT_FOR_INTERRUPT). It was typo.

Thanks,
Nazar

0 Likes

SUCCESS

Many thanks Nazar. We finally got there!  I have a blinking LED.

Not bad for two days work between us - eh?

Seriously though, thanks again for the support.

Regards

Bob

0 Likes

You are welcome! Bob!

Regards,

Nazar

0 Likes