From 04aa49e13bdeb31654969c569371d26fe6b4c22f Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 23 Feb 2025 12:02:59 +0100 Subject: [PATCH] =?UTF-8?q?chore=20=F0=9F=93=A6:=20Improve=20build=20proce?= =?UTF-8?q?ss=20for=20Sdcc=20compiler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Improved build process for Sdcc compiler. - This commit changes the compiler flags in the Makefile to correctly specify the microcontroller family for the SDCC compiler. --- .gitea/workflows/sdcc.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/sdcc.yml b/.gitea/workflows/sdcc.yml index b093e2b..6af4877 100644 --- a/.gitea/workflows/sdcc.yml +++ b/.gitea/workflows/sdcc.yml @@ -56,7 +56,7 @@ jobs: # Set CFLAGS to disable treating warnings as errors export CFLAGS="$CFLAGS -Wno-error" # ./configure --target=8051 --with-arch=8051 --prefix=/usr/local - ./configure --disable-gbz80-port --disable-z80-port --disable-ds390-port --disable-ds400-port --disable-pic14-port --disable-pic16-port --disable-hc08-port --disable-r2k-port --disable-z180-port --disable-sdcdb --disable-ucsim --prefix=/usr/local + ./configure --disable-gbz80-port --disable-z80-port --disable-ds390-port --disable-ds400-port --disable-pic14-port --disable-pic16-port --disable-hc08-port --disable-r2k-port --disable-z180-port --disable-sdcdb --disable-ucsim --target=8051 --with-arch=8051 --prefix=/usr/local make sudo make install diff --git a/Makefile b/Makefile index fc251e7..296e371 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ INCLUDE_DIRS = -I$(ZSTACK_DIR) # Compiler settings CC = sdcc # sdcc compiler -CFLAGS = -mmc51 $(INCLUDE_DIRS) # add include paths to compiler flags +CFLAGS = -mcs51 $(INCLUDE_DIRS) # add include paths to compiler flags SRC=$(wildcard *.c) HEADERS = main.h zigbee_comm.h sensors/bme280.h sensors/wind_vane.h sensors/rain_gauge.h sensors/anemometer.h config.h include/hal_types.h include/hal_defs.h include/hal_timer.h include/ZComDef.h include/OSAL.h include/i2c.h