This repository has been archived on 2026-08-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ciciec2026/sdk/software/examples/asm/Makefile
FallenSigh 52e85aa6fb perf: drop stdint.h + picolibc — zero libc dependency
dma.h: typedef u32 instead of uint32_t, no stdint.h include
dma.c: use u32 instead of uint32_t
user-sample.c: unsigned char/int instead of uint8_t/uint32_t

Makefile: filter-out -lc -lm -lg -lsemihost from LDFLAGS
  → picolibc .data section (2.1KB, 532 words) eliminated
  → startup data-copy loop: ~30000 → ~200 cycles
  → total start.S latency: ~44000 → ~14000 cycles (~0.42ms at 33MHz)
2026-06-26 22:34:26 +08:00

16 lines
453 B
Makefile

TARGET = user-sample
MATMUL_GROUP_NUM ?= 5000
CFLAGS += -O3 -g -DMATMUL_GROUP_NUM=$(MATMUL_GROUP_NUM)
C_SRCS := $(wildcard ./*.c )
OBJDIR = obj
COMMON_DIR = ../../bsp
GCC_DIR=../../../toolchains/loongson-gnu-toolchain-8.3-x86_64-loongarch32r-linux-gnusf-v2.0
PICOLIBC_DIR=../../../toolchains/picolibc
include ../../bsp/common.mk
# Strip picolibc: no -lc -lm -lg -lsemihost, keep -lgcc only
LDFLAGS := $(filter-out -lc -lm -lg -lsemihost,$(LDFLAGS))