Page 1 of 1

asm keyword

Posted: Thu Feb 14, 2019 2:56 pm
by fbez753
Hello everybody!

I'm starting with the mqtt library with ssl support (https://github.com/espressif/esp-mqtt/t ... s/mqtt_ssl).
On the example file app_main.c, there are these two lines:

extern const uint8_t iot_eclipse_org_pem_start[] asm("_binary_iot_eclipse_org_pem_start");
extern const uint8_t iot_eclipse_org_pem_end[] asm("_binary_iot_eclipse_org_pem_end");

I search for the asm keyword and it should be used to execute an ULP asm routine (?). The first element (iot_eclipse_org_pem_start) is then used as the pointer .cert_pem in the struct esp_mqtt_client_config_t.

I'm a bit confused, can you explain me how this works and how to change the code, in order to use another certification file (besides iot-eclipse-org.pem)?

Re: asm keyword

Posted: Fri Feb 15, 2019 2:05 am
by ESP_Sprite
It's part of a method to embed binary data in the resulting firmware: see the relevant parts of the ESP-IDF documentation for more info.

Re: asm keyword

Posted: Thu Mar 07, 2019 9:21 am
by fbez753
Thank you! :)