how to list used libraries of a firmware build

Posted on
  • is there a way to list USE_ defines set in .py file ?

    eg PICO_R1_3.py

    ....
     'build' : {
       'defines' : [
         'USE_USB_HID',
         'USE_NET',
         'USE_GRAPHICS',
         'USE_TV',
         'USE_HASHLIB',
         'USE_FILESYSTEM',
         'USE_CRYPTO',
         'USE_TLS'
       ]
    ....
    
  • Do you mean, to list it from within Espruino itself?

  • yes, may be as part of process.env()

  • At the moment, no, there isn't anything. What are you trying to find out though?

    With the exception of modules, you can usually see if something exists just by using "undefined"!==typeof FunctionThatShouldExist

  • I saw the entries in the .py files and start asking me, if there is a way to get this information in Espruino, thats all.

  • Ahh - so at the moment, no - it's not available. However the Web IDE knows because it is built into the JSON files that it has for each board (like this one)

    Potentially that information could be reported back, but it's all extra memory used for something that may actually not be useful to that many people.

    Probably the most useful info would be a list of the available modules usable by require though.

  • yes this JSON contains a lot of information, very helpful.

    List of modules in WebIDE - yes.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

how to list used libraries of a firmware build

Posted by Avatar for MaBe @MaBe

Actions