Freedom Studio - Disassembly "No debug context"

Is there any way to see disassembled code in Eclipse without connecting a physical target?

Thanks!
Cesare

You can run GNU objdump on the built elf file to view the disassembly.

Freedom Studio will not do this for you automatically, though you can add it as a post build step so that it runs after every build.

Right Click on a project and click Properties -> C/C++ Build -> Settings -> Build Steps
In the Post-Build Commands, use a command similar to the following:
riscv64-unknown-elf-objdump -D -S ${ProjDirPath}/Debug/${ProjName}.elf > ${ProjDirPath}/Debug/listing.txt

This will place a file in your Project’s Debug folder called listing.txt which contains the intermingled C and assembler. If your project builds to a directory other than Debug, substitute the director as necessary.

Perfect. Thanks! Cesare

Note for future readers of this post: the post-build step is not executed for incremental builds. You have to do a clean build - or similar action - to trigger the execution of objdump.

In the Toolchains tab you can enable the creation of the listing for the entire program.

Yep. This works too.

In the Toolchains tab you can enable the creation of the listing for the entire program.

Ah ha, there you you go :slight_smile:

Right Click on a project and click Properties -> C/C++ Build -> Settings -> Toolchains and click Create extended listing. This will place a .lst file in the build directory.