I've a problem with compilation of .c file for ESP32-S2 for ULP-RISC-V. I suppose build system doesn't treat .c file as expected. Here's excerpt from the log:
Code: Select all
>idf.py build
...
[4/385] Performing build step for 'ulp_main'
FAILED: esp-idf/main/ulp_main-prefix/src/ulp_main-stamp/ulp_main-build ... riscv-single/build/esp-idf/main/ulp_main --target build"
[1/6] Generating x_inc.ulp.S
[2/6] Building ASM object CMakeFiles/ulp_main.dir/x_inc.ulp.S.obj
FAILED: CMakeFiles/ulp_main.dir/x_inc.ulp.S.obj
esp32s2ulp-elf-as ... -o CMakeFiles/ulp_main.dir/x_inc.ulp.S.obj -c x_inc.ulp.S
x_inc.ulp.S: Assembler messages:
x_inc.ulp.S:1: Error: syntax error. Input text was typedef.
x_inc.ulp.S:1: Error:
x_inc.ulp.S:2: Error: syntax error. Input text was typedef.
x_inc.ulp.S:2: Error:
...
x_inc.ulp.S:67: Error:
x_inc.ulp.S:68: Error: syntax error. Input text was }.
x_inc.ulp.S:68: Error:
ninja: build stopped: subcommand failed.
[6/385] Building C object esp-idf/app_update/CMakeFiles/__idf_app_update.dir/esp_app_desc.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Code: Select all
#include <stdint.h>
volatile unsigned int edge_count;
int main (void)
{
edge_count += 33;
return 0;
}
Code: Select all
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
...
typedef __int8_t int8_t ;
typedef __uint8_t uint8_t ;
...
typedef long long unsigned int uint_fast64_t;
volatile unsigned int edge_count;
int main (void)
{
edge_count += 33;
return 0;
}
Code: Select all
>idf_tools.py list
* xtensa-esp32-elf: Toolchain for Xtensa (ESP32) based on GCC
- esp-2020r3-8.4.0 (recommended, installed)
* xtensa-esp32s2-elf: Toolchain for Xtensa (ESP32-S2) based on GCC
- esp-2020r3-8.4.0 (recommended, installed)
* esp32ulp-elf: Toolchain for ESP32 ULP coprocessor
- 2.28.51-esp-20191205 (recommended, installed)
* esp32s2ulp-elf: Toolchain for ESP32-S2 ULP coprocessor
- 2.28.51-esp-20191205 (recommended, installed)
* cmake: CMake build system
- 3.16.4 (recommended, installed)
* openocd-esp32: OpenOCD for ESP32
- v0.10.0-esp32-20200709 (recommended, installed)
* ninja: Ninja build system
- 1.10.0 (recommended, installed)
* idf-exe: IDF wrapper tool for Windows
- 1.0.1 (recommended, installed)
* ccache: Ccache (compiler cache)
- 3.7 (recommended, installed)
* dfu-util: dfu-util (Device Firmware Upgrade Utilities)
- 0.9 (recommended, installed)
The main question is: Is RISC-V supported in version 4.2 or after?
Does it require extra installation efforts beyond default setup?
Does it needs another commands to build?
Please help. Any idea matters.
Thank you