Commits

Kyösti Mälkki committed dd855b1

Build for FX2 device by default

Existing samples work for original FX2 with 8kB RAM. Make
it the default.

Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>

Comments (0)

Files changed (2)

    - upper 128=stack (or whatever but only indirect addressing)
    - sfs occupy upper 128 space only direct addressing
 
- * external
+ * external for FX2
+  - 8k on chip 0-0x1fff
+  - 512 bytes on chip scratch ram 0xe000 - 0xe1ff (data memory only)
+  - epbuffers and control at 0xe200-0xffff (data memory only)
+
+ * external for FX2LP
   - 16k on chip 0-0x3fff
   - 512 bytes on chip scratch ram 0xe000 - 0xe1ff (data memory only)
   - epbuffers and control at 0xe200-0xffff (data memory only)
   
-   Only the on chip 16k and 512 bytes can be uploaded w/ eeprom or downloaded to host with SETUPPTR
+   Only the on chip 8/16k and 512 bytes can be uploaded w/ eeprom or downloaded to host with SETUPPTR
    Might be possible to load the descriptors to the scratch ram instead of code ram area?
 
 sdcc data types
 VID?=0x04b4
 PID?=0x8613
 
+ifeq ($(DEVICE),fx2lp)
 DSCR_AREA?=-Wl"-b DSCR_AREA=0x3e00"
 INT2JT?=-Wl"-b INT2JT=0x3f00"
 CODE_SIZE?=--code-size 0x3c00
 XRAM_SIZE?=--xram-size 0x0200
 XRAM_LOC?=--xram-loc 0x3c00
+else
+DSCR_AREA?=-Wl"-b DSCR_AREA=0x1e00"
+INT2JT?=-Wl"-b INT2JT=0x1f00"
+CODE_SIZE?=--code-size 0x1c00
+XRAM_SIZE?=--xram-size 0x0200
+XRAM_LOC?=--xram-loc 0x1c00
+endif
+
 BUILDDIR?=build
 
 FX2LIBDIR?=$(dir $(lastword $(MAKEFILE_LIST)))../