Hi
Up to now, various SDKs have been drop-in and recompile - this time with 1.4 I get an error when compiling this (which sadly I did not write so I don't want to mess it up).
void ICACHE_FLASH_ATTR QUEUE_Init(QUEUE *queue, int bufferSize)
{
queue->buf = (uint8_t*)os_zalloc(bufferSize);
RINGBUF_Init(&queue->rb, queue->buf, bufferSize);
}
mqtt/queue.c:42:2: error: too many arguments to function 'pvPortZalloc'
queue->buf = (uint8_t*)os_zalloc(bufferSize);
^
SDK 1.4 issue os_zalloc
Re: SDK 1.4 issue os_zalloc
Postby kolban » Tue Sep 22, 2015 3:07 am
When using SDK supplied APIs try and find the corresponding C header file that contains the prototype definitions. For os_<memory> functions, this is the file called "mem.h" contained in <SDK>/include/mem.h. Looking at that file, we will find that the definitions for items such as "os_zalloc" have been defined as macros with additional parameters for memory leak debugging.
I'd suggest including mem.h and removing any previously manually defined definitions of os_<memory> functions that you may have coded.
Neil
I'd suggest including mem.h and removing any previously manually defined definitions of os_<memory> functions that you may have coded.
Neil
Re: SDK 1.4 issue os_zalloc
Postby eriksl » Wed Sep 23, 2015 12:05 am
Yes indeed, it looks this function now finally has a proper prototype and the prototype guessed by the author apparently was wrong.
This is actually a good thing, because improperly prototyped function calls can cause crashed and other unpredictable behaviour.
This is actually a good thing, because improperly prototyped function calls can cause crashed and other unpredictable behaviour.
Who is online
Users browsing this forum: No registered users and 27 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.