make all
make[1]: Entering directory '/cygdrive/d/ESP8266test/app'
make[2]: Entering directory '/cygdrive/d/ESP8266test/app/user'
make[2]: Leaving directory '/cygdrive/d/ESP8266test/app/user'
xt-xcc -L../lib -nostdlib -T../ld/eagle.app.v6.ld -Wl,--no-check-sections -Wl,--gc-sections -u call_user_start -Wl,-static -Wl,--start-group -lc -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lcrypto -lmain -ldriver user/.output/eagle/debug/lib/libuser.a -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v6.out
../lib/libmain.a(app_main.o): In function `flash_data_check':
(.irom0.text+0x7bc): undefined reference to `user_rf_cal_sector_set'
../lib/libmain.a(app_main.o): In function `flash_data_check':
(.irom0.text+0x977): undefined reference to `user_rf_cal_sector_set'
collect2: error: ld returned 1 exit status
make[1]: *** [../Makefile:381: .output/eagle/debug/image/eagle.app.v6.out] Error 1
make[1]: Leaving directory '/cygdrive/d/ESP8266test/app'
make: *** [Makefile:325: .subdirs] Error 2
新手,这个问题是为什么呢?
Re: 新手,这个问题是为什么呢?
Postby ESP_Faye » Thu Jun 29, 2017 7:48 pm
您好,
请在您的 user_main.c 中添加如下代码:
请在您的 user_main.c 中添加如下代码:
Code: Select all
/******************************************************************************
* FunctionName : user_rf_cal_sector_set
* Description : SDK just reversed 4 sectors, used for rf init data and paramters.
* We add this function to force users to set rf cal sector, since
* we don't know which sector is free in user's application.
* sector map for last several sectors : ABCCC
* A : rf cal
* B : rf init data
* C : sdk parameters
* Parameters : none
* Returns : rf cal sector
*******************************************************************************/
uint32 ICACHE_FLASH_ATTR
user_rf_cal_sector_set(void)
{
enum flash_size_map size_map = system_get_flash_size_map();
uint32 rf_cal_sec = 0;
switch (size_map) {
case FLASH_SIZE_4M_MAP_256_256:
rf_cal_sec = 128 - 5;
break;
case FLASH_SIZE_8M_MAP_512_512:
rf_cal_sec = 256 - 5;
break;
case FLASH_SIZE_16M_MAP_512_512:
case FLASH_SIZE_16M_MAP_1024_1024:
rf_cal_sec = 512 - 5;
break;
case FLASH_SIZE_32M_MAP_512_512:
case FLASH_SIZE_32M_MAP_1024_1024:
rf_cal_sec = 1024 - 5;
break;
case FLASH_SIZE_64M_MAP_1024_1024:
rf_cal_sec = 2048 - 5;
break;
case FLASH_SIZE_128M_MAP_1024_1024:
rf_cal_sec = 4096 - 5;
break;
default:
rf_cal_sec = 0;
break;
}
return rf_cal_sec;
}
void ICACHE_FLASH_ATTR
user_rf_pre_init(void)
{
}
Who is online
Users browsing this forum: No registered users and 64 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.