Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » SDCC
  • » [Sdcc-user] Cypress FX2LP - problem after upgrading from sdcc-2.6.0 [RSS Feed]

#1 March 26, 2008 17:02:57

Steven P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Sdcc-user] Cypress FX2LP - problem after upgrading from sdcc-2.6.0


Hello Maarten,I have attached trimmed versions (to keep this email under the 40k limit)of the map files from 2.6.0 and 2.8.0.I used the same Makefile for both versions - the compiler and linkeroptions are:CFLAGS= --nogcse --noinvariant --noinduction --nojtbound --noloopreverse--nolabelopt --no-xinit-opt --nooverlay --no-peep -DALLOCATE_REGISTERSLDFLAGS=--nogcse --noinvariant --noinduction --nojtbound --noloopreverse--nolabelopt --no-xinit-opt --nooverlay --no-peep \--iram-size 256 --xram-loc 0x3000

I have 3 separate asm files. They have these .area directives:

1. For interrupt vectors:
.area VECTORS (CODE,ABS)
.org 0x03

2. For USB-interrupt autovectors jump table:
.area USBJT (CODE,ABS)
.org 0x1a00

3. For descriptor table:
.area DSCR (CODE,ABS)
.org 0x1f00I can see from the vectors.rst file that the interrupt vectors start at0x0003, but I can't see anywhere in the other rst files from 2.8.0 whatcode there is at 0x0000. I can send you the rst files if needed.I've been battling with this for days and am pretty lost, so any help wouldbe greatly appreciated.Many thanks,
Steven

Maarten Brock wrote:Hello Steven,What does sdcc put at 0x0000? See .map file or other.rst files. What options did you use to compile and linkthis? Are you using separate .asm files with incomplete.area directives?MaartenGreetings All,sdcc-2.6.0 was successfully compiling code for a Cypress FX2LP chip untilit hit this bug - SIGSEGV using auto variable.This spurred me to upgrade to sdcc-2.8.0 (currently using #5117). However,since doing that, I've come across another problem. The code is loadedsuccessfully into the FX2LP, but after reset, it behaves unpredictably -often not renumerating properly and thus not appearing on the USB bus.Rolling back to a previous version of my code allows sdcc-2.6.0 to compileit without the SIGSEGV using auto variable problem. This previous versionof my code still exhibits the second problem when compiling withsdcc-2.8.0. This allows comparison between the output of the two sdccversions.There is a difference between the main .rst files as follows:

sdcc-2.6.0:
438 .area HOME (CODE)
0000 439 __interrupt_vect:
0000 02 00 67 440 ljmp __sdcc_gsinit_startup

sdcc-2.8.0:
447 .area HOME (CODE)
0064 448 __interrupt_vect:
0064 02 00 6C 449 ljmp __sdcc_gsinit_startupI assume that HOME is meant to be the start of the code segment and that itshould start at address 0000? Why does sdcc-2.8.0 start the interruptvector table at 0064? Am I misunderstanding something?Any other pointers for where I can look to solve this problem would begreatly appreciated.Thanks
StevenHexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
VECTORS 0000 0061 = 97. bytes (ABS,CON,CODE)

Value Global
-------- --------------------------------
0C:0000 l_BIT_BANK
0C:0000 l_GSINIT1
0C:0000 l_GSINIT3
0C:0000 l_GSINIT5
0C:0000 l_ISEG
0C:0000 l_PSEG
0C:0000 l_REG_BANK_1
0C:0000 l_REG_BANK_2
0C:0000 l_REG_BANK_3
0C:0000 l_RSEG
0C:0000 l_XINIT
0C:0000 l_XISEG
0C:0000 l__CODE
0C:0000 s_BSEG
0C:0000 s_DSCR
0C:0000 s_DSEG
0C:0000 s_HOME
0C:0000 s_PSEG
0C:0000 s_REG_BANK_0
0C:0000 s_USBJT
0C:0000 s_VECTORS
0C:0000 s__CODE
0C:0001 l_BSEG_BYTES
0C:0003 l_GSFINAL
0C:0003 l_GSINIT0
0C:0003 l_HOME
0C:0003 l_OSEG
0C:0003 s_GSINIT0
0C:0006 l_GSINIT4
0C:0008 l_BSEG
0C:0008 l_REG_BANK_0
0C:0008 s_REG_BANK_1
0C:000A l_CONST
0C:000A l_GSINIT2
0C:0010 s_REG_BANK_2
0C:0018 s_REG_BANK_3
0C:0020 s_BSEG_BYTES
0C:0021 s_BIT_BANK
0C:002A s_OSEG
0C:002D s_RSEG
0C:002D s_SSEG
0C:0043 _USB_AutoVector
0C:0061 l_VECTORS
0C:006A s_GSINIT1
0C:006A s_GSINIT2
0C:0074 s_GSINIT3
0C:0074 s_GSINIT4
0C:007A s_GSINIT
0C:007A s_GSINIT5
0C:007E l_DSEG
0C:0080 s_ISEG
0C:00B2 l_DSCR
0C:00B8 l_USBJT
0C:00D3 l_SSEG
0C:00E2 l_XSEG
0C:0100 l_IRAM
0C:0431 l_GSINIT
0C:04AB s_GSFINAL
0C:04AE s_CSEG
0C:189C l_CSEG
0C:1E0A s_CONST
0C:1E14 s_XINIT
0C:3000 s_XSEG
0C:30E2 s_XISEG

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
USBJT 0000 00B8 = 184. bytes (ABS,CON,CODE)

Value Global
-------- --------------------------------
0C:1A00 USB_Jump_Table

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
DSCR 0000 00B2 = 178. bytes (ABS,CON,CODE)

Value Global
-------- --------------------------------
0C:1F00 _DeviceDscr
0C:1F12 _DeviceQualDscr
0C:1F1C _HighSpeedConfigDscr
0C:1F3C _FullSpeedConfigDscr
0C:1F5C _StringDscr
0C:1FB0 _UserDscr

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
. .ABS. 0000 0000 = 0. bytes (ABS,CON)

Value Global
-------- --------------------------------
0080 _IOA
0080 _PA0
0081 _PA1
0081 _SP
0082 _DPL
0082 _PA2
0083 _DPH
0083 _PA3
0084 _DPL1
0084 _PA4
0085 _DPH1
0085 _PA5
0086 _DPS
0086 _PA6
0087 _PA7
0087 _PCON
0088 _IT0
0088 _TCON
0089 _IE0
0089 _TMOD
008A _IT1
008A _TL0
008B _IE1
008B _TL1
008C _TH0
008C _TR0
008D _TF0
008D _TH1
008E _CKCON
008E _TR1
008F _SPC_FNC
008F _TF1
0090 _IOB
0090 _PB0
0091 _EXIF
0091 _PB1
0092 _MPAGE
0092 _PB2
0092 _XPAGE
0093 _PB3
0094 _PB4
0095 _PB5
0096 _PB6
0097 _PB7
0098 _RI
0098 _SCON0
0099 _SBUF0
0099 _TI
009A _AUTOPTRH1
009A _RB8
009B _AUTOPTRL1
009B _TB8
009C _REN
009D _AUTOPTRH2
009D _SM2
009E _AUTOPTRL2
009E _SM1
009F _SM0
00A0 _IOC
00A0 _PC0
00A1 _INT2CLR
00A1 _PC1
00A2 _INT4CLR
00A2 _PC2
00A3 _PC3
00A4 _PC4
00A5 _PC5
00A6 _PC6
00A7 _PC7
00A8 _EX0
00A8 _IE
00A9 _ET0
00AA _EP2468STAT
00AA _EX1
00AB _EP24FIFOFLGS
00AB _ET1
00AC _EP68FIFOFLGS
00AC _ES0
00AD _ET2
00AE _ES1
00AF _AUTOPTRSETUP
00AF _EA
00B0 _IOD
00B0 _PD0
00B1 _IOE
00B1 _PD1
00B2 _OEA
00B2 _PD2
00B3 _OEB
00B3 _PD3
00B4 _OEC
00B4 _PD4
00B5 _OED
00B5 _PD5
00B6 _OEE
00B6 _PD6
00B7 _PD7
00B8 _IP
00B8 _PX0
00B9 _PT0
00BA _EP01STAT
00BA _PX1
00BB _GPIFTRIG
00BB _PT1
00BC _PS0
00BD _GPIFSGLDATH
00BD _PT2
00BE _GPIFSGLDATLX
00BE _PS1
00BF _GPIFSGLDATLNOX
00C0 _RI1
00C0 _SCON1
00C1 _SBUF1
00C1 _TI1
00C2 _RB81
00C3 _TB81
00C4 _REN1
00C5 _SM21
00C6 _SM11
00C7 _SM01
00C8 _CP_RL2
00C8 _T2CON
00C9 _C_T2
00CA _RCAP2L
00CA _TR2
00CB _EXEN2
00CB _RCAP2H
00CC _TCLK
00CC _TL2
00CD _RCLK
00CD _TH2
00CE _EXF2
00CF _TF2
00D0 _P
00D0 _PSW
00D1 _FL
00D2 _OV
00D3 _RS0
00D4 _RS1
00D5 _F0
00D6 _AC
00D7 _CY
00D8 _EICON
00DB _INT6
00DC _RESI
00DD _ERESI
00DF _SMOD1
00E0 _ACC
00E8 _EIE
00E8 _EUSB
00E9 _EI2C
00EA _EIEX4
00EB _EIEX5
00EC _EIEX6
00F0 _B
00F5 _B_5
00F6 _B_6
00F7 _B_7
00F8 _EIP
00F8 _PUSB
00F9 _PI2C
00FA _EIPX4
00FB _EIPX5
00FC _EIPX6

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
_CODE 0000 0000 = 0. bytes (REL,CON)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
REG_BANK_0 0000 0008 = 8. bytes (REL,OVR)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
REG_BANK_1 0008 0000 = 0. bytes (REL,OVR)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
REG_BANK_2 0010 0000 = 0. bytes (REL,OVR)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
REG_BANK_3 0018 0000 = 0. bytes (REL,OVR)

Hexadecimal

Area Addr Size Decimal Bits (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
BSEG 0000 0008 = 8. bits (REL,CON,BIT)

Value Global
-------- --------------------------------
0B:0000 _GotSUD
0B:0001 _Rwuen
0B:0002 _Selfpwr
0B:0003 _Sleep
0B:0004 _in_enable
0B:0005 _internal_read
0B:0006 _enum_high_speed
0B:0007 _EZUSB_Discon_PARM_1

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
BSEG_BYTES 0020 0001 = 1. bytes (REL,CON)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
BIT_BANK 0021 0000 = 0. bytes (REL,OVR)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
DSEG 0000 007E = 126. bytes (REL,CON)

Value Global
-------- --------------------------------
0008 _pDeviceDscr
000A _pDeviceQualDscr
000C _pHighSpeedConfigDscr
000E _pFullSpeedConfigDscr
0010 _pConfigDscr
0012 _pOtherConfigDscr
0014 _pStringDscr
0021 _Configuration
0022 _AlternateSetting
0024 _I2CPckt

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
OSEG 002A 0003 = 3. bytes (REL,OVR)

Value Global
-------- --------------------------------
002A _EZUSB_ReadI2C__PARM_2
002A _EZUSB_WriteI2C__PARM_2
002A __gptrput_PARM_2
002B _EZUSB_ReadI2C__PARM_3
002B _EZUSB_WriteI2C__PARM_3

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
ISEG 0080 0000 = 0. bytes (REL,CON)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
SSEG 002D 00D3 = 211. bytes (REL,OVR)

Value Global
-------- --------------------------------
002D __start__stack

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
RSEG 002D 0000 = 0. bytes (REL,CON)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
PSEG 0000 0000 = 0. bytes
(REL,CON,PAG,XDATA)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
XSEG 3000 00E2 = 226. bytes (REL,CON,XDATA)

Value Global
-------- --------------------------------
0D:3000 _src_flash
0D:3014 _dst_flash
0D:3028 _key_state
0D:3029 _bytes_remaining
0D:302B _ep2fifobc
0D:302D _send_addr
0D:302F _page_write
0D:3031 _row_address
0D:3035 _Tcount
0D:3037 _WaveData
0D:30B7 _FlowStates
0D:30DB _InitData

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
HOME 0000 0003 = 3. bytes (REL,CON,CODE)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
GSINIT0 0003 0003 = 3. bytes (REL,CON,CODE)

Value Global
-------- --------------------------------
0C:0067 __sdcc_gsinit_startup

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
GSINIT1 006A 0000 = 0. bytes (REL,CON,CODE)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
GSINIT2 006A 000A = 10. bytes (REL,CON,CODE)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
GSINIT3 0074 0000 = 0. bytes (REL,CON,CODE)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
GSINIT4 0074 0006 = 6. bytes (REL,CON,CODE)

Value Global
-------- --------------------------------
0C:0074 __mcs51_genRAMCLEAR

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
GSINIT5 007A 0000 = 0. bytes (REL,CON,CODE)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
GSINIT 007A 0431 = 1073. bytes (REL,CON,CODE)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
GSFINAL 04AB 0003 = 3. bytes (REL,CON,CODE)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
CSEG 04AE 189C = 6300. bytes (REL,CON,CODE)

Value Global
-------- --------------------------------
0C:04AE __sdcc_program_startup
0C:04B3 _main
0C:066F _HighSpeedCapable
0C:068A _SetupCommand
0C:0A7C _resume_isr
0C:0A97 _GPIF_SingleByteWrite
0C:0AAA _GPIF_SingleByteRead
0C:0AD6 _read
0C:0B6E _write
0C:0BE7 _pagewrite
0C:0D2D _TD_Init
0C:0D88 _key_statemachine
0C:0E39 _TD_Poll
0C:0E6B _TD_Suspend
0C:0E70 _TD_Resume
0C:0E75 _DR_GetDescriptor
0C:0E7A _DR_SetConfiguration
0C:0EC2 _DR_GetConfiguration
0C:0ED9 _DR_SetInterface
0C:0EE4 _DR_GetInterface
0C:0EFB _DR_GetStatus
0C:0F00 _DR_ClearFeature
0C:0F05 _DR_SetFeature
0C:0F0A _DR_VendorCmnd
0C:1118 _ISR_Sudav
0C:113B _ISR_Sutok
0C:115C _ISR_Sof
0C:117D _ISR_Ures
0C:11CA _ISR_Susp
0C:11ED _ISR_Highspeed
0C:1246 _ISR_Ep0ack
0C:125E _ISR_Stub
0C:1276 _ISR_Ep0in
0C:128E _ISR_Ep0out
0C:12A6 _ISR_Ep1in
0C:12BE _ISR_Ep1out
0C:12D6 _ISR_Ep2inout
0C:12EE _ISR_Ep4inout
0C:1306 _ISR_Ep6inout
0C:131E _ISR_Ep8inout
0C:1336 _ISR_Ibn
0C:134E _ISR_Ep0pingnak
0C:1366 _ISR_Ep1pingnak
0C:137E _ISR_Ep2pingnak
0C:1396 _ISR_Ep4pingnak
0C:13AE _ISR_Ep6pingnak
0C:13C6 _ISR_Ep8pingnak
0C:13DE _ISR_Errorlimit
0C:13F6 _ISR_Ep2piderror
0C:140E _ISR_Ep4piderror
0C:1426 _ISR_Ep6piderror
0C:143E _ISR_Ep8piderror
0C:1456 _ISR_Ep2pflag
0C:146E _ISR_Ep4pflag
0C:1486 _ISR_Ep6pflag
0C:149E _ISR_Ep8pflag
0C:14B6 _ISR_Ep2eflag
0C:14CE _ISR_Ep4eflag
0C:14E6 _ISR_Ep6eflag
0C:14FE _ISR_Ep8eflag
0C:1516 _ISR_Ep2fflag
0C:152E _ISR_Ep4fflag
0C:1546 _ISR_Ep6fflag
0C:155E _ISR_Ep8fflag
0C:1576 _ISR_GpifComplete
0C:158E _ISR_GpifWaveform
0C:15A6 _Setup_FLOWSTATE_command
0C:15F7 _Setup_FLOWSTATE_address
0C:1648 _Setup_FLOWSTATE_Read
0C:1699 _Setup_FLOWSTATE_Write
0C:16EA _EP2_OUT
0C:1748 _EP2_IN
0C:179D _GpifInit
0C:188F _send_command
0C:18AA _read_flash_id
0C:1ABF _EZUSB_Discon
0C:1AF2 _EZUSB_InitI2C
0C:1AFA _EZUSB_WaitForEEPROMWrite
0C:1B39 _EZUSB_WriteI2C_
0C:1B73 _EZUSB_ReadI2C_
0C:1BB1 _i2c_isr
0C:1CF3 __gptrput
0C:1D0C _EZUSB_GetStringDscr
0C:1D43 _EZUSB_Susp
0C:1D57 _EZUSB_Delay
0C:1DA2 _EZUSB_Resume
0C:1DD9 __gptrget
0C:1DF5 _EZUSB_Delay1ms
0C:1E06 __sdcc_external_startup

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
CONST 1E0A 000A = 10. bytes (REL,CON,CODE)

Value Global
-------- --------------------------------
0C:1E0A _EPCS_Offset_Lookup_Table

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
XISEG 30E2 0000 = 0. bytes (REL,CON,XDATA)

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
XINIT 1E14 0000 = 0. bytes (REL,CON,CODE)
ASxxxx Linker V01.70 + NoICE + SDCC Feb 1999, page 1.

Files Linked

build/fw.rel
build/periph.rel
build/gpif.rel
build/flash.rel
build/dscr.rel
build/usbjmpt.rel
build/vectors.rel


ASxxxx Linker V01.70 + NoICE + SDCC Feb 1999, page 2.

User Base Address Definitions

HOME = 0x0000
XSEG = 0x3000
ISEG = 0x0080
BSEG = 0x0000Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
VECTORS3 0000 0061 = 97. bytes (ABS,CON,CODE)

Value Global
-------- --------------------------------
0C:0000 l_BIT_BANK
0C:0000 l_CABS
0C:0000 l_DSCR
0C:0000 l_GSINIT1
0C:0000 l_GSINIT3
0C:0000 l_GSINIT5
0C:0000 l_IABS
0C:0000 l_ISEG
0C:0000 l_PSEG
0C:0000 l_REG_BANK_1
0C:0000 l_REG_BANK_2
0C:0000 l_REG_BANK_3
0C:0000 l_RSEG
0C:0000 l_USBJT
0C:0000 l_VECTORS
0C:0000 l_XABS
0C:0000 l_XINIT
0C:0000 l_XISEG
0C:0000 l__CODE
0C:0000 s_BSEG
0C:0000 s_CABS
0C:0000 s_DSCR
0C:0000 s_DSCR1f00
0C:0000 s_DSEG
0C:0000 s_IABS
0C:0000 s_ISEG
0C:0000 s_REG_BANK_0
0C:0000 s_USBJT
0C:0000 s_USBJT1a00
0C:0000 s_VECTORS
0C:0000 s_VECTORS3
0C:0000 s_XABS
0C:0001 l_BSEG_BYTES
0C:0003 l_GSFINAL
0C:0003 l_GSINIT0
0C:0003 l_OSEG
0C:0006 l_GSINIT4
0C:0008 l_BSEG
0C:0008 l_HOME
0C:0008 l_REG_BANK_0
0C:0008 s_REG_BANK_1
0C:000A l_CONST
0C:000A l_GSINIT2
0C:0010 s_REG_BANK_2
0C:0018 s_BIT_BANK
0C:0018 s_REG_BANK_3
0C:0020 s_BSEG_BYTES
0C:0020 s__CODE
0C:002A s_OSEG
0C:002D s_RSEG
0C:002D s_SSEG
0C:0043 _USB_AutoVector
0C:0061 l_VECTORS3
0C:0064 s_HOME
0C:006C s_GSINIT0
0C:006F s_GSINIT1
0C:006F s_GSINIT2
0C:0079 s_GSINIT3
0C:0079 s_GSINIT4
0C:007E l_DSEG
0C:007F s_GSINIT
0C:007F s_GSINIT5
0C:00B2 l_DSCR1f00
0C:00B8 l_USBJT1a00
0C:00D3 l_SSEG
0C:00E2 l_XSEG
0C:0100 l_IRAM
0C:0431 l_GSINIT
0C:04B0 s_GSFINAL
0C:04B3 s_CSEG
0C:1867 l_CSEG
0C:1E03 s_CONST
0C:1E0D s_XINIT
0C:3000 s_PSEG
0C:3000 s_XSEG
0C:30E2 s_XISEG


Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
USBJT1a00 0000 00B8 = 184. bytes (ABS,CON,CODE)

Value Global
-------- --------------------------------
0C:1A00 USB_Jump_Table


Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
DSCR1f00 0000 00B2 = 178. bytes (ABS,CON,CODE)

Value Global
-------- --------------------------------
0C:1F00 _DeviceDscr
0C:1F12 _DeviceQualDscr
0C:1F1C _HighSpeedConfigDscr
0C:1F3C _FullSpeedConfigDscr
0C:1F5C _StringDscr
0C:1FB0 _UserDscr





Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
. .ABS. 0000 0000 = 0. bytes (ABS,CON)

Value Global
-------- --------------------------------
0080 _IOA
0080 _PA0
0081 _PA1
0081 _SP
0082 _DPL
0082 _PA2
0083 _DPH
0083 _PA3
0084 _DPL1
0084 _PA4
0085 _DPH1
0085 _PA5
0086 _DPS
0086 _PA6
0087 _PA7
0087 _PCON
0088 _IT0
0088 _TCON
0089 _IE0
0089 _TMOD
008A _IT1
008A _TL0
008B _IE1
008B _TL1
008C _TH0
008C _TR0
008D _TF0
008D _TH1
008E _CKCON
008E _TR1
008F _SPC_FNC
008F _TF1
0090 _IOB
0090 _PB0
0091 _EXIF
0091 _PB1
0092 _MPAGE
0092 _PB2
0092 _XPAGE
0093 _PB3
0094 _PB4
0095 _PB5
0096 _PB6
0097 _PB7
0098 _RI
0098 _SCON0
0099 _SBUF0
0099 _TI
009A _AUTOPTRH1
009A _RB8
009B _AUTOPTRL1
009B _TB8
009C _REN
009D _AUTOPTRH2
009D _SM2
009E _AUTOPTRL2
009E _SM1
009F _SM0
00A0 _IOC
00A0 _PC0
00A1 _INT2CLR
00A1 _PC1
00A2 _INT4CLR
00A2 _PC2
00A3 _PC3
00A4 _PC4
00A5 _PC5
00A6 _PC6
00A7 _PC7
00A8 _EX0
00A8 _IE
00A9 _ET0
00AA _EP2468STAT
00AA _EX1
00AB _EP24FIFOFLGS
00AB _ET1
00AC _EP68FIFOFLGS
00AC _ES0
00AD _ET2
00AE _ES1
00AF _AUTOPTRSETUP
00AF _EA
00B0 _IOD
00B0 _PD0
00B1 _IOE
00B1 _PD1
00B2 _OEA
00B2 _PD2
00B3 _OEB
00B3 _PD3
00B4 _OEC
00B4 _PD4
00B5 _OED
00B5 _PD5
00B6 _OEE
00B6 _PD6
00B7 _PD7
00B8 _IP
00B8 _PX0
00B9 _PT0
00BA _EP01STAT
00BA _PX1
00BB _GPIFTRIG
00BB _PT1
00BC _PS0
00BD _GPIFSGLDATH
00BD _PT2
00BE _GPIFSGLDATLX
00BE _PS1
00BF _GPIFSGLDATLNOX
00C0 _RI1
00C0 _SCON1
00C1 _SBUF1
00C1 _TI1
00C2 _RB81
00C3 _TB81
00C4 _REN1
00C5 _SM21
00C6 _SM11
00C7 _SM01
00C8 _CP_RL2
00C8 _T2CON
00C9 _C_T2
00CA _RCAP2L
00CA _TR2
00CB _EXEN2
00CB _RCAP2H
00CC _TCLK
00CC _TL2
00CD _RCLK
00CD _TH2
00CE _EXF2
00CF _TF2
00D0 _P
00D0 _PSW
00D1 _FL
00D2 _OV
00D3 _RS0
00D4 _RS1
00D5 _F0
00D6 _AC
00D7 _CY
00D8 _EICON
00DB _INT6
00DC _RESI
00DD _ERESI
00DF _SMOD1
00E0 _ACC
00E8 _EIE
00E8 _EUSB
00E9 _EI2C
00EA _EIEX4
00EB _EIEX5
00EC _EIEX6
00F0 _B
00F5 _B_5
00F6 _B_6
00F7 _B_7
00F8 _EIP
00F8 _PUSB
00F9 _PI2C
00FA _EIPX4
00FB _EIPX5
00FC _EIPX6







Hexadecimal

Area Addr Size Decimal Bits (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
BSEG 0000 0008 = 8. bits (REL,CON,BIT)

Value Global
-------- --------------------------------
0B:0000 _GotSUD
0B:0001 _Rwuen
0B:0002 _Selfpwr
0B:0003 _Sleep
0B:0004 _in_enable
0B:0005 _internal_read
0B:0006 _enum_high_speed
0B:0007 _EZUSB_Discon_PARM_1


Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
DSEG 0000 007E = 126. bytes (REL,CON)

Value Global
-------- --------------------------------
0008 _pDeviceDscr
000A _pDeviceQualDscr
000C _pHighSpeedConfigDscr
000E _pFullSpeedConfigDscr
0010 _pConfigDscr
0012 _pOtherConfigDscr
0014 _pStringDscr
0021 _Configuration
0022 _AlternateSetting
0024 _I2CPckt

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
OSEG 002A 0003 = 3. bytes (REL,OVR)

Value Global
-------- --------------------------------
002A _EZUSB_ReadI2C__PARM_2
002A _EZUSB_WriteI2C__PARM_2
002A __gptrput_PARM_2
002B _EZUSB_ReadI2C__PARM_3
002B _EZUSB_WriteI2C__PARM_3


Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
SSEG 002D 00D3 = 211. bytes (REL,OVR)

Value Global
-------- --------------------------------
002D __start__stack



Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
XSEG 3000 00E2 = 226. bytes (REL,CON,XDATA)

Value Global
-------- --------------------------------
0D:3000 _src_flash
0D:3014 _dst_flash
0D:3028 _key_state
0D:3029 _bytes_remaining
0D:302B _ep2fifobc
0D:302D _send_addr
0D:302F _page_write
0D:3031 _row_address
0D:3035 _Tcount
0D:3037 _WaveData
0D:30B7 _FlowStates
0D:30DB _InitData

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
HOME 0064 0008 = 8. bytes (REL,CON,CODE)

Value Global
-------- --------------------------------
0C:0067 __sdcc_program_startup

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
GSINIT0 006C 0003 = 3. bytes (REL,CON,CODE)

Value Global
-------- --------------------------------
0C:006C __sdcc_gsinit_startup




Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
GSINIT4 0079 0006 = 6. bytes (REL,CON,CODE)

Value Global
-------- --------------------------------
0C:0079 __mcs51_genRAMCLEAR




Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
CSEG 04B3 1867 = 6247. bytes (REL,CON,CODE)

Value Global
-------- --------------------------------
0C:04B3 _main
0C:066D _HighSpeedCapable
0C:0682 _SetupCommand
0C:0A6C _resume_isr
0C:0A87 _GPIF_SingleByteWrite
0C:0A9A _GPIF_SingleByteRead
0C:0AC6 _read
0C:0B5E _write
0C:0BD7 _pagewrite
0C:0D1D _TD_Init
0C:0D7C _key_statemachine
0C:0E2D _TD_Poll
0C:0E5F _TD_Suspend
0C:0E61 _TD_Resume
0C:0E63 _DR_GetDescriptor
0C:0E65 _DR_SetConfiguration
0C:0EAA _DR_GetConfiguration
0C:0EBE _DR_SetInterface
0C:0EC6 _DR_GetInterface
0C:0EDA _DR_GetStatus
0C:0EDC _DR_ClearFeature
0C:0EDE _DR_SetFeature
0C:0EE0 _DR_VendorCmnd
0C:10E8 _ISR_Sudav
0C:110B _ISR_Sutok
0C:112C _ISR_Sof
0C:114D _ISR_Ures
0C:119A _ISR_Susp
0C:11BD _ISR_Highspeed
0C:1216 _ISR_Ep0ack
0C:122E _ISR_Stub
0C:1246 _ISR_Ep0in
0C:125E _ISR_Ep0out
0C:1276 _ISR_Ep1in
0C:128E _ISR_Ep1out
0C:12A6 _ISR_Ep2inout
0C:12BE _ISR_Ep4inout
0C:12D6 _ISR_Ep6inout
0C:12EE _ISR_Ep8inout
0C:1306 _ISR_Ibn
0C:131E _ISR_Ep0pingnak
0C:1336 _ISR_Ep1pingnak
0C:134E _ISR_Ep2pingnak
0C:1366 _ISR_Ep4pingnak
0C:137E _ISR_Ep6pingnak
0C:1396 _ISR_Ep8pingnak
0C:13AE _ISR_Errorlimit
0C:13C6 _ISR_Ep2piderror
0C:13DE _ISR_Ep4piderror
0C:13F6 _ISR_Ep6piderror
0C:140E _ISR_Ep8piderror
0C:1426 _ISR_Ep2pflag
0C:143E _ISR_Ep4pflag
0C:1456 _ISR_Ep6pflag
0C:146E _ISR_Ep8pflag
0C:1486 _ISR_Ep2eflag
0C:149E _ISR_Ep4eflag
0C:14B6 _ISR_Ep6eflag
0C:14CE _ISR_Ep8eflag
0C:14E6 _ISR_Ep2fflag
0C:14FE _ISR_Ep4fflag
0C:1516 _ISR_Ep6fflag
0C:152E _ISR_Ep8fflag
0C:1546 _ISR_GpifComplete
0C:155E _ISR_GpifWaveform
0C:1576 _Setup_FLOWSTATE_command
0C:15C7 _Setup_FLOWSTATE_address
0C:1618 _Setup_FLOWSTATE_Read
0C:1669 _Setup_FLOWSTATE_Write
0C:16BA _EP2_OUT
0C:1718 _EP2_IN
0C:176D _GpifInit
0C:185F _send_command
0C:187A _read_flash_id
0C:1AB8 _EZUSB_Discon
0C:1AEB _EZUSB_InitI2C
0C:1AF3 _EZUSB_WaitForEEPROMWrite
0C:1B32 _EZUSB_WriteI2C_
0C:1B6C _EZUSB_ReadI2C_
0C:1BAA _i2c_isr
0C:1CEC __gptrput
0C:1D05 _EZUSB_GetStringDscr
0C:1D3C _EZUSB_Susp
0C:1D50 _EZUSB_Delay
0C:1D9B _EZUSB_Resume
0C:1DD2 __gptrget
0C:1DEE _EZUSB_Delay1ms
0C:1DFF __sdcc_external_startup

Hexadecimal

Area Addr Size Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
CONST 1E03 000A = 10. bytes (REL,CON,CODE)

Value Global
-------- --------------------------------
0C:1E03 _EPCS_Offset_Lookup_Table


ASxxxx Linker V01.75 + NoICE + SDCC Feb 1999, page 1.

Files Linked

build/fw.rel
build/periph.rel
build/gpif.rel
build/flash.rel
build/dscr.rel
build/usbjmpt.rel
build/vectors.rel


ASxxxx Linker V01.75 + NoICE + SDCC Feb 1999, page 2.

User Base Address Definitions

HOME = 0x0000
XSEG = 0x3000
PSEG = 0x3000
ISEG = 0x0000
BSEG = 0x0000-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/sdcc-user

Offline

#2 March 26, 2008 18:05:41

Steven P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Sdcc-user] Cypress FX2LP - problem after upgrading from sdcc-2.6.0


P.S. I've just checked the intel hex files generated by 2.6.0 and 2.8.0 and
there is definitely nothing at address 0x0000 for 2.8.0. They start as
follows:

sdcc-2.6.0:
:0300000002006794
:0304AB000204AE9A
:0504AE001204B380FE02
:0504B300C203C201C2FA
:0404B80002C200126A
:0404BC000D2D750885

sdcc-2.8.0:
:0300640002006C2B
:0304B000020067E0
:050067001204B380FE4D
:0504B300C203C201C2FA
:0404B80002C200126A
:0404BC000D1D750895

Thanks
Steven


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/sdcc-user

Offline

#3 March 26, 2008 18:18:57

Steven P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Sdcc-user] Cypress FX2LP - problem after upgrading from sdcc-2.6.0


Hi Maarten,

Sorry, I missed your reply before my last post.

I'll try what you suggest, but do you know why there would be a change
since 2.6.0? I remember trying 2.7.0 at one stage and had this problem, so
reverted to 2.6.0 until I hit the SIGSEGV using auto variable bug.

Thanks
Steven

Maarten Brock wrote:
> Steven,
>
> Do you really need the interrupt vectors in asm? If so I recommend to add
> the bootvector at 0x0000 to it as a solution. Messing with only some of
> the vectors is dangerous.
>
> The compiler puts the bootvector in segment HOME, but also puts interrupt
> vectors (if any) and some initialization code there. This makes HOME
> larger than 3 bytes. After the absolute segment VECTORS has been placed,
> the linker can no longer put HOME in the first 3 bytes and moves to the
> first empty place at 0x0064.
>
> Maarten
>
>> Hello Maarten,
>>
>> I have attached trimmed versions (to keep this email under the 40k limit)
>> of the map files from 2.6.0 and 2.8.0.
>>
>> I used the same Makefile for both versions - the compiler and linker
>> options are:
>>
>> CFLAGS= --nogcse --noinvariant --noinduction --nojtbound --noloopreverse
>> --nolabelopt --no-xinit-opt --nooverlay --no-peep -DALLOCATE_REGISTERS
>>
>> LDFLAGS=--nogcse --noinvariant --noinduction --nojtbound --noloopreverse
>> --nolabelopt --no-xinit-opt --nooverlay --no-peep \
>> --iram-size 256 --xram-loc 0x3000
>>
>> I have 3 separate asm files. They have these .area directives:
>>
>> 1. For interrupt vectors:
>> .area VECTORS (CODE,ABS)
>> .org 0x03
>>
>> 2. For USB-interrupt autovectors jump table:
>> .area USBJT (CODE,ABS)
>> .org 0x1a00
>>
>> 3. For descriptor table:
>> .area DSCR (CODE,ABS)
>> .org 0x1f00
>>
>> I can see from the vectors.rst file that the interrupt vectors start at
>> 0x0003, but I can't see anywhere in the other rst files from 2.8.0 what
>> code there is at 0x0000. I can send you the rst files if needed.
>>
>> I've been battling with this for days and am pretty lost, so any help
>> would
>> be greatly appreciated.
>>
>> Many thanks,
>> Steven
>>
>> Maarten Brock wrote:
>>> Hello Steven,
>>>
>>> What does sdcc put at 0x0000? See .map file or other
>>> .rst files. What options did you use to compile and link
>>> this? Are you using separate .asm files with incomplete
>>> .area directives?
>>>
>>> Maarten
>>>
>>>> Greetings All,
>>>>
>>>> sdcc-2.6.0 was successfully compiling code for a Cypress FX2LP chip
>>>> until
>>>> it hit this bug - SIGSEGV using auto variable.
>>>>
>>>> This spurred me to upgrade to sdcc-2.8.0 (currently using #5117).
>>>> However,
>>>> since doing that, I've come across another problem. The code is loaded
>>>> successfully into the FX2LP, but after reset, it behaves unpredictably
>>>> -
>>>> often not renumerating properly and thus not appearing on the USB bus.
>>>>
>>>> Rolling back to a previous version of my code allows sdcc-2.6.0 to
>>>> compile
>>>> it without the SIGSEGV using auto variable problem. This previous
>>>> version
>>>> of my code still exhibits the second problem when compiling with
>>>> sdcc-2.8.0. This allows comparison between the output of the two sdcc
>>>> versions.
>>>>
>>>> There is a difference between the main .rst files as follows:
>>>>
>>>> sdcc-2.6.0:
>>>> 438 .area HOME (CODE)
>>>> 0000 439 __interrupt_vect:
>>>> 0000 02 00 67 440 ljmp __sdcc_gsinit_startup
>>>>
>>>> sdcc-2.8.0:
>>>> 447 .area HOME (CODE)
>>>> 0064 448 __interrupt_vect:
>>>> 0064 02 00 6C 449 ljmp __sdcc_gsinit_startup
>>>>
>>>>
>>>> I assume that HOME is meant to be the start of the code segment and
>>>> that it
>>>> should start at address 0000? Why does sdcc-2.8.0 start the interrupt
>>>> vector table at 0064? Am I misunderstanding something?
>>>>
>>>> Any other pointers for where I can look to solve this problem would be
>>>> greatly appreciated.
>>>>
>>>> Thanks
>>>> Steven
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>>http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace_______________________________________________>> Sdcc-user mailing list
>> Sdcc-u***@*ists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/sdcc-user>>
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
>http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace> _______________________________________________
> Sdcc-user mailing list
> Sdcc-u***@*ists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/sdcc-user>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/sdcc-user

Offline

  • Root
  • » SDCC
  • » [Sdcc-user] Cypress FX2LP - problem after upgrading from sdcc-2.6.0 [RSS Feed]

Board footer

Moderator control

Enjoy the 16th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support