In cpu6502_opcodes.h, the structure opcode_tbl_entry is defined improperly:
struct opcode_tbl_entry {
char *mnemonic;
operation_enum_t operation;
address_mode_enum_t address_mode;
int bytes;
int cycles;
int page_cross_cycles;
}opcode_tbl_entry ;
As this header file is included by multiple source files, linker ends up throw following errors:
.\Out\msp2_file_io_template.axf: Error: L6200E: Symbol opcode_tbl_entry multiply defined (by cpu6502_debug.o and cpu6502.o).
.\Out\msp2_file_io_template.axf: Error: L6200E: Symbol opcode_tbl_entry multiply defined (by cpu6502_opcodes.o and cpu6502.o).
It's safe to change it to:
struct opcode_tbl_entry {
char *mnemonic;
operation_enum_t operation;
address_mode_enum_t address_mode;
int bytes;
int cycles;
int page_cross_cycles;
};
In cpu6502_opcodes.h, the structure opcode_tbl_entry is defined improperly:
struct opcode_tbl_entry { char *mnemonic; operation_enum_t operation; address_mode_enum_t address_mode; int bytes; int cycles; int page_cross_cycles; }opcode_tbl_entry ;
As this header file is included by multiple source files, linker ends up throw following errors:
.\Out\msp2_file_io_template.axf: Error: L6200E: Symbol opcode_tbl_entry multiply defined (by cpu6502_debug.o and cpu6502.o). .\Out\msp2_file_io_template.axf: Error: L6200E: Symbol opcode_tbl_entry multiply defined (by cpu6502_opcodes.o and cpu6502.o).
It's safe to change it to:
struct opcode_tbl_entry { char *mnemonic; operation_enum_t operation; address_mode_enum_t address_mode; int bytes; int cycles; int page_cross_cycles; };