Page 1 of 1

Own API as binary flashed library

Posted: Mon Apr 24, 2023 3:42 pm
by Ildar Belkin
Hello.
What I want:
1. Create my devboard with ESP32 and modems (via UART and I2C) (I was done).
2. Create my C library with functions to abstract communicate with modems.
3. Compile the library as binary and flash it to ESP32 on my devboards.
4. Write SDK (on C) with API description of using library's functions and distribute it and devboards to my developers. I want to give them simple abstract level to communicate with modems.
5. My developers create his own products using SDK and my boards accessing to modems via API of flashed library.
6. Developers are denied to dowload my library from ESP32.
7. I need to update firmware periodicaly by send new version of firmware to developers.

I'm looking how to do all above. Static libraries/ binary components? How?
If you know how to do some task, please, repost me about it.
Any ideas or links, thank you!

Re: Own API as binary flashed library

Posted: Tue Apr 25, 2023 3:21 am
by ESP_Sprite
That is not something we support, and especially 6 is pretty hard without compromising on lots of other things. Best you can do while still allowing your users to use ESP-IDF is to distribute a static library. The best option I can imagine that ticks all your boxes is to integrate an interpreter for some language into your firmware (python, lua, webassembly, ...) that is not capable of reading out the memory outside the VM, and have your users develop their application in that.

Re: Own API as binary flashed library

Posted: Tue Apr 25, 2023 11:36 am
by Ildar Belkin
Thank you for answer. I think about including an microPython interpreter to my boxes but I don't understand how can developers get access to my library's function.

Have you any example or link how to do it?
Could you post me some keywords to search?

Re: Own API as binary flashed library

Posted: Wed Apr 26, 2023 1:00 am
by ESP_Sprite
You probably want this.