First version that compiles with new file layout.

Had to make many changes to get it to compile across many files,
including removing the LOCAL specifier from almost all functions.
Edited the Makefile to compile all three files and link them.
Haven't tested on hardware yet, that's the next step.

Lots of small changes to avoid warnings, now that I have turned
-Wall on. This makes the code a bit "better".

Signed-off-by: A.M. Rowsell <amrowsell@frozenelectronics.ca>
This commit is contained in:
A.M. Rowsell 2019-01-20 21:13:04 -05:00
commit 48702bf328
Signed by untrusted user who does not match committer: amr
GPG key ID: 0B6E2D8375CF79A9
7 changed files with 124 additions and 72 deletions

View file

@ -2,14 +2,14 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
P=mqtt
P=main
CC=xtensa-lx106-elf-gcc
AR=xtensa-lx106-elf-ar
LDLIBS=-nostdlib -ggdb -Wl,-Map=output.map -Wl,--start-group -lm -lc -lhal -lpp -llwip -lphy -lnet80211 -lwpa -lat -lwpa2 -lmain -Wl,--end-group -lgcc
CFLAGS= -I. -mlongcalls -std=gnu11
CFLAGS= -I. -mlongcalls -std=gnu11 -Wall
LDFLAGS=-Teagle.app.v6.ld
OBJ=mqtt.o
DEPS=mqtt.h
OBJ=main.o mqtt.o onewire.o
DEPS=main.h mqtt.h onewire.h
$(P)-0x00000.bin: $(P)
esptool.py elf2image $^
@ -22,7 +22,7 @@ flash: $(P)-0x00000.bin
esptool.py --port /dev/feather1 write_flash 0 $(P)-0x00000.bin 0x10000 $(P)-0x10000.bin
clean:
rm -f $(P) $(P).o $(P)-0x00000.bin $(P)-0x10000.bin
rm -f $(P) $(OBJ) $(P)-0x00000.bin $(P)-0x10000.bin
library:
$(CC) -c -fPIC $(CFLAGS) $(P).c -o $(P).o