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

Missing API's in the ASM and Memory Map Files.

I am compiling a project with armcc :

It has following flags:

ASFLAGS := -g --fpu None $(addprefix -i,$(INCL)) --apcs /interwork
ASFLAGS += --diag_error=warning,193
CFLAGS := -g --split_sections --c99 --gnu --depend_dir=$(OBJ_PATH) --no_depend_system_headers --md
CFLAGS += --enum_is_int
CFLAGS += --diag_error=warning,193,1301,2530 --remarks
CFLAGS += --diag_suppress=2815
CFLAGS += --diag_remark=1215
#CFLAGS += -O0
CFLAGS += -O3
CFLAGS += -Otime
$(TARTGET):="Mytarget"  
LDFLAGS := $(INSTRUCTION) --info=totals --info=unused --info=sizes  --callgraph --map --symbols --scatter=$(SCAT_FILE) --list $(TARGET).map
LDFLAGS += --datacompressor=off --library_type=microlib --entry=0xFFFF0000

this generates a map file and also i have fromelf binary to generate the asm.

fromelf $(TARGET).axf -c > $(TARGET).asm


However in the output *.map(memory) file

i am unable to see API names I added to the build under the main function if the Optimization3 (-O3 ) flags is set, removing it brings back the api names

e.g
source: main.c

test_func()
{
    <assume code is present here>
}



main()
{
  .....<assume some code is present here>.....
  
    test_func()
    
    .....<assume some code is present here>.....
}

*.map (with O3)

main 0xffff2218 ARM Code 152 main.o(i.main)
util_print 0xffff22c0 ARM Code 40 util_print.o(i.util_print)
harm_reset_handler 0xffff22ec ARM Code 0 host_reset.o(reset)


source: *.map (with -O0)

main 0xffff2218 ARM Code 152 
main.o(i.main)
test_func 0xffff22c0 ARM Code 40 test_func.o(i.test_func)
util_print 0xffff22ec ARM Code 40 util_print.o(i.util_print)
harm_reset_handler 0xffff24f4 ARM Code 0 host_reset.o(reset)

My Question is is there a way to generate the map file with the -O3 turned ON but still not have the function symbol missing from *.map and *.asm files?