ESP8266 Developer Zone The Official ESP8266 Forum 2015-11-09T19:23:37+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1322 2015-11-09T19:23:37+08:00 2015-11-09T19:23:37+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1322&p=4516#p4516 <![CDATA[Re: FreeRTOS SDK : UART ISR compile error]]> https://github.com/espressif/ESP8266_RTOS_SDK/pull/27/commits.

This fix works, as does mine.

Many Thanks,

Andrew Collins.

Statistics: Posted by knifey-spooney — Mon Nov 09, 2015 7:23 pm


]]>
2015-11-09T15:44:29+08:00 2015-11-09T15:44:29+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1322&p=4511#p4511 <![CDATA[Re: FreeRTOS SDK : UART ISR compile error]]>
I just pulled the latest version of the RTOS sdk, and no changes.

I had a look at the header file that contains _xt_isr_attach (link: https://github.com/espressif/ESP8266_RTOS_SDK/blob/master/include/freertos/portmacro.h), and what I noticed is that there is a typedef for _xt_isr in the line above, which sets _xt_isr to be a pointer to a function that returns void and takes a void pointer as an argument.

Seeing this I changed the 'UART_intr_handler_register' function in uart.c to this:

Code:

void ICACHE_FLASH_ATTR
UART_intr_handler_register(void *fn)
{
    _xt_isr func = fn;
    _xt_isr_attach(ETS_UART_INUM, func, fn);
}


With this change in place, the file compiles, but I do not know how well the isr handler actually works; so I'll go and do that now. :)

Any feedback on this change would be greatly appreciated.

Many Thanks,
Andrew.

Statistics: Posted by knifey-spooney — Mon Nov 09, 2015 3:44 pm


]]>
2015-11-09T14:15:15+08:00 2015-11-09T14:15:15+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1322&p=4504#p4504 <![CDATA[Re: FreeRTOS SDK : UART ISR compile error]]> I see that there is a new release of the RTOS SDK ... maybe have a try with that and see if there are any changes?

Statistics: Posted by kolban — Mon Nov 09, 2015 2:15 pm


]]>
2015-11-01T12:26:43+08:00 2015-11-01T12:26:43+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1322&p=4400#p4400 <![CDATA[[SOLVED]FreeRTOS SDK : UART ISR compile error]]>
I am currently using the uart.c file from the FreeRTOS SDK git repository, to play around with the UART.

Unfortunately if I try to compile this file I get the following error :

```
uart.c: In function 'UART_intr_handler_register':
uart.c:270:5: error: too few arguments to function '_xt_isr_attach'
_xt_isr_attach(ETS_UART_INUM, fn);
^
In file included from /home/knifey-spooney/esp_stuff/esp_iot_rtos_sdk//include/freertos/portable.h:318:0,
from /home/knifey-spooney/esp_stuff/esp_iot_rtos_sdk//include/freertos/FreeRTOS.h:87,
from uart.c:8:
/home/knifey-spooney/esp_stuff/esp_iot_rtos_sdk//include/freertos/portmacro.h:185:13: note: declared here
void _xt_isr_attach (uint8 i, _xt_isr func, void *arg);
```

Just wondering if anyone could point me to the documentation on the _xt_isr code, and/or its source code?

Also if I remove this functionality from this file it compiles and works beautifully.

Apologies if this question has been asked before.

Many Thanks,
Andrew.

Statistics: Posted by knifey-spooney — Sun Nov 01, 2015 12:26 pm


]]>