Initial commit: OTA chunk transfer protocol implementation

- Protocol definition with 6-byte header (chunk_idx: 2B, payload: N B, crc32: 4B)
- Node.js server with chunk-based HTTP delivery
- C client library with resumable download support
- CRC32 implementation (IEEE 802.3)
- Test suites for both server and CRC32
- 1024B default chunk size (0.59% overhead)
This commit is contained in:
km
2026-03-30 06:35:25 +09:00
commit b1c3ec3af4
10 changed files with 1522 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# OTA Chunk Transfer Makefile
CC = gcc
CFLAGS = -Wall -Wextra -std=c11 -I protocol
LDFLAGS =
SRCS = protocol/crc32.c protocol/chunk_client.c
OBJS = $(SRCS:.c=.o)
.PHONY: all clean test
all: $(OBJS)
# CRC32 test
test_crc32: tests/test_crc32.c protocol/crc32.c
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
test: test_crc32
./test_crc32
clean:
rm -f *.o protocol/*.o tests/*.o test_crc32