ESP32 ulp - can mos compile .S assembler files?

#1

I am trying to make use of the ultra low power (ulp) feature on the ESP32. I am getting unresolved externals (for example “_binary_ulp_main_bin_start”) which are defined in a .S assembler file.

Is it possible for the mos tool to build assembler (.S) files?

#2

Please try to build the .S file into the library, and link it as a library rather than a source file.

#3

just to follow up with this: I have built a library (.a) using both the ESP IDF and with the Arduino ULP port but both are unable to find the ulp_entry variable:
(.literal._Z17start_ulp_programv+0x0): undefined reference to ‘ulp_entry’.

So other ulp_ variables are being recognized just not that one variable- the entry point into the assembler code.

I see ulp_entry (and ulp_exit) in the .ld file:
PROVIDE (ulp_entry = 0x50000190 );

so I think it is linked into the object file and in the .a library.

I added the library to my mos.yml using:
binary_libs:

  • lib/libulp_custom.a

both local and remote build have the same error.