Boss lady
Boss lady
DIIDevHeads IoT Integration Server
Created by Enthernet Code on 6/7/2024 in #middleware-and-os
When compiling my FreeRTOS, my functions in string.c conflict with the built-in function 'tolower'
Yes you can use CFLAGS, it should look like this 👇
CFLAGS += -Dmy_tolower=custom_tolower

all: my_rtos

my_rtos: main.o string.o
gcc $(CFLAGS) -o my_rtos main.o string.o

main.o: main.c
gcc $(CFLAGS) -c main.c

string.o: string.c
gcc $(CFLAGS) -c string.c
CFLAGS += -Dmy_tolower=custom_tolower

all: my_rtos

my_rtos: main.o string.o
gcc $(CFLAGS) -o my_rtos main.o string.o

main.o: main.c
gcc $(CFLAGS) -c main.c

string.o: string.c
gcc $(CFLAGS) -c string.c
3 replies