Change build commands - PSoC Creator 4.2

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

cross mob
lock attach
Attachments are accessible only for community members.
OmSa_4786791
Level 3
Level 3
25 sign-ins 10 replies posted 10 sign-ins

Hello,

I am building an application using PSoC Creator v4.2, and I would like to change the commands that run during the build process.

I am building a bootloader and bootloadable applications, and I have customized these applications to have different start adresses than the original start address (I want them to be in different addresses in the memory of my device).

Whenever I am building the bootloadable software, these commands run one after the other:

  1. Create the design
  2. Compile the code
  3. Create <bootloadable>_1.elf
  4. Create <bootloadable>_1.hex (using cyelftool -B)
  5. Create <bootloadable>_2.elf
  6. Create <bootloadable>_2.hex (using cyelftool -B)
  7. Merge bootlaodable application into <bootloadable>.hex (using cyelftool -M)

One of my applications is larger than half the memory of my device. To make both versions of this application to compile, I changed the start location of the second application (<bootloadable>_2.hex) to start in the start as well (because I don't use this version of the application, so I don't care about the output of this command). But, the last command in my build failes and I have no idea how to avoid it.

After the build finishes (with its errors), I take the output elf file from the first application <bootloadable>_1.elf and merge it with my second bootloadable using cyelftool, the output hex file works as expected on my device.

Is there any way to customize the build, and make it run only a subset of the commands it is currently running? (hopefully, I would be able to remove stages 5-7 from the build, because I don't use the output created from these commands, and they make my build fail).

If not, does anyone has an idea as to how to make the last stage pass the compilation (so the build won't fail)?

I am attaching the project with the bootloader and the bootloadables, the application that fails the build is "second_dummy_application".

I have moved over all the build settings and couldn't find anything that could help me solve this problem.

I have also tried building the code from the command line, but the same failure happen there as well.

I went farther and grepped for the string of "cyelftool" in all the project, but couldn't find any relevant reference.

Any help will be greatly appriciated,

Omri

0 Likes
1 Solution

Hello Omri,

Yes you are right, you cannot change the build steps in Creator. There is an option though. You could export the PSoC Creator project to a Makefile project and then modify the Makefile to customize the build flow.

Go to Help > PSoC Creator Help Topics > Exporting a Design to Makefile to get more information on how the project can be exported.

Hope this helps

Regards,
Dheeraj

View solution in original post

4 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

The steps you mentioned regarding the cyelftool are part of the build process. You cannot modify it. I tried to compile your project. It fails even before the cyelftool steps are reached. Looks like there are overlapping regions in the linker script which are causing this.

pastedImage_4.png

Please check the section on Dual-Application bootloaders in this App note to understand how to create a dual-application bootloader correctly.

Regards,
Dheeraj

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

Hi Dheeraj,

Thank you very much for your reply.

As I understand from your question, there isn't any way to customize or change the build in PSoC Creator. Is it possible to build the code in any other way than using the PSoC Creator (for example, to somehow get all the commands that it will run and run it by myself)?

When I am compiling the code on my computer, it does end with cyelftool error.

pastedImage_0.png

(All I did was to download again the tar and build it).

The problem you are describing happened to me when the application I was using was too big for the device. Is it possible that you are compiling the code to another chip? When I just downloaded PSoC Creator, I had to press on 'find new devices' (tools->find new devices) and download the additional devices for the project type to have the same chip. The one I am using is CY8C4147AZI-S443.

I am attaching the project again, now with the build output (in case it can help you).

I looked over the link you sent, and read the information from it. However, it doesn't add any new information about how to create dual-boot applications with different sizes on the flash. The problems in my builds happen only when I need the applications to be in different sizes, I have no problem in building regular dual-boot applications.

Thank you very much,

Omri

0 Likes

Hello Omri,

Yes you are right, you cannot change the build steps in Creator. There is an option though. You could export the PSoC Creator project to a Makefile project and then modify the Makefile to customize the build flow.

Go to Help > PSoC Creator Help Topics > Exporting a Design to Makefile to get more information on how the project can be exported.

Hope this helps

Regards,
Dheeraj

Hi Dheeraj,

That was exactly what I was looking for.

Thank you very much for sending this information.

Regards,

Omri

0 Likes