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

ModusToolbox™ General

Panometric
Level 5
10 solutions authored First comment on KBA First comment on blog
Level 5

After linking, I get this output, but not all of my projects have PROGBITS lines. 

They are really not useful and keep me from seeing what I want to see. How can I turn off PROGBITS?

Calculating memory consumption: CYBLE-416045-02 GCC_ARM -Og

----------------------------------------------------
| Section Name | Address | Size |
----------------------------------------------------
| .cy_m0p_image | 0x10000000 | 6428 |
| .text | 0x10002000 | 106568 |
| PROGBITS | 0x1001c048 | 72 |
| PROGBITS | 0x1001c090 | 132 |
| PROGBITS | 0x1001c114 | 20 |
| PROGBITS | 0x1001c128 | 24 |
| PROGBITS | 0x1001c140 | 36 |
| PROGBITS | 0x1001c164 | 28 |

.. and hundreds of PROGBITS entries. 

0 Likes
1 Solution
AlenAn14
Moderator
Moderator 100 solutions authored 250 replies posted 250 sign-ins
Moderator

Hi @Panometric ,

You can disable memory consumption calculation by adding the following line to the MakeFile of the project:

override CY_MEM_CALC=


I found this to remove the memory calculation as a whole from the build output in the console.
Is this what you meant?

Warm Regards
Alen

View solution in original post

0 Likes
15 Replies
AlenAn14
Moderator
Moderator 100 solutions authored 250 replies posted 250 sign-ins
Moderator

Hi @Panometric ,

Can you let me know if you are observing this in the console window of Modus Toolbox or in a different file?

I tried compiling an example project and did not observe the PROGBITS sections as you have shown in the console.

Regards
Alen

0 Likes
AlenAn14
Moderator
Moderator 100 solutions authored 250 replies posted 250 sign-ins
Moderator

Hi @Panometric ,

Can you please let me know the version of Modus Toolbox you are using?

The build output that I observed on my side is as follows:

AlenAn14_0-1642399816446.png

I am using Modus Toolbox v 2.4.

Regards
Alen

0 Likes
Panometric
Level 5
10 solutions authored First comment on KBA First comment on blog
Level 5

@AlenAn14 right, I expect to see what you see. I am on the latest. 
My paste was from the Console window: Version: 2.4.0 Eclipse Build ID: 2460

0 Likes
AlenAn14
Moderator
Moderator 100 solutions authored 250 replies posted 250 sign-ins
Moderator

Hi @Panometric ,

Can you please share the MakeFile of this project and also the complete log of the console which includes these PROGBITS sections as well so that we can look deeper into this.

Regards
Alen

0 Likes
AlenAn14
Moderator
Moderator 100 solutions authored 250 replies posted 250 sign-ins
Moderator

Hi @Panometric 

Can you please try adding the following 2 lines to your project MakeFile and verify if the same resolves the issue of PROGBITS sections appearing after the build operation?

 

override CY_GEN_READELF=

override CY_MEM_CALC=

 

Please let us know if this helps.
Also, please share your projects linker script if possible.

Warm Regards
Alen

0 Likes
Panometric
Level 5
10 solutions authored First comment on KBA First comment on blog
Level 5

@AlenAn14  thanks for getting back.

The CY_READ_ELF line suppresses all that output, not just the PROGBITS parts. I'd still like to see that output since it is useful if just a summary. 

The CY_MEM_CALC did not appear to change anything. 

Here is my linker file. 

0 Likes
AlenAn14
Moderator
Moderator 100 solutions authored 250 replies posted 250 sign-ins
Moderator

Hi @Panometric 

To make our testing easier, will it be possible for you to share your entire project, so we can test if the same appears on our side with your project as well?

Regards
Alen

0 Likes
AlenAn14
Moderator
Moderator 100 solutions authored 250 replies posted 250 sign-ins
Moderator

Hi @Panometric ,

I tried using the linker file you shared in a code example for the 416045 device and did not see the PROGBITS section appearing in the build summary.

Also from the linker file you shared, it appears to me as though you are using the firmware for device firmware update (DFU).
Can you please let me know if this is a code example from Infineon or a custom project?
Will it be possible for you to share this project here as a zip file or link?

>>After linking, I get this output, but not all of my projects have PROGBITS lines.
Are you observing the PROGBITS lines in any of the code examples provided by Infineon ? (Without any modifications to the same)

Regards
Alen

0 Likes
Panometric
Level 5
10 solutions authored First comment on KBA First comment on blog
Level 5

@AlenAn14  Sorry for the late reply, it was difficult to trace back where I picked this up. I can't send you my project, but I found it in CE226301- BLE Throughput Measurement, Server app.  Attached is an export of that I just created using MTB's File->New->MTB App. 

 

0 Likes
AlenAn14
Moderator
Moderator 100 solutions authored 250 replies posted 250 sign-ins
Moderator

Hi @Panometric ,

I was able to reproduce this issue, and it seems like it is specific to this code example.
I will provide a response as soon as we get an update from our internal team.
Thank you for your patience.

Warm Regards
Alen

Panometric
Level 5
10 solutions authored First comment on KBA First comment on blog
Level 5

@AlenAn14  Any update on this?

0 Likes
AlenAn14
Moderator
Moderator 100 solutions authored 250 replies posted 250 sign-ins
Moderator

Hi @Panometric ,

We found that the cause of this issue is due to the usage of the BLESS middleware library.

I could isolate where PROGBITS is coming from.

  • There is no PROGBITS type in the memory report when bless MW is added to the application but its functions not used in the app.
  • There is PROGBITS even when we invoke just a single call Cy_BLE_Init in the app.
  • There is PROGBITS even if only  the assignment of the BLE ISR config to a ble config structure.
  • The number of PROGBITS section varies with calls to different BLESS MW functions.
  • This occurs even in bare metal BLE app FindMe, but not in Hello world.

Looking at this, the PROGBITS is coming from usage of BLESS middleware functions in the application. 
I have routed this issue to the internal team and are checking further why exactly elements coming from BLESS library are mapped as PROGBITS.
Will update you with additional details as I get them.

Warm Regards
Alen

AlenAn14
Moderator
Moderator 100 solutions authored 250 replies posted 250 sign-ins
Moderator

Hi @Panometric ,

From the linker script, I saw this comment:

AlenAn14_0-1648473905441.png

This zeroed section in memory is what that causes the final memory summary to have the PROGBITS to be displayed.

Since PROGBITS is coming from BLESS middleware and there will be many variables from the library, It is not straightforward to modify variables coming under PROGBITS memory without consequences to the code.

So, its difficult to disable the display of the PROGBITS section in the code.

Warm Regards
Alen

0 Likes
Panometric
Level 5
10 solutions authored First comment on KBA First comment on blog
Level 5

@AlenAn14 , I see, that is unfortunate. Is it possible to disable all the "Calculating memory consumption" output? 

0 Likes
AlenAn14
Moderator
Moderator 100 solutions authored 250 replies posted 250 sign-ins
Moderator

Hi @Panometric ,

You can disable memory consumption calculation by adding the following line to the MakeFile of the project:

override CY_MEM_CALC=


I found this to remove the memory calculation as a whole from the build output in the console.
Is this what you meant?

Warm Regards
Alen

0 Likes