Jump to content
IGNORED

debugging CC65 C code with altirra for *.rom files


Recommended Posts

Hi All,

when you create an app that resides on cartridge (for example my game I am currently developing resides on mega cart 1MB) , the output file name is *.rom (instead of the normal xex or car)

 

To debug your code you need to add debug info , so to command line you add:

Quote

cl65 --debug-info -Wl --dbgfile,./bin/myfile.dbg

The Wl is to let the linker know you're passing an input file as a parameter. see my cc65 tutorial on how to debug your code with altirra for more refernce.

 

that dbg file should reside next to your executable file. in our case next to the myfile.rom file.

 

when you run altirra and break, and type "lm" to see the symbols it will not show you the symbols from your executables.

 

I've confirm this with @phaeron and altirra code does support dbg but not when it resides next to a *.rom file. 

till this will be resolved in next versions of altirra(?) the workaround suggested is to rename the dbg file to *.lab

so you should change your command line to :

Quote

cl65 --debug-info -Wl --dbgfile,./bin/myfile.lab

now that the lab file will reside next to the rom file, altirra will load the symobls properly.

 

hope this helps anyone

 

 

  • Like 2
Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...