From: Maarten B. <sou...@ds...> - 2005-07-16 20:01:30
|
Daniel, Nice work! This is the kind of stuff the OKR is waiting for I guess. Let's hope Thorsten is listening in. Some comments: The function should return a xdata* ("pointer to the RAM external to the 8051"), but in the small model we are using in compilation, local variables are placed by default in internal RAM (storage type data). This doesn't match according to the compiler, so doing a final conversion solves it (I hope): return((INTRFCDSCR xdata *)intrfc_dscr); Why not just tell the compiler intrfc_dscr points to xdata in the first place? INTRFCDSCR xdata *intrfc_dscr; That's logical, since at the 8051 (which is what it's simulating), there are just 128 (0x7f) bytes of RAM, and beyond 0x80 there live the SFRs. You can tell s51 to simulate an 8052 (-t8052) which has 256 bytes ram and the third timer. Keep up the good work. I think you learned more than you realize. Greetings, Maarten > Hi, > > at my university we (the students) used a Cypress EZ-USB based > development board, with Keil. I looked for a way to use just free > software for that, but I'm just a novice at microcontrollers. > > I found the problem of using the functions to access the non-standard > features of the board (USB, I2C, ...): the library EZUSB.LIB was only to > use with Keil, so I tried to reconstruct it to be used with sdcc. I > successfully ported some code from Keil to sdcc, and now it compiles. I > haven't tested all in the real hardware. > > I wrote all the steps I did, and what still has to be done to use that > board on Linux. It's mainly to my colleagues at the university, but I > also translated to English. See: > http://www.danielclemente.com/placa_pi/index.en.html > > > I hope that's useful. > > Thanks, > > Daniel Clemente Laboreo > http://www.danielclemente.com/ |