2013年12月1日日曜日

SDCCによるFX2LPのFirmware開発に再挑戦 その2

注意: ただの駄文です。
    結局、今回はSDCCによるFX2LPのFirmware開発は成功していません。



前回、SDCCさんは ezusb.lib がお気に召さなかったので、再度pfenrirさんちから取得しなおして、make。

今度は

Multiple definition of _EUSB
Multiple definition of _EA
memory overlap at 0x0 for RSEG1
memory overlap at 0x1 for RSEG1

と言われたので探してみると、私が fx2regs.h をいじった形跡が…

2箇所、
390行目付近:
sbit EA    = 0xA8+7;

480行目付近:
sbit EUSB    = 0xE8+0;

を、はじめはコメントされていたのに、復活していました。

で、これを再度コメントアウトして、makeすると…

fw.c:210: error 20: Undefined identifier 'EUSB'
fw.c:216: error 20: Undefined identifier 'EA'

おお、これ、見たことある。これを言われたから fx2regs.h をいじったんだった…

ん? 活かしてもダメ、コメントにしてもダメ。いったい、どうすれば?

よく見ると、fx2regs.incが、fx2regs.hと同じフォルダにあります。
このfx2regs.incは、pfenrirさんのものです。
が、fx2regs.hは↓のものでした。
https://raw.github.com/stefanrauch/bel_projects/master/cy7/cyfx2usbuart/fx2regs.h

このfx2regs.hの中でコメントアウトされていたEUSBとEAの2群を復活して、make clean
make。

Multiple definition of _EIEX6
Multiple definition of _EI2C
Multiple definition of _EIPX4
Multiple definition of _EIPX5
Multiple definition of _EIPX6
Multiple definition of _PI2C
Multiple definition of _EUSB
Multiple definition of _PUSB
Multiple definition of _EA
Multiple definition of _ES0
Multiple definition of _ET0
Multiple definition of _ES1
Multiple definition of _ET1
Multiple definition of _ET2
Multiple definition of _EX0
Multiple definition of _EX1
Multiple definition of _EIEX4
Multiple definition of _EIEX5
memory overlap at 0x0 for RSEG1
memory overlap at 0x1 for RSEG1
memory overlap at 0x2 for RSEG1
memory overlap at 0x3 for RSEG1
memory overlap at 0x4 for RSEG1
memory overlap at 0x5 for RSEG1
memory overlap at 0x6 for RSEG1
memory overlap at 0x7 for RSEG1
memory overlap at 0x8 for RSEG1
memory overlap at 0x9 for RSEG1
memory overlap at 0xA for RSEG1
memory overlap at 0xB for RSEG1
memory overlap at 0xC for RSEG1
memory overlap at 0xD for RSEG1
memory overlap at 0xE for RSEG1
memory overlap at 0xF for RSEG1
memory overlap at 0x10 for RSEG1
memory overlap at 0x11 for RSEG1

今度はこんなに~

とりあえず「EIEX6」が含まれているファイルを探すと、次の4ファイルありました。
ezregs.h
ezregs.inc
ez2regs.h
ez2regs.inc

ezregsとez2regsの両方が使われてるってことかな。

ところが、ezregsを呼び出しているファイルを探すと、存在しません。
が、ez2regsの両ファイルには
If you modify the register definitions below, please regenerate the file
    "ezregs.inc" which includes the same basic information for assembly inclusion.
と書いてあるので、誰かが呼んでいるのだろうと思うことにして、

ezregsの両ファイルから、さきの2群をもう一度コメントアウト。

同じのが出る~~
では、ezregsとez2regsの計4ファイルからコメントアウトしてみましょう。


fw.c:210: error 20: Undefined identifier 'EUSB'

もう、面倒になってきちゃった(苦笑)

0 件のコメント: