SDK 1.1.1 linker reference missing

FrenkR
Posts: 44
Joined: Thu Dec 04, 2014 9:25 am

SDK 1.1.1 linker reference missing

Postby FrenkR » Tue Jun 09, 2015 8:34 pm

after downoad and upgrade "esp_iot_sdk_v1.1.0_15_05_26.zip", I am getting following messages:

Code: Select all

user_upgrade.c:(.irom0.text+0x6c): undefined reference to `system_upgrade_init'
user_upgrade.c:(.irom0.text+0x68): undefined reference to `system_upgrade_start'

or when buiding IOT demo:

Code: Select all

LD build/app.out
build/app_app.a(user_light.o): In function `user_light_get_duty':
user_light.c:(.irom0.text+0x14): undefined reference to `pwm_set_duty'
user_light.c:(.irom0.text+0x18): undefined reference to `pwm_get_duty'
build/app_app.a(user_light.o): In function `user_light_set_duty':
\examples\IoT_Demo/user/user_light.c:46: undefined reference to `pwm_set_duty'
\examples\IoT_Demo/user/user_light.c:47: undefined reference to `pwm_get_duty'

build/app_app.a(user_light.o): In function `user_light_get_period':
\examples\IoT_Demo/user/user_light.c:62: undefined reference to `pwm_set_period'
\examples\IoT_Demo/user/user_light.c:63: undefined reference to `pwm_get_period'
build/app_app.a(user_light.o): In function `user_light_set_period':
\examples\IoT_Demo/user/user_light.c:73: undefined reference to `pwm_set_period'
\examples/IoT_Demo/Makefile:225: recipe for target 'build/app.out' failed
\examples\IoT_Demo/user/user_light.c:73: undefined reference to `pwm_get_period'
\examples\IoT_Demo/user/user_light.c:79: undefined reference to `pwm_start'

build/app_app.a(user_light.o): In function `user_light_restart':
\examples\IoT_Demo/user/user_light.c:84: undefined reference to `pwm_start'
\examples\IoT_Demo/user/user_light.c:89: undefined reference to `pwm_init'
\examples\IoT_Demo/user/user_light.c:89: undefined reference to `set_pwm_debug_en'
\examples\IoT_Demo/user/user_light.c:89: undefined reference to `get_pwm_version'

build/app_app.a(user_light.o): In function `user_light_init':
\examples\IoT_Demo/user/user_light.c:100: undefined reference to `pwm_init'
\examples\IoT_Demo/user/user_light.c:123: undefined reference to `set_pwm_debug_en'
\examples\IoT_Demo/user/user_light.c:123: undefined reference to `get_pwm_version'

build/app_app.a(user_light_adj.o):(.text+0x20): undefined reference to `pwm_start'
build/app_app.a(user_light_adj.o):(.text+0x24): undefined reference to `pwm_get_duty'
build/app_app.a(user_light_adj.o): In function `light_dh_pwm_adj_proc':
\examples\IoT_Demo/user/user_light_adj.c:133: undefined reference to `pwm_start'
\examples\IoT_Demo/user/user_light_adj.c:136: undefined reference to `pwm_get_duty'

build/app_app.a(user_light_adj.o): In function `light_save_target_duty':
\examples\IoT_Demo/user/user_light_adj.c:67: undefined reference to `pwm_get_period'

build/app_app.a(user_light_adj.o): In function `light_pwm_smooth_adj_proc':
\examples\IoT_Demo/user/user_light_adj.c:179: undefined reference to `pwm_get_duty'

Can you please update libs to have correct entries, please?
Rgds,
Frenk

surfnturf57
Posts: 4
Joined: Wed Apr 08, 2015 11:54 pm

Re: SDK 1.1.1 linker reference missing

Postby surfnturf57 » Tue Jun 09, 2015 11:02 pm

I have experienced the same problem. This is the IoT_Demo that is included with the SDK 1.1.1 release. One would expect it to link properly!

Anxiously awaiting a resolution.

The last SDK version I have had success with is 1.0.1 24-Apr-15.

surfnturf57
Posts: 4
Joined: Wed Apr 08, 2015 11:54 pm

Re: SDK 1.1.1 linker reference missing

Postby surfnturf57 » Wed Jun 10, 2015 7:54 am

I commented out all the "user_light" references (that I am not using anyway) and I've boiled this down to a common thread. I now get the same "undefined reference" from the linker in both versions of my SDK Test App (when compiling with SDK Version 1.1.1):

1. IoT_Demo from SDK Version 1.1.1 example
2. IoT_Demo, customized for my Application, that compiles correctly with SDK Version 1.0.1 24-April-2015

Code: Select all

16:44:58 **** Build of configuration Default for project WebServerAP ****
mingw32-make.exe -f C:/Espressif/myProjects/WebServerAP/Makefile all
LD build/app.out
c:/Espressif/ESP8266_SDK/lib\libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x340): undefined reference to `user_rf_pre_init'
c:/Espressif/ESP8266_SDK/lib\libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x45c): undefined reference to `user_rf_pre_init'
collect2.exe: error: ld returned 1 exit status
C:/Espressif/myProjects/WebServerAP/Makefile:224: recipe for target 'build/app.out' failed
mingw32-make.exe: *** [build/app.out] Error 1

16:45:00 Build Finished (took 2s.13ms)



Very frustrating - Houston(EspressIf)---we have a problem!

Help! :o

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

Re: SDK 1.1.1 linker reference missing

Postby ESP_Faye » Wed Jun 10, 2015 10:01 am

Hi,

So sorry for the inconvenience,

You can get the introduction of APIs in document "2C-ESP8266__SDK__Programming Guide" in \esp_iot_sdk\document

Please pay attention on the release note of SDK_v1.1.0 http://bbs.espressif.com/viewtopic.php?f=5&t=481

And the release note of the latest SDK_v1.1.1 http://bbs.espressif.com/viewtopic.php?f=5&t=554

These release notes are also in the SDK packet, unzip "esp_iot_sdk" , there is a "release_note.txt" which shows the change list of each SDK version.

Thanks for your interest in ESP8266 !

FrenkR
Posts: 44
Joined: Thu Dec 04, 2014 9:25 am

Re: SDK 1.1.1 linker reference missing

Postby FrenkR » Wed Jun 10, 2015 6:15 pm

Hi,
I have read all release notes, but I still didn't find any solution for invalid references during linking. Can you give us a hint or provide additional libs that have those funcitons implemented?

Rgds,
Frenk

surfnturf57
Posts: 4
Joined: Wed Apr 08, 2015 11:54 pm

Re: SDK 1.1.1 linker reference missing

Postby surfnturf57 » Wed Jun 10, 2015 10:20 pm

Yeah, it is obvious from the 1.1.1 notes that the PWM API has been revised.

Code: Select all

Added APIs:
1.PWM APIs:
Updated: pwm_init,add parameter to set PWM channel and GPIO pin
Added:
(1)get_pwm_version:get version information of PWM driver
(2)pwm_set_period:set PWM period
(3)pwm_get_period:get PWM period


and the header file pwm.h does provide prototypes for the functions that the linker indicates there is an "undefined reference"

These functions are in the lib file "libpwm.a" but the linker is not finding them.

I am not smart enough to figure out where the root problem lies. Maybe something needs to be added to the makefile. Sure would be nice if the example IoT_Demo included with SDK 1.1.1 could be compiled as it has been provided.

FrenkR
Posts: 44
Joined: Thu Dec 04, 2014 9:25 am

Re: SDK 1.1.1 linker reference missing

Postby FrenkR » Wed Jun 10, 2015 11:00 pm

problem solved, "makefile" should have specified all libs that you use. In my case inside "LIBS" section "upgrade" was missing. This one hence reflects to "libupgrade.a" in /lib folder.
Rgds,
Frenk

surfnturf57
Posts: 4
Joined: Wed Apr 08, 2015 11:54 pm

Re: SDK 1.1.1 linker reference missing

Postby surfnturf57 » Thu Jun 11, 2015 9:09 am

Problem solved confirmed:

Yep, pwm is missing from the SDK version 1.1.1 Makefile for the IoT_Demo example. LIB section.

It must be added for a successful compile. :D

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

Re: SDK 1.1.1 linker reference missing

Postby ESP_Faye » Thu Jun 11, 2015 10:08 am

Hi,

Sorry that I didn't figure out it's the makefile problem at first time.

Thanks for your advice, I'll add it into the release note !

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

Re: SDK 1.1.1 linker reference missing

Postby scargill » Thu Jun 18, 2015 10:10 pm

Well, I have upgrade in there - and libpwm.a is still missing...

LIBS = c gcc hal phy pp net80211 lwip wpa upgrade main ssl libpwm

I get an error to say that libpwm cannot be found - and a quick search of the sdk tree shows the file is not there.

Does anyone have a simple answer to this - you'd think it was a secret....

Who is online

Users browsing this forum: No registered users and 21 guests