SDK 1.1.0 problems

tve
Posts: 123
Joined: Sun Feb 15, 2015 4:33 pm

SDK 1.1.0 problems

Postby tve » Sat May 23, 2015 11:37 pm

Thank you for providing SDK 1.1.0 in the downloads forum. I have some problems with it:

The SDK 1.1.0 removes os_timer_arm, os_timer_disarm, os_timer_setfn: what's your thinking? These were documented functions in the SDK 1.0.1 document so their silent disappearance is rather strange. E.g.:

Code: Select all

diff -r esp_iot_sdk_v1.0.1/include/osapi.h esp_iot_sdk_v1.1.0/include/osapi.h
39,41d31
< #define os_timer_done ets_timer_done
< #define os_timer_handler_isr ets_timer_handler_isr
< #define os_timer_init ets_timer_init
45d34
< #define os_update_cpu_frequency ets_update_cpu_frequency


The SDK drops a number of other os_ functions from the header files, it would be good for the release notes to mention some of this (perhaps with a rationale).

Could you please upload updated docs?

Thanks!
Thorsten

tve
Posts: 123
Joined: Sun Feb 15, 2015 4:33 pm

Re: SDK 1.1.0 problems

Postby tve » Sat May 23, 2015 11:53 pm

Can you please also explain the following changes? Is there a pull-down option on the gpio pins or is there not? What does "pullup2" do?

Code: Select all

diff -r esp_iot_sdk_v1.0.1/include/eagle_soc.h esp_iot_sdk_v1.1.0/include/eagle_soc.h
187c187
< #define PERIPHS_IO_MUX_PULLDWN          BIT6
---
> #define PERIPHS_IO_MUX_PULLUP2          BIT6
189c189
< #define PERIPHS_IO_MUX_SLEEP_PULLDWN    BIT2
---
> #define PERIPHS_IO_MUX_SLEEP_PULLUP2    BIT2
246,247c246
< #define PIN_PULLDWN_DIS(PIN_NAME)             CLEAR_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLDWN)
< #define PIN_PULLDWN_EN(PIN_NAME)              SET_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLDWN)
---
>

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: SDK 1.1.0 problems

Postby ESP_Faye » Tue May 26, 2015 1:36 pm

Hi,

Sorry for the inconvenience,we removed some useless APIs from os_api.h

SDK_v1.1.0 release note updates as http://bbs.espressif.com/viewtopic.php?f=5&t=481&p=1832

Thanks for your valuable advices.

axellin

Re: SDK 1.1.0 problems

Postby axellin » Tue May 26, 2015 2:30 pm

Hi,
I also hit below build error with SDK 1.1.0.
/opt/esp8266/esp-open-sdk/sdk/lib/libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x34c): undefined reference to `user_rf_pre_init'
/opt/esp8266/esp-open-sdk/sdk/lib/libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x478): undefined reference to `user_rf_pre_init'
collect2: error: ld returned 1 exit status

Any suggestions?
Thanks.

axellin

Re: SDK 1.1.0 problems

Postby axellin » Tue May 26, 2015 3:05 pm

Add user_rf_pre_init() function fix my build error.

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: SDK 1.1.0 problems

Postby costaud » Tue May 26, 2015 3:34 pm

tve wrote:Can you please also explain the following changes? Is there a pull-down option on the gpio pins or is there not? What does "pullup2" do?

Code: Select all

diff -r esp_iot_sdk_v1.0.1/include/eagle_soc.h esp_iot_sdk_v1.1.0/include/eagle_soc.h
187c187
< #define PERIPHS_IO_MUX_PULLDWN          BIT6
---
> #define PERIPHS_IO_MUX_PULLUP2          BIT6
189c189
< #define PERIPHS_IO_MUX_SLEEP_PULLDWN    BIT2
---
> #define PERIPHS_IO_MUX_SLEEP_PULLUP2    BIT2
246,247c246
< #define PIN_PULLDWN_DIS(PIN_NAME)             CLEAR_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLDWN)
< #define PIN_PULLDWN_EN(PIN_NAME)              SET_PERI_REG_MASK(PIN_NAME, PERIPHS_IO_MUX_PULLDWN)
---
>


PERIPHS_IO_MUX_PULLUP2
We just remove the PULLDOWN definition because our pins do not support inside-pulldown function now.
Functionally, It's the same as PERIPHS_IO_MUX_PULLUP.

scargill
Posts: 70
Joined: Sun Nov 02, 2014 8:09 pm

Re: SDK 1.1.0 problems

Postby scargill » Mon Jun 01, 2015 12:59 am

HI

I understand we can simply remove reference to the GPIP DISABLE PULLDOWN commands but what exactly do we need to put in user_main to replace user_rf_pre_init ???

and what about these missing commands?

undefined reference to `os_intr_lock'
undefined reference to `os_intr_unlock'

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: SDK 1.1.0 problems

Postby costaud » Mon Jun 01, 2015 1:13 am

scargill wrote:HI

I understand we can simply remove reference to the GPIP DISABLE PULLDOWN commands but what exactly do we need to put in user_main to replace user_rf_pre_init ???

and what about these missing commands?

undefined reference to `os_intr_lock'
undefined reference to `os_intr_unlock'



Did you already use "os_intr_lock/unlock" before??

I don't understand what did you mean by saying “put in user_main to replace user_rf_pre_init"?

The sequence of chip booting is : power on->load flash->RF init->user_init. If you want to do something right before the RF init, you should add these codes to user_rf_pre_init().

For example, if you want to decide whether to open RF module after power on(read sensor data or gpio levels),add the judgement in user_rf_pre_init(), see usage of system_phy_set_rfoption in "Programme guide" documentation.

scargill
Posts: 70
Joined: Sun Nov 02, 2014 8:09 pm

Re: SDK 1.1.0 problems

Postby scargill » Mon Jun 01, 2015 1:22 am

This is in code I didn't write - (the http server code) -so I don't know what it is doing - but it has worked up to now.

So......

user_rf_pre_init

As this is no longer defined, what do I put in it's place...

Again in code I did not write - same code, there are references to both os_intr_lock and os_intr_unlock..

As these both worked in the previous SDK, what do I need to add so they work?

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: SDK 1.1.0 problems

Postby costaud » Mon Jun 01, 2015 1:28 am

scargill wrote:This is in code I didn't write - (the http server code) -so I don't know what it is doing - but it has worked up to now.

So......

user_rf_pre_init

As this is no longer defined, what do I put in it's place...

Again in code I did not write - same code, there are references to both os_intr_lock and os_intr_unlock..

As these both worked in the previous SDK, what do I need to add so they work?


1. I think you are using some open source code from github?Would you please give the link please?
2. For rf_pre_init, just add an empty function in user_main.c :
void user_rf_pre_init(void)
{
}
3. I need to see the code , usually just block os_intr_lock/unlock sentences.

Who is online

Users browsing this forum: No registered users and 123 guests