FAQDevelopment environmentSNASM environment
BackForward
FAQ / Development environment

SNASM environment



I want to restart snbugsat with the contents of memory left after it hangs.

Q)
I'm using CartDev + Snbugsat.
There is no problem in normal use, but if communication with the debugger monitor becomes impossible due to a runaway program etc., the monitor must be reloaded and the memory status at the time of runaway is checked. I want to, but when the monitor loads, the memory used by the application is cleared.
Is there a way to restore the debugger function without clearing the memory?

A)
is not.


I want to use the READ / WRITE cycle condition setting and history function in SNASM.

Q)
Is it possible to set "READ / WRITE cycle" conditions and "data bus value size" settings in SNBUGSAT as in GUISH?
Also, please let us know if you have any plans for version upgrades such as adding history functions.

A)
In the case of GUI-SH, since the CPU used is an EVA chip (with debug function), READ / WRITE cycle conditions etc. were possible, but it is not possible in the operating environment of SNAS M2.
It is possible with simple condition settings (compared to ICE etc.). (How many times do you break, etc.)
It cannot be done in the same way as the history function.
If you want to do this kind of debugging, you can do it with a combination of Programming Box and ROM Debugger (manufactured by Sophia Systems).
It costs about 800,000 yen per set (including software), but you can read both the SH-C output format (SYSROF format) and the GNU-C output format (COFF format).
It seems that software bugs have also been improved.


Does SNASM have a function to drop the contents of RAM into a coff file etc.?

Q)
Is there a way to use the SNASM2 debugger and output the data such as BG / MAP recorded in the work RAM to a file format that can be used by the linker by specifying an arbitrary address and number of bytes?
Also, do you have detailed translations on how to use the debugger?

A)
It is not a function of SNBUGSAT. (However, it is possible if you only load / save the binary)
The manual provides an English translation of SNAS M2.09y as a text file and a Microsoft Word file for Windows in the Technical Information Forum data library.


Please tell me how to read the SIMM address in the SNASM environment.

Q)
From the perspective of SNASM2, it looks like the Cart Dev SIMM address does not exist from the same address (0x04000000) as the Programming Box.
When I looked through the address with Alt + W (Window), M (Memory) of snbugsat.exe,'**' was displayed and it seems that it is not active.
Can the simple SIMM system actually be used in the CartDev + DevSaturn environment?

A)
In the CartDev + DevSaturn environment, SIMM is also assigned to address 0x04000000 (0x24000000 for cache-through addresses).
The specific method is to give memory space access to the SNBUG.CFG file.

[SAT_SH2_MAIN]
Read = 0x00000000, 0x0007FFFF, BYTE
Write = 0x00100000, 0x0010001F, BYTE
Read = 0x00100020, 0x0010005F, BYTE
Write = 0x00180000, 0x0018FFFF, BYTE
ReadWrite = 0x00200000, 0x002FFFFF, BYTE
ReadWrite = 0x01000000, 0x01000003, BYTE
ReadWrite = 0x01800000, 0x01800003, BYTE
ReadWrite = 0x04000000, 0x04FFFFFF, BYTE ← These two lines ReadWrite = 0x24000000, 0x24FFFFFF, BYTE ←

[SAT_SH2_SUB]
Read = 0x00000000, 0x0007FFFF, BYTE
Write = 0x00100000, 0x0010001F, BYTE
Read = 0x00100020, 0x0010005F, BYTE
Read = 0x00180000, 0x0018FFFF, BYTE
ReadWrite = 0x00200000, 0x002FFFFF, BYTE
ReadWrite = 0x01000000, 0x01000003, BYTE
ReadWrite = 0x01800000, 0x01800003, BYTE
ReadWrite = 0x04000000, 0x04FFFFFF, BYTE ← These two lines ReadWrite = 0x24000000, 0x24FFFFFF, BYTE ←

Add two lines.

Since this area is assigned to SIMM memory, it can be used by loading the necessary data in binary.
You cannot boot from SIMM or change the memory address in the CartDev environment.
Also, in the case of modem etc., it is possible to read / write the address of the application or device that accesses the prohibited area of SNASM with this setting file.


How to debug with SNASM?

Q)
We are developing in the environment of SNAS M2. How can I use this debugger to display the contents of a variable?
In addition, debugging by displaying the source code (step trace, etc.) is done without any problem.
Compile time options are

-Wall -O2 -m2 -g (and specify include directory)

is.

A)
procedure

  1. Run the program.

  2. Open the source file in which the variable is registered with the "Mixed" command.

  3. Set a breakpoint and stop the program.

  4. When you want to see global variables, use the "watch" command. For local variables, use the "watch" command.
    Use the "local var" command.

  5. For "watch", use the "Edit"-> "add" command to display the value of the variable.
    (For structures, double-click the item with "+" to see more information.)

  6. For "local var", the memory value set for the local variable is automatically displayed.

You can refer to the variable values in both windows, but you cannot directly rewrite them.
Please rewrite in the "Memory" window.


I can't see the inside of the structure with SNASM.

Q)
I can use watch with SNASM, but I can't see the contents of the structure.
Is it a substitute?

A)
This depends on the development environment that SNASM assumes to develop in assembler, but snassmld does not capture the internal symbols of structures and the symbols of automatic variables as debug information at the time of linking.
Therefore, please refrain from using snasmld as a linker if you want to refer to the symbols of the internal members of the structure, or if you want to perform source code debugging such as displaying Auto variables (otherwise as much as possible).
All of this can be done with GNU ld.


BackForward
FAQDevelopment environmentSNASM environment
Copyright SEGA ENTERPRISES, LTD ,. 1997