Skip to content
Snippets Groups Projects
Select Git revision
  • 94e75e0c06c4d683b33a03aee17b80c8a59bbd47
  • max32xxx default protected
  • dw-cmsisdap-path
3 results

log.c

Blame
  • Makefile 5.12 KiB
    include ../py/mkenv.mk
    
    # qstr definitions (must come before including py.mk)
    QSTR_DEFS = qstrdefsport.h #$(BUILD)/pins_qstr.h
    
    # include py core make definitions
    include ../py/py.mk
    
    MAKE_FROZEN = ../tools/make-frozen.py
    
    SCRIPTDIR = scripts
    PORT ?= /dev/ttyACM0
    BAUD ?= 115200
    CROSS_COMPILE = xtensa-lx106-elf-
    ESP_SDK = $(shell $(CC) -print-sysroot)/usr
    
    INC += -I.
    INC += -I..
    INC += -I../stmhal
    INC += -I../lib/mp-readline
    INC += -I../lib/netutils
    INC += -I../lib/timeutils
    INC += -I$(BUILD)
    INC += -I$(ESP_SDK)/include
    
    # UART for "os" messages. 0 is normal UART as used by MicroPython REPL,
    # 1 is debug UART (tx only).
    UART_OS = 0
    
    CFLAGS_XTENSA = -fsingle-precision-constant -Wdouble-promotion \
    	-D__ets__ -DICACHE_FLASH \
    	-fno-inline-functions \
    	-Wl,-EL -mlongcalls -mtext-section-literals \
    	-DLWIP_OPEN_SRC
    
    CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib -DUART_OS=$(UART_OS) \
    	$(CFLAGS_XTENSA) $(COPT) $(CFLAGS_EXTRA)
    
    LDFLAGS = -nostdlib -T esp8266.ld -Map=$(@:.elf=.map) --cref
    LIBS = -L$(ESP_SDK)/lib -lmain -ljson -lssl -llwip_open -lpp -lnet80211 -lwpa -lphy -lnet80211
    
    LIBGCC_FILE_NAME = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
    LIBS += -L$(dir $(LIBGCC_FILE_NAME)) -lgcc
    
    # Debugging/Optimization
    ifeq ($(DEBUG), 1)
    CFLAGS += -g
    COPT = -O0
    else
    CFLAGS += -fdata-sections -ffunction-sections
    COPT += -Os -mforce-l32 -DNDEBUG
    LDFLAGS += --gc-sections
    endif
    
    SRC_C = \
    	strtoll.c \
    	main.c \
    	esp_mphal.c \
    	gccollect.c \
    	lexerstr32.c \
    	uart.c \
    	esppwm.c \
    	espneopixel.c \
    	modpyb.c \
    	modpybpin.c \
    	modpybpwm.c \
    	modpybrtc.c \
    	modpybadc.c \
    	modpybi2c.c \
    	modpybspi.c \