Search found 7 matches

by frank_he
Tue May 12, 2020 8:45 am
Forum: ESP-IDF 中文讨论版
Topic: 编译错误提示undefined reference to app_main
Replies: 2
Views: 8184

编译错误提示undefined reference to app_main

开始准备将已有项目porting到esp32,采用v4.0 的esp-idf。 但是在编译的时候遇到以下问题

build/esp32/libesp32.a(cpu_start.o): in function `main_task':
/home/fhe/esp/esp-idf/components/esp32/cpu_start.c:556: undefined reference to `app_main'

程序结构如下
esp_idf (文件夹 esp32 sdk)
main.c
Makefile
在console下直接运行make出现上述错误

Makefile内容如下 ...
by frank_he
Tue Apr 28, 2020 10:00 am
Forum: General Discussion
Topic: Write register not take effect [IDFGH-3226]
Replies: 0
Views: 2292

Write register not take effect [IDFGH-3226]

HI,
I tried to set spi clk configuration by writing the SPI_CLOCK_REG. and then i tried to read it out. and i found it's still a default value of reset. The code is like bellow. Does i missed somewhere before access spi registers?

WRITE_PERI_REG(SPI_CLOCK_REG(SPI_NUM_HSPI),
((0x7 & SPI_CLKDIV ...
by frank_he
Sun Apr 26, 2020 6:33 am
Forum: General Discussion
Topic: No clk output for HSPI
Replies: 0
Views: 2680

No clk output for HSPI

Hi,
i'm trying to use the HSPI to communication with my slave spi device, GPIO12~15 is used for the HSPI interafce. But i can't capture any clk output with logic analyzer. Can anybody have a look at this.
lgw_spi_open() // this is for HSPI init
{
gpio_pad_select_gpio(CS_PIN);
gpio_set ...
by frank_he
Thu Apr 23, 2020 12:47 pm
Forum: General Discussion
Topic: How to enable the SPI master function with low layer hal?
Replies: 0
Views: 2800

How to enable the SPI master function with low layer hal?

Hi,
i'm triying to use to enable the spi master function on esp32. with Pins (GPIO12~15 and a reset pin of GPIO4).
this is the spi init fucntion,
nt lgw_spi_open (void** spi_target_ptr) {
gpio_set_direction(CS_PIN, GPIO_MODE_OUTPUT);
PIN_FUNC_SELECT(IO_MUX_GPIO12_REG, FUNC_MTDI_HSPIQ); // Pin ...
by frank_he
Thu Apr 23, 2020 12:34 pm
Forum: General Discussion
Topic: How to use the esp-idf componets with makefile system
Replies: 0
Views: 2688

How to use the esp-idf componets with makefile system

Hi,
I'm try to integrate the esp-idf to our makefile based project, and i need to use the spi driver for spi master. so I tried to define my include path in the makefile to include path for driver/spi_master.h. but then i tried to build and many errors occured, like:

components/soc/src/esp32 ...
by frank_he
Thu Apr 23, 2020 12:28 pm
Forum: General Discussion
Topic: file format not recognized when link an external .a lidrary
Replies: 2
Views: 6898

Re: file format not recognized when link an external .a lidrary


You should be able to use regular 'ar' tool (this tool is not architecture specific), but you do need to use "xtensa-esp32-elf-gcc -mlongcalls" to build the object files which go into the static library.


Hi, Thanks you. Yes, indeed i need to rebuild the liabrary with the correct toolchain
by frank_he
Wed Apr 08, 2020 5:48 am
Forum: General Discussion
Topic: file format not recognized when link an external .a lidrary
Replies: 2
Views: 6898

file format not recognized when link an external .a lidrary

hi,
i'm trying to call the function which is implemented in a static library(.a file) in app_main(). I already defined to linke this library in the component.mk of the main.c. the libray is prebuilt with GNC toolcahin (gcc),.
the console promote "libmylib.a: error adding symbols: file format not ...

Go to advanced search