Re: [cc65] Compiling fake6502 with cc65

From: Emanuele Fornara <>
Date: 2014-08-15 18:39:32
> If this is one of the 2.13 versions, it's definitely the compiler. None of the
> 2.13 versions gets tentative definitions right:

It's a 2.14 version, but it's not an official release. I use my fork
that should be in sync with the latest commit from cc65/cc65. The
compiler itself should be unchanged. I only have a fork so that I can
easily have some custom targets while making sure that my environment
is kept up to date.

> I cannot say anything about the second problem, since pgm_read_word() is a
> builtin function of the avr-libc. You must have replaced it by something when
> compiling with cc65, and without knowing how you did that, I cannot comment.
> There are however subtle problems with function pointers, so it may be a
> compiler problem, too.

Indeed, the original fake6502 didn't have calls to pgm_read_word(); I
added them myself to port it to the ATmega microcontrollers. It's
declared like this (embd.h):

#ifdef __AVR
#include <avr/pgmspace.h>
#define PROGMEM
#define pgm_read_byte(p) (*(p))
#define pgm_read_word(p) (*(p))
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Aug 15 18:39:52 2014

This archive was generated by hypermail 2.1.8 : 2014-08-15 18:39:54 CEST