From: Mark Swayne <mark.swayne@ch...> - 2005-05-05 18:07:12
I am working on a rather large project on the 8051 and it looks like I
may run into space problems. I am using an 8051 variant that supports
paged code and XRAM (the SiLabs 8051F125).
We don't really want to be forced to buy an expensive, closed compiler
and then face porting our code. So, I'd like to get an idea how much
effort would be involved in getting SDCC to handle code paging.
I can imagine a couple of approaches to handling code paging:
1. Modify the compiler to generate appropriate code.
2. Modify the compiler by adding configurable hooks to support generic
paging. Write modules for the F12X that work with these hooks.
3. Split my program into page sized chunks, and compile as separate
units. Write a routine to handle subroutine calls between these chunks
and store it in the page 0 (which is always accessible).
4. Port code to Tasking or Keil C.
XRAM paging is less of an issue, so I haven't given it as much
consideration. However, the 1,2, and 4 seem like possible approaches.
I'd like to get an idea of how difficult the various approaches I
outlined above are. Also, where should I start looking if I need to
start hacking SDCC code?
As to my skill level: I'm not much of an assembly programmer--I can do
it, but slowly and I don't know the common idioms that are used by
experienced programmers, but my C skills are solid, but not supreme. I
took the usual computer science courses in school, but that was a long
time ago, and I haven't really thought about compilers and compiler
design since then.
Does anyone have any advice to offer?
Get latest updates about Open Source Projects, Conferences and News.