1 Notes on Various things I've learned about SDCC and the FX2
4 * cycfx2prog: http://www.triplespark.net/elec/periph/USB-FX2/software/index.html
5 * sdcc has sdcc/support/scripts/keil2sdcc.pl which I used to create the fx2regs.h file from the keil header.
6 * sdcc is little endian, keil is big endian (important if doing usb communication)
7 * xdata needs to start at 0x4000 (I think this is correct anyway.. 16k c/d memory then xdata)
9 - It seems the number can actually vary depending on the size of the image
10 - can sdcc not automatically figure that out?
11 * linux has objcopy, which can be used in place of Hex2bix for bix files
12 - objcopy -I ihex -O binary --pad-to=8192 input [output]
13 - this probably doesn't work for iic though.
18 - lower 128=registers/bits (direct or indirect)
19 - upper 128=stack (or whatever but only indirect addressing)
20 - sfs occupy upper 128 space only direct addressing
23 - 16k on chip 0-0x3fff
24 - 512 bytes on chip scratch ram 0xe000 - 0xe1ff (data memory only)
25 - epbuffers and control at 0xe200-0xffff (data memory only)
27 Only the on chip 16k and 512 bytes can be uploaded w/ eeprom or downloaded to host with SETUPPTR
30 data/near=direct addressable internal memory (default for model-small)
31 xdata/far=external ram (default for model-large)
32 idata=indirect addressable internal memory
33 pdata=access to xdata area, but uses sfr to get to address (sdcc 4.1)
34 code=code memory, study this more.
35 bit=uses lower 128 bit area
40 * what is CKCON and bmSTRETCH
41 * need to implemenent sleep/resume in final firmware