by adding a library dependency to the the current configuration (note that the library is slightly different, but it does not matter as the linker cannot find anything!)
by copying just the source code for the required functions arm_mean_q15 to a folder under /lib, but the compiler does not even compile these files! However, when navigating through the code the defined functions are shown in the editor. So the system must know these dependencies!
by copying the appropriate libsamâŚa library to the /lib folder.
Please help!!
This should be really straight forward, and I followed all instructions but I just cannot understand how pio âthinksâ, and where and how it looks for header files. Do packages have a priority or libraries? Does the library has to be explicitely specified in the build flags?
Note that I have also specified the build_flags = -D ARM_MATH_CM3 to specify the M3 architecture, so at least that aspect should be sorted.
Thank you, but unfortunately it still does not work. I seem to have a problem with the Import(âenvâ) command, which is underlined (see screenshot). It seems that the âenvâ variable is not known to the system. Is it an accident that 'Import(âenvâ) â is in capital letters, import os is in small letters?
The squiggly yellow lines have not disturbed me that far, maybe the extra script that I have now ammended was not necessary after all, but if the env variable isnât known, how should the .Append command work? I coudl use your second suggestion and link the library directly, but it would be nice to have an alternative to work with.
Many thanks
Completely irrelevant. VSCode Python intellisense doesnât work in SCons exta_scripts files because it does not know about the dynamic functions injected into the SCons script at runtime. The script will work normally.
You also have to be carefull that, if you just copy paste my script contents into your script, that the entire script is executed as pre:.
In your script, you also neglect to actually add the
env.Append(
LIBS=["arm_cortexM3l_math"]
)
part.
Try following the example above exactly. It works.
You can also reference multiple scripts, so you can leave your script alone.
Thank you, both methods work now! I have mainainted the original script, it makes sense to make it modular. I really have to stop ignoring Python, as I am struggeling with the syntax, although a lot of it seems custom defined. I guess that the pre:xxxx.py is something that is defined by PlatformIO and not Python, and the same is true for env?