This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Order of compilation/link between DS5 and Arm Dev Studio

Went to rebuild an image and updated the project from the old DS5 to a newer Arm Dev Studio (2022.2, this is the customer version so it's a hard requirement that can't be changed). We went from using the internal 16.1 armcc to the standalone 5.06u3 armcc since those are the certified versions required by the customer. The image files generated have different checksums despite using the same compiler. Investigating, the listing files show the same opcodes being generated which was confirmed by a diff of the object files, though there are some differences in the header and footer of the object files. In the master listing file (outfile.lst), files are being compiled/resolved in a different order. Under Arm Dev Studio, main.c is compiled first as it contains the first function encountered after the 'Start:' section, followed by the rest of the Resources. Under DS5, initialize.c and associated the config files went first (first physical files in the project) with main.c actually being the last thing compiled under DS5. It looks like that order difference is carried into the AXF file. Given the updates between the two, we also did change from calling the altera.elmap to using the intel_fpga.elmap.

So the question becomes, is there a way to force the old DS5 order of compilation/link in Arm Dev Studio?

Parents
  • So after doing some more investigation into the makefiles, I found the following line in the original DS5 makefile:

    armlink.exe --cpu=Cortex-A9 --entry=Start --scatter=""C:/project/my_scatter.scat"" --callgraph --callgraph_file="CGRAPH.HTML" --map --info=sizes --info=totals --info=unused --info=stack --info=inline --list="MAP.TXT" --symbols --show_cmdline --no_unaligned_access --info=veneercallers --feedback=fb.txt -o "BASE_PROJ.axf" "--via=makefile.armlink.exe.inputs"

    which is for the AXF file's linking. That was changed to this in the newer Arm Dev Studio:

    armlink.exe --cpu=Cortex-A9 --entry=Start --scatter=""C:/project/my_scatter.scat"" --callgraph --callgraph_file="CGRAPH.HTML" --map --info=sizes --info=totals --info=unused --info=stack --info=inline --list="MAP.TXT" --symbols --show_cmdline --no_unaligned_access --info=veneercallers --feedback=fb.txt -o "MODD_PROJ.axf" $(OBJS) $(USER_OBJS) $(LIBS)

    So makefile.armlink.exe.inputs IS the file for getting the order the way you want but there's no option for setting the makefile to use it in the 2022.2 version and I don't want to be manually modifing the makefile to force the file's use. There also doesn't appear to be any way to override that behavior using the makefile.init/defs/targets as messing with $(OBJS) or $(USER_OBJS) causes problems the command line for the AXF.

Reply
  • So after doing some more investigation into the makefiles, I found the following line in the original DS5 makefile:

    armlink.exe --cpu=Cortex-A9 --entry=Start --scatter=""C:/project/my_scatter.scat"" --callgraph --callgraph_file="CGRAPH.HTML" --map --info=sizes --info=totals --info=unused --info=stack --info=inline --list="MAP.TXT" --symbols --show_cmdline --no_unaligned_access --info=veneercallers --feedback=fb.txt -o "BASE_PROJ.axf" "--via=makefile.armlink.exe.inputs"

    which is for the AXF file's linking. That was changed to this in the newer Arm Dev Studio:

    armlink.exe --cpu=Cortex-A9 --entry=Start --scatter=""C:/project/my_scatter.scat"" --callgraph --callgraph_file="CGRAPH.HTML" --map --info=sizes --info=totals --info=unused --info=stack --info=inline --list="MAP.TXT" --symbols --show_cmdline --no_unaligned_access --info=veneercallers --feedback=fb.txt -o "MODD_PROJ.axf" $(OBJS) $(USER_OBJS) $(LIBS)

    So makefile.armlink.exe.inputs IS the file for getting the order the way you want but there's no option for setting the makefile to use it in the 2022.2 version and I don't want to be manually modifing the makefile to force the file's use. There also doesn't appear to be any way to override that behavior using the makefile.init/defs/targets as messing with $(OBJS) or $(USER_OBJS) causes problems the command line for the AXF.

Children