Hi chulsung and all :)
Humm, from your last message I have some questions to have global view =
On Keil (or other compiler and linker software) there is certainly a =
Makefile (eg makefile.mak under Tasking chain)
Could you send your Makefile under Keil and under SDCC (I recently =
migrate a project from Tasking to SDCC and the Makefiles comparison is a =
good work for looking all compiler and linker options ...)
About an another mail from this ML : I'm interresting how do you compare =
your size code too ! (size of the .hex file (not the good method) or =
map-memory after linking (good method to view the whole code space)
If your code space passed from 10KB to 3KB with SDCC (and stay at 5KB =
with Keil) what is your problem today ?
Personally my compil options are the follows :=20
# SDCCCFLAGS : (CFLAGS)
# -Wa : Warning All
# -c : compil only (last option)
# -mmcs51 : cible type x51 << I work under x51 heart microprocessor
# $(MODEL_PROJECT) --model-large : model large << my model
# -I$(INCLUDE_DIR) : directory headers ...
CFLAGS =3D -Wa -mmcs51 $(MODEL_PROJECT) -I$(INCLUDE_DIR) -c
And my linker options are :
# Code Addr and size
CODE_ADDR =3D --code-loc 0x0000
CODE_SIZE =3D --code-size 0x7FFC
LINK_CODE_OPT =3D $(CODE_ADDR) $(CODE_SIZE)
# RAM Addr and size=20
DIRECT_RAM_ADDR =3D --data-loc 0x00
INDIRECT_RAM_ADR =3D --idata-loc 0x80
RAM_SIZE =3D --iram-size 0xFF
LINK_RAM_OPT =3D $(DIRECT_RAM_ADDR) $(INDIRECT_RAM_ADR) $(RAM_SIZE)
# External RAM Addr and size (on chip with EXTRAM =3D 0) (start at =
0x0001 to avoid NULL pointer tests on libs)
XRAM_ADDR =3D --xram-loc 0x0001
XRAM_SIZE =3D --xram-size 0x7FF
LINK_XRAM_OPT =3D $(XRAM_ADDR) $(XRAM_SIZE)
# Stack Addr and size
#STACK_ADDR=3D // Not specified
STACK_SIZE =3D --stack-size 80
STACK_OPT =3D $(STACK_ADDR) $(STACK_SIZE)
# ouput format =3D> Intel HEX
OUTPUT_FORMAT =3D --out-fmt-ihx
LDFLAGS =3D $(MODEL_PROJECT) $(OUTPUT_FORMAT) $(DEBUG_OPT) =
$(LINK_CODE_OPT) $(LINK_RAM_OPT) $(LINK_XRAM_OPT) $(STACK_OPT) =
I thinks It's a generaly Makefile's options template (options can be =
change for adapting to target user)
I hope my message will give you some information...
> Hi Folks,
> I feel obliged to report something to appreciate your help and answer
> Vincent's questions.
> 1. What I am doing...
> I am using a nRF24E1 (from http://www.nvlsi.com) microcontroller + 2.4GHz =
> We developed very tiny wireless sensor node using this chip.
> For more details about our hardware, please refer to my homepage
> I used the Keil compiler but I wanted to make use of SDCC for this =
> 2. Keil compiler.
> the code size of the hex file was 5KB. For compiler and linker =
> at first I used "Default". I made a change to (smallest code size) and
> the code size wasn't really changed.=20
> 3. SDCC=20
> without the compile option (--model-small --opt-code-size), the code =
> was larger
> than 10KB. But with these option it reduced to 3KB, which is smaller =
> what i get
> from Keil. One thing is that once I used above compiler options, even =
> I don't
> type the options again, SDCC still generate the hex code, which size =
> Do you guys think I made some mistakes? To see what happened, I will
> uninstall SDCC
> and reinstall it. Any ideas about my observation?
> That's all. Thank you again for your help.
> -----Original Message-----
> From: sdcc-user-admin@...
> [mailto:sdcc-user-admin@...] On Behalf Of BRACH =
> Sent: Friday, October 07, 2005 12:33 AM
> To: sdcc-user@...
> Subject: Re: [Sdcc-user] Code Size
> Hello all,
> chulsung, what's your compiler and linker options ? (for Keil and SDCC =
> Did you use some optimisations options ?
> > Hello,
> > I compiled the same source code using both SDCC and Keil.
> > But the code size (hex file) of SDCC is twice or three times bigger=20
> > than that of Keil.
> > Does anybody have a idea about how to reduce the code size?
> > Thank you in advance.
> > chulsung