From 4b2da2d16f2812d94506dd224d04c49a65957237 Mon Sep 17 00:00:00 2001 From: "jazz (gitea)" Date: Sat, 29 Nov 2025 14:34:13 -0600 Subject: [PATCH] init --- README.md | 16 ++++++++++++++++ fixbear.sh | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 README.md create mode 100644 fixbear.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..3bd34d4 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# fixbear.sh + +Run this after running `bear -- make` in your STM project repository. + +Or run it manually: + +```sh +sed -i '/-ICore/i \ \ \ \ \ \ "-I/usr/include",' compile_commands.json +``` + +This adds `-I/usr/include` to compiler arguments for your IDE's linter. +You don't need this unless you're using stuff like `printf()` in your code. + +Adding `/usr/include` to the include path in `Makefile` breaks the actual +project. This change to `compile_commands.json` is just so your editor +doesn't feak out. diff --git a/fixbear.sh b/fixbear.sh new file mode 100644 index 0000000..fc5bbdd --- /dev/null +++ b/fixbear.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +sed -i '/-ICore/i \ \ \ \ \ \ "-I/usr/include",' compile_commands.json