Hi all, I’ve set up VS Code and can successfully modify and load patches to the Daisy. However, VS Code reports it is unable to open stdint.h and math.h and that I should update my includePath file (see messages pasted below).
The patches run ok on the Pod but I’d like to fix these errors unless advised otherwise.
I have two problems:
I don’t know were to locate stdint.h or math.h. I’ve searched and found several different stdint.h files, some relate to the ARM install I think, but they have different contents. Can someone provide a copy of the correct files?
Once I have the files I need to save them somewhere and update the includePaths file.
What I need:
a) a copy of stdint.h and math.h
b) advice on where to store them. Do I need just one copy or a copy for each patch? (edit: fixed typo for clarity)
c) help updating the includePaths file (copied below the errors).
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (D:\OneDrive\GitHub\DaisyExamples\pod\MusicBox\MusicBox.cpp).
cannot open source file “stdint.h” (dependency of “daisy_pod.h”)
cannot open source file “stdint.h” (dependency of “daisysp.h”)
cannot open source file “math.h”
includePath file for MusicBox patch
Thanks and sorry for the long post.
You should not need any of those files to be stored local to the project. The standard library files are included with the compiler (arm-none-eabi-*).
It sounds like one of the following things are happening:
- You’re attempting to build without a tasks.json or there is another extension trying to build with something other than the Makefile.
- The toolchain was not installed properly (unlikely).
- The shell being used could be incompatible with the toolchain or Make (I use/test everything using the MINGW64-based git-bash, that can be installed via git for windows
- Once installed, you can select “bash” in vs code as your default terminal.
If this in your
"command": "make clean; make",
Then you should be able to build in any of the following three ways:
ctrl+shift+b and then
enter (shortcut for running a task name ‘build’)
ctrl+p and then type
task build and hit
enter (standard way of running tasks)
- use the built-in terminal and run:
make (platform-inspecific command line build)
Also, this should give a different error, but the paths to libdaisy/ and DaisySP in your
c_cpp_properties.json have three
. characters instead of two. (i.e.
.../.../libdaisy instead of
Hope that helps! Let me know how it goes
Thanks for your help. I got Bash working from VS Code and was able to Make and upload a patch successfully!
That’s strange re the .json file. In the edit window when I type two dots without markdown formatting it renders as three dots.
Ie this is two dots with formatting:
vs two dots without formatting: …
Nice! Glad you were able to get it sorted!
Oh, you’re right, it looks like the
.. does auto-complete to a single … ellipsis character (probably part of the inline markdown that the forum is using.
In the future, I’d recommend enclosing any text from a file (especially code) into the ‘preformatted text’ box. It avoids issues like that and helps make it easier to read/verify.