This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU-PLUS-SDK-AM243X: makefile_system_ccs_bootimage_gen does not obey system.xml

Part Number: MCU-PLUS-SDK-AM243X

I just spend a frustrating day debugging some very strange memory stomping. 

In the end it turns out that makefile_system_ccs_bootimage_gen was adding in a project that had been removed from system.xml several months ago. I expanded the memory footprint of one of the other projects and it was a block that the removed project had used. bootimage_gen was layering the removed project image over the rest... 

Pretty frustrating since all the rest of the build works as expected.

How is makefile_system_ccs_bootimage_gen generated? Is there I re-generate trigger I disabled somewhere?

CCS 12.6, TIArmClang 3.2.1.LTS

  • Hi Traveler,

    Sorry to hear about the experience you had. You can always raise a thread as soon as you face any issue. We will be happy to assist you in debugging the issue.

    How is makefile_system_ccs_bootimage_gen generated? Is there I re-generate trigger I disabled somewhere?

    The System project `makefile_system_ccs_bootimage_gen` isn't generated but just included on importing the project in CCS. This makfile gets included with the following highlighted line shown below

    If you don't want to include this makefile in case you have your own makefiles to generate bootable images, you can delete this line. Ofcourse then you also have to remove the post build steps in `System.xml` which uses this makefile to generate the appimages.

    Regards,

    Prashant

  • So this is a bug in how system projects work? The makefile says it's auto-generated. Where's the generating tool?

  • Hi Traveler,

    So this is a bug in how system projects work?

    Not exactly. The comment "Auto generated makefile" refers to the time when the team creates an example for any core in the MCU+ SDK repo. The initial code like makefiles are auto generated and then the example is modified according to its use case. Please refer to the public MCU+ SDK repo for more understanding:

    github.com/.../mcupsdk-core

    From the SDK installer perspective, the makefiles comes as part of the SDK and are not auto-generated.

    Regards,

    Prashant

  • The other aspects of a system project seem to obey the system.xml file, building and debugging only the projects that are activated there.

    From a users perspective there are two problems:

    1) Flagging the makefile as autogenerated tells me that I should not edit (or even inspect) this file. There is an upstream setting that drives the contents.

    2) The fact that the makefile ignores the system.xml settings makes it different than all the rest of a system project and creates a stumbling point for the user.

    Not exactly a bug but definitely a poor implementation that needs fixing.


    Can you please file an issue for this?

  • Hi Traveler,

    1) Flagging the makefile as autogenerated tells me that I should not edit (or even inspect) this file. There is an upstream setting that drives the contents.

    I agree with you on this. The comment is misleading from the installed SDK perspective. So, I will file a bug.

    2) The fact that the makefile ignores the system.xml settings makes it different than all the rest of a system project and creates a stumbling point for the user.

    I will need to exactly understand the issue you faced before taking action. The System makefile `makefile_system_ccs_bootimage_gen` does nothing but grabs the RPRC files of the individual projects (hardcoded to look for all cores) and generate a single bootable image.

    So, the only possible issue I see here is a particular cores project is disabled in the `system.xml` so that project is not built and therefore the `makefile_system_ccs_bootimage_gen` will fail saying it could not find a particular RPRC.

    Did you face this issue or something else?

    Regards,

    Prashant

  • I started with the `empty` project. I built it, checked that it worked, and then used it as the base for my project.

    I disabled cores I was not using via the system.xml CCS gui. The project had the possibility of using all cores but a goal of using as few as possible, hence the reason I started with all cores.

    Later in the project, I rearranged the memory blocks used by each of the three R5F cores I was using to suit my needs, expanding into the region that the 4th core had used.

    Still later, the project stopped working when I wasn't debugging. Eventually I figured out that the image for the 4th core was being included in the multicore image, overlapping the image of the processors I was using.

    The issue is that even though I had the 4th core disabled in the system.xml (which the build and debug machinery in ccs all obeys), the system build was adding the 4th core image to the multicore image.

  • Hi Traveler,

    Thanks for the explanation.

    Now, I understand the exact issue. I guess there is an improvement possible where the makefile gets the RPRCs to be included from CCS maybe instead of hardcoding to include them all. I will file a bug for this.

    Please note the bugs, if accepted, fixes will not likely make it to v9.2 as the code freeze for v9.2 is just around the corner so it has to wait for the next release v10 scheduled for sometime around last week of July.

    Let me know if you have any further queries related to this thread otherwise I suppose I can close this thread.

    Regards,

    Prashant