Hello support team and dear fellow engineers,
Brief: There exists an SDK based on the toolchain v5.06, the target is to migrate the sdk to toolchain v6.15. I am only interested in keil armcc toolchain migration to armclang toolchain at this moment.
I have already looked around the community and the migration application note. Unfortunately, I could not find an answer for the following questions.
Would you let me know how to fix the following issues:
1. --bss_threshold=0 is not supported in armclang compiler v6.15, what is the equivalent command should be used in a project?
2. --feedback=".\unused_SoC.txt" is not supported in armclang compiler v6.15, what is the equivalent command should be used in a project?
3. Scatter file:
Usecase: How to include directory path in v6.15 in a scatterfile?
v5.06
#! armcc -E -I .\,.\..,.\..\sdk\HAL_common_config,.\..\..\..\sdk\HAL_partnum_config\ --cpu Cortex-M0+
v6.15
#! armclang -E <how to include directory path? Write down the compatible command of v5.06 as shared above> --target=arm-arm-none-eabi -mcpu=cortex-m0plus
I look forward for your response, many thanks.
Hi Alam1) There is no direct equivalent. This option set the minimum size of ununitialized object to be placed in the ZI section (setting to zero as above sets all such objects). Arm Compiler 6 provides finer grained control with the use of __attribute((section..)).2) Linker feedback is not supported. Again you could achieve similar by using the __attrtibute (unused) notation. This was an optimization that placed functions listed in the feedback file to their own section so that the linker could more easily remove them.
3) I must admit I have never specified such a path before. I expect it would be consumed in the same manner though. I expect it is the other missing options that is causing issuedeveloper.arm.com/.../Preprocessing-a-scatter-file-when-linking-with-armlink
Are you familiar with the compiler Migration document?https://developer.arm.com/documentation/100068/latest/Hope this helps,Ronan
PS I think the Arm Compiler forum is the best location for this question :)community.arm.com/.../arm-compilers-forum
Hi Ronan,
Thank you very much, I have just applied your reply on Q1. and Q2. in a small testing environment and I confirm and accept your answer is working in my test bench.
For the Q3, Let me share 2 examples
Exercise 1:
@file name: test_file.sct
LR_IROM1 start_address size { ; load region size_region ER_IROM1 start_address size { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } RW_IRAM1 start_address size { ; RW data .ANY (+RW +ZI) }}
where start_addresses and sizes are proper hexadecimal representation of the memory areas.
Please take a look in this file, I have not done any inclusion of any directory path, it is working OK while using armlinker version 6.15. I really see a 16% overall memory foot print reduction of my project.
Exercise 2:
#include "bsp_common_config.h"
#define RETENTION_MEM_SIZE (UCFG_DATA_MEM_SIZE + UCFG_HEAP_SIZE)
where UCFG_DATA_MEM_SIZE and UCFG_HEAP_SIZE resides in bsp_common_config.h, this will not be identified in the scatter file as a preprocessor directory path needs to be included.
I have read the migration document specially the parts I am interested in. Reference link
I have also read my problem oriented section in the Arm compiler 6.15 user guide. that leads to me the following link. Reference link armlinker
Here nothing is explicitly mentioned about how to use the old armcc -I (inclusion of directory path) option from 5.06 tool-chain to 6.15 tool-chain.
/Alam
Hi Alum,
The behavior of -I is generally the same in both compilers, though as I said I had never used it as part of a preprocessing command for the scatter file.Is it possible to specify the path to bsp_common_config.h in the #include statement as a workaround?
#include ".\..\..\..\sdk\HAL_partnum_config\bsp_common_config.h"
Good point, I forgot to try this option :-).
Unfortunately did not solve the directory path inclusion issue, however I highly appreciate your support.
I suppose I will rewrite the scatter file, should not take too long just to avoid compatibility issues of armlink.
Until next time, cheers and have a great rest of the day.
Alam
Hi again Alum
I had some time to try this out myself... I agree that using -I on the preprocessing command seems to be ignored, however I was able to specify a path (relative to the scatter file) to an include file that successfully built.
#!armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m7 -xc #include ".\inc\addresses.h" LOADREGION BASE_ADDRESS SIZE1 { EXECREGION BASE_ADDRESS SIZE2 { * (+RO +RW +ZI) } ARMLIB_STACK_HEAP STACKHEAP_BASE EMPTY STACKHEAP_SIZE {} }
Relative path is also working in my test scatter file.
The issue was very specific to my SDK architecture, I blocked to access any file upto a certain level from the application layer.
I confirm and your answer is accepted.
Br,