kendryte / kendryte-standalone-sdk

Standalone SDK for kendryte K210
https://kendryte.com
Apache License 2.0
440 stars 161 forks source link

Output *.lst and map file #98

Open eeyrw opened 4 years ago

eeyrw commented 4 years ago

FEATURE REQUEST

Missing feature

Output *.lst and map file

Justification

I want to dig into rv64 by observing the asm generating by compiler and try mixed coding ( C and ASM ).

Workarounds

I do not find a proper solution under the build system cmake by now.

GPSBabelDeveloper commented 3 years ago

You can add --save-temps to the GCC invocation to capture the .s (and .i) output from the compiler. Just add that to CFLAGS.

I find it more helpful to instead disassemble the completed object, so I can see any "damage" created by the assembler, linker, or other tools. A fragment of my Makefile includes:

    $(OBJDUMP) -x --disassemble -g $< > $(TARGET).dis
    $(NM) -SsnCal $@  > $(TARGET).sym