Category:SDCC

From ElectroDragon Wiki
(Redirected from SDCC)

Install

Example for SDCC

Compile

compile for 8051

  • sdcc -mmcs51 serialtest.c -o serialtest.ihx

compile for stm8

  • sdcc -mstm8 --std-c99 led.c

C

  • sdcc -c common.c -D FOSC_160000

link

  • sdcc main.c common.rel delay.rel

Logs

main.c:155: error 20: Undefined identifier 'FREQ_SYS'

  • sdcc -c main.c -D FREQ_SYS = 16000000

Makefile

CFLAGS := -V -mmcs51 --model-small \

--xram-size $(XRAM_SIZE) --xram-loc $(XRAM_LOC) \ --code-size $(CODE_SIZE) \ -I$(ROOT_DIR)include -DFREQ_SYS=$(FREQ_SYS) \ $(EXTRA_FLAGS)

Documents

Pages in category "SDCC"

This category contains only the following page.