Does anyone know how to generate compile_commands.json when compiling with Butterfli?

I haven’t used Sizhe’s development board before. At my company, the Sizhe project directly uses Butterfli for compilation. After reading an expert’s guide, I added some commands to the SConstruct file under the HCPU directory. However, after compilation, this file gets refreshed and my added content disappears.

Need to modify the SConstruct file under the corresponding project below the template.

Got it. I previously made changes under our project, but now there’s an issue with the generated compile_commands.json. I’ve tried using AI but couldn’t figure it out. I’m not sure why my project requires Python 2.7, which prevents me from following others’ guides. Relying solely on AI only gets me as far as generating the assets (image resources) before compiling hcpu.
I only modified the section shown below:

SConstruct (4.9 KB)

compile_commands.json (1.7 MB)

image

The current solution uses Python 2 and will subsequently be updated by default to support Python 3. However, the underlying logic should remain the same, with only some syntax potentially needing to be modified for Python 2.