7 years, 7 months ago.

Can not view mbed source

When I click on a definition, I am greeted with a message that says "Error In Documentation Path". How do I view the source for an mbed provided function. For example in the simple blinky example, DigitalOut?

1 Answer

7 years, 7 months ago.

The documentation system (when it's working) only gives you a description of the functions not the source code for them. The View source link doesn't work for the compiled library.

Import the mbed-dev library, that is the full source. If the documentation link doesn't work you can still browse the code and find the source for the functions.

Accepted Answer

Thanks. Does this give me the code for my target hardware too? If not, what is the "search criteria" I would use in the search box to find it? I am finding this interface very cryptic. I would think it would be quite easy to show the libraries used in a given project without forcing the developer to guess at what they may be, construct the correct search terms and then download them.

posted by Keith Folske 27 Sep 2016

That gives you everything. The startup code, the library functions and the hardware abstraction layer for every supported platform. It does take a while to learn your way around it but it is all fairly logical.

All projects list their dependencies unless the author set them up incorrectly.

posted by Andy A 27 Sep 2016

Hmm. I definitely don't see the startup code. I also can't download the source locally to use an IDE that implements tags/ctags for walking through the code. The online IDE doesn't seem to provide this feature.

I attempted to Export the program and selected All Files, but nothing happens. It doesn't download.

posted by Keith Folske 27 Sep 2016

The startup code is assembly for some platforms. E.g. for the nxp lcp1768 it's https://developer.mbed.org/users/mbed_official/code/mbed-dev/file/30b64687e01f/targets/cmsis/TARGET_NXP/TARGET_LPC176X and then some tool chain specific things in the subdirectories off there.

posted by Andy A 27 Sep 2016

Thanks Andy. That helps tremendously.

posted by Keith Folske 27 Sep 2016