hw_timer.c does not compile
hw_timer.c does not compile
Postby dmarkey » Fri Oct 23, 2015 6:32 am
/Volumes/esp-open-sdk/esp-open-sdk/sdk/include/ets_sys.h:55:20: error: 'NmiTimSetFunc' was not declared in this scope
NmiTimSetFunc(func)
^
app/application.cpp:93:9: note: in expansion of macro 'ETS_FRC_TIMER1_NMI_INTR_ATTACH'
ETS_FRC_TIMER1_NMI_INTR_ATTACH(hw_timer_isr_cb);
^
/Volumes/esp-open-sdk/esp-open-sdk/sdk/include/ets_sys.h:52:62: error: invalid conversion from 'void (*)()' to 'void*' [-fpermissive]
NmiTimSetFunc(func)
^
app/application.cpp:93:9: note: in expansion of macro 'ETS_FRC_TIMER1_NMI_INTR_ATTACH'
ETS_FRC_TIMER1_NMI_INTR_ATTACH(hw_timer_isr_cb);
^
/Volumes/esp-open-sdk/esp-open-sdk/sdk/include/ets_sys.h:52:62: error: invalid conversion from 'void (*)()' to 'void*' [-fpermissive]
Re: hw_timer.c does not compile
Postby lorinliu » Thu Mar 24, 2016 11:42 am
I just download the newest SDK (v1.4.0) from github, and encounter the same problem.
Below is my patch for this issue.
1. copy driver and header files into project_template folder.
2. add driver to be compiled in Makefile
3. fix compile error issue according to following patch
ESP8266_RTOS_SDK is not professional, not any framework as a SDK, and it's hard to use...maybe you need some experts about embedded software.
Below is my patch for this issue.
1. copy driver and header files into project_template folder.
Code: Select all
$ cd ~/project_template
$ cp -raf <ESP8266_RTOS_SDK_V1.4.0>/examples/driver_lib/driver .
$ cp -raf <ESP8266_RTOS_SDK_V1.4.0>/examples/driver_lib/include/* .
2. add driver to be compiled in Makefile
Code: Select all
--- project_template/Makefile 2016-03-24 11:05:24.547352907 +0800
+++ ESP8266_RTOS_SDK_V1.4.0/examples/project_template/Makefile 2016-02-29 18:50:38.000000000 +0800
@@ -23,7 +23,6 @@
SPECIAL_MKTARGETS=$(APP_MKTARGETS)
SUBDIRS= \
user \
- driver \
sample_lib
endif # } PDIR
@@ -48,7 +47,6 @@
COMPONENTS_eagle.app.v6 = \
user/libuser.a \
- driver/libdriver.a \
sample_lib/libsample.a
LINKFLAGS_eagle.app.v6 = \
3. fix compile error issue according to following patch
Code: Select all
diff -ruNa a/examples/driver_lib/driver/hw_timer.c b/examples/driver_lib/driver/hw_timer.c
--- a/examples/driver_lib/driver/hw_timer.c 2016-03-24 11:00:17.040841331 +0800
+++ b/examples/driver_lib/driver/hw_timer.c 2016-02-29 18:50:38.000000000 +0800
@@ -76,7 +76,7 @@
DIVDED_BY_16 | FRC1_ENABLE_TIMER | TM_EDGE_INT);
}
- _xt_isr_attach(ETS_FRC_TIMER1_INUM, (void *)hw_timer_isr_cb, NULL);
+ _xt_isr_attach(ETS_FRC_TIMER1_INUM, hw_timer_isr_cb, NULL);
TM1_EDGE_INT_ENABLE();
_xt_isr_unmask(1 << ETS_FRC_TIMER1_INUM);
diff -ruNa a/examples/driver_lib/driver/uart.c b/examples/driver_lib/driver/uart.c
--- a/examples/driver_lib/driver/uart.c 2016-03-24 11:02:23.664113631 +0800
+++ b/examples/driver_lib/driver/uart.c 2016-02-29 18:50:38.000000000 +0800
@@ -421,7 +421,7 @@
UART_IntrConfig(UART0, &uart_intr);
UART_SetPrintPort(UART0);
- UART_intr_handler_register(uart0_rx_intr_handler, NULL);
+ UART_intr_handler_register(uart0_rx_intr_handler);
ETS_UART_INTR_ENABLE();
/*
ESP8266_RTOS_SDK is not professional, not any framework as a SDK, and it's hard to use...maybe you need some experts about embedded software.
Re: hw_timer.c does not compile
Postby ESP_Faye » Thu Mar 24, 2016 5:17 pm
Hi,
Please download it from github again, we have already updated it https://github.com/espressif/ESP8266_RTOS_SDK.
Thanks for your interest in ESP8266 !
Please download it from github again, we have already updated it https://github.com/espressif/ESP8266_RTOS_SDK.
Thanks for your interest in ESP8266 !
Who is online
Users browsing this forum: No registered users and 14 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.