3 ms·
I'm surprised that the author equated embedded programming with IDEs! In my experience that's where the IDE programming fares poorly because every environment i
by simias 6y ago
I'm surprised that the author equated embedded programming with IDEs! In my experience that's where the IDE programming fares poorly because every environment is different (so everybody has their "official" IDE that you need to relearn) whereas the low level tools tend to be fairly standard (you usually have a vendor-provided GCC toolchain and a few command line tools for generating images and flashing).
I know that IDEs are incredibly popular nowadays, but I do 100% of my development in Vim without any issues. It does require proficiency with the command line, Makefile and shell scripting though.
For instance the Makefile shown in TFA is not great, in particular because it doesn't track changes on header files. My personal template looks like:
NAME = my_prog
CFLAGS = -Wall -O2 -MMD -MP
SRC = main.c foo.c bar.c
OBJ = $(SRC:%.c=%.o)
DEP = $(SRC:%.c=%.d)
$(NAME) : $(OBJ)
$(info LD $@)
$(CC) $(LDFLAGS) -o $@ $^
-include $(DEP)
%.o: %.c
$(info CC $@)
$(CC) -c $(CFLAGS) -o $@ $<
.PHONY : clean
clean:
$(info CLEAN $(NAME))
rm -f $(OBJ) $(DEP)
# Be verbose if V is set
$V.SILENT:
Note that it hides the actual commands being executed unless you set "V" on the command line, which I know some people actively dislike.
The "magic" here is the "-MMD -MP" flags to gcc to generate header dependencies and the "-include $(DEP)" to integrate them in the Makefile.
- danellis 6y ago> I'm surprised that the author equated embedded programming with IDEs! I think it depends how you get into it. I came to it from a hobbyist background, so using gcc and Makefiles was natural. But people coming from a commercial background will have had a variety of terrible IDEs inflicted upon them.