asm keyword

fbez753
Posts: 2
Joined: Thu Feb 14, 2019 2:42 pm

asm keyword

Postby fbez753 » Thu Feb 14, 2019 2:56 pm

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)?

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: asm keyword

Postby ESP_Sprite » Fri Feb 15, 2019 2:05 am

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.

fbez753
Posts: 2
Joined: Thu Feb 14, 2019 2:42 pm

Re: asm keyword

Postby fbez753 » Thu Mar 07, 2019 9:21 am

Thank you! :)

Who is online

Users browsing this forum: No registered users and 125 guests