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.

Compiler/CC2640R2F: Project compiles memory allocation is different between 1 PC and another PC

Part Number: CC2640R2F

Tool/software: TI C/C++ Compiler

Hi E2E,

We have an issue of the following

1. A project is compiled on 1 PC

2. A project is imported to another PC

3. The project is compiled in 2nd PC

4. Memory allocation from PC1 and PC2 is different as attached images show

PC1 and PC2 Compiler: TI v16.9.0 LTS

PC1 and PC2 SDK: Simplelink_cc2640r2_sdk_1_30_00_25

I appreciate any idea where might be any difference between both?

  • Hi Erez,

    This is very mysterious. Are both computers using the exact same unmodified project and the same CCS version also? Is it possible that you have changed the optimization level or something in the project settings for each project?

    BR,
    Aslak
  • Actually, optimization is switched off in both.
    I need a better understanding of the FLASH_LAST_PAGE section, there is the major difference between both, maybe we can get the clue from there, how can I debug what is cosnt.2 section under the FLASH_LAST_PAGE?
  • Hi,

    FLASH_LAST_PAGE is just used as an extension of the whole flash, but is defined separately so that CCFG can be placed at the end of it, and so the whole page can be omitted easily if needed.

    So in your case, the rest of the flash is full and the linker continues filling into the last page.

    You can compare the .map files and see what each module / symbol uses in terms of space, and see from that what the culprit is.

    But if you can confirm that the source code and project files are _exactly_ the same, then I'd be happy to involve someone from the compiler team - the forum you landed in is concerned with mostly stack and hardware issues.

    Please attach the output from the build console for each machine, in case that's useful for the experts.

    Best regards,
    Aslak
  • Thanks,

    I appreciate the futher support for this matter, attached both output (from bPC1_output.txtPC2_output.txtuild console)

  • I inspected the build logs a little.  I found two differences worth pointing out. I'll refer to the two builds as PC1 and PC2.

    PC1 uses C:/ti/xdctools_3_50_00_10_core/xs, while PC2 uses C:/ti/xdctools_3_50_04_43/xs .  And there are other differences in the xs invocation.  

    PC1 never defines the preprocessor symbol --define=__H3101_H3102_HSN_CC2640R2, but PC2 does.

    I don't know what effect these differences cause.  But it seems likely they will cause some differences in code size.

    Thanks and regards,

    -George

  • Please confirm whether the differences I point out in my last post fully explain the change in code size.

    Thanks and regards,

    -George

  • Dear George,

    We are still not sure, but belive that the: define=__H3101_H3102_HSN_CC2640R2 was the cause of the difference.

    Unfortunately we came cross with our flasher that probable got defected, so ordered another flasher.

    I think we can close the issue for now, thanks a lot!

    Best,

    Erez