Am 02.08.2013 14:21, schrieb Mark McDougall: > On 2/08/2013 6:58 PM, Philipp Klaus Krause wrote: > >> To decide if sdcc would be a good option more information is necessary. Is >> there any public information on the architecture of this custom processor? > Unfortunately, no. In fact, I know very little about it myself right now, > other than a brief listing of the instruction set opcodes and some ALU > details. >
Hmm, does it have a stack-pointer-relative addressing mode like the stm8 does? If not, does it at least have an index register that we can use as frame pointer (like we do with ix on the z80)? If your target has neither I suggest 1) try to convince your contact to include it in the design 2) if that fails: Have a look at the hc08 port (the hc08 port sacrifices reentrency and thus recursion to be able to generate4 compact code for an architecture that lacks a good way to access local variables). Which registers are there in the architecture? > To give some background; a professional contact is developing a custom > soft-core processor with the aim of providing it to customers (presumably at > a price) requiring a processor in very small FPGA's. He has a table-driven > assembler written by a friend that he is using to develop/test the core, and > is currently implementing interrupts. He has asked me (yesterday) if I'd be > interested in developing the C compiler/toolchain for it. Details atm are > scant but I've started researching as far as possible and thus far SDCC is > looking like an ideal candidate. > >> Of course you also need an assembler and linker, but you would with any >> compiler. > > On that note; I'm assuming that I could write a GAS-compliant assembler for > SDCC - yes? AFAIK sdcc doesn't really care that much about the assembler. Most ports use our own variant of awsxxx (see sdas in the sdcc source), but e.g. the pic ports use an external assembler. > >> Also, this is isn't just a matter of putting so-and-so much time into a >> port and then it is there. Sure there is a point at which most of the >> regression tests pass, and the port can be merged into trunk. But there >> are always bugy to fix, and there is potential for optimization. I >> consider the stm8 port an ongoing effort (as any other port). > > Noted, and well understood. I'm currently writing a 6309 core in VHDL > myself... > >> I started working on it at the beginning of this year. No one really >> worked on the port full-time. Valentin mostly worked on the assembler and >> linker on weekends. You might want to have a look at the number of lines >> in src/stm8/gen.c and estimate the effort from there (the other big files >> in src/stm8 are mostly just copied from other ports with a few small >> modifications). Philipp > > Have subsequently done so, and many thanks for the advice! I'm starting to > get a feel for what's required now. I'm particularly intimate with the Z80 > as well, so that might be a good reference for me as well as the STM8, which > looks decidedly simpler than the Z80 looking at the STM8 CPU Programming > Manual! ;) > The stm8 port is a clean port done from scratch this year. The z80 port is something that has evolved over many years, and carries some legacy baggage. This makes the stm8 port a better example to look at for a new port. Philipp ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user